ui::CommandRef¶
Header: winui/ui/Command.hpp.
What a control's .command field holds: a non-owning reference to a ui::Command, written as the command itself (.command = save), or empty. Either end may go first: a CommandRef whose command was destroyed is empty, and the controls holding it act as if they had none.
It follows the Command object it was given. A copy of the command, or one it was moved into, starts with no refs.
CommandRef¶
No command.
CommandRef¶
No command.
CommandRef¶
A reference to command; implicit, so a field takes .command = save.
CommandRef¶
Another reference to the same command.
operator=¶
Points at other's command instead.
~CommandRef¶
get¶
The command, or nullptr when there is none or it was destroyed.
operator const Command *¶
The command, or nullptr: a CommandRef reads like the pointer it replaces.
operator->¶
The command. Only use it while there is one.