Lomse library. API documentation
0.30.0
|
#include <lomse_command.h>
A command for modifying current set of selected objects.
See constructor for details.
Public Types | |
enum | ESelectionAction |
Public Types inherited from DocCommand | |
enum | ECmdCursorPolicy |
enum | ECmdUndoPolicy |
enum | ECmdSelectionPolicy |
Public Member Functions | |
CmdSelection (int cmd, const std::string &name="") | |
CmdSelection (int cmd, ImoId id, const std::string &name="") | |
int | get_cursor_update_policy () override |
int | get_undo_policy () override |
int | get_selection_update_policy () override |
Public Member Functions inherited from DocCmdSimple | |
virtual | ~DocCmdSimple () |
bool | is_composite () override |
Public Member Functions inherited from DocCommand | |
virtual | ~DocCommand () |
std::string | get_name () |
bool | is_reversible () |
bool | is_recordable () |
std::string | get_error () |
This enum describes the possible actions for CmdSelection commands.
CmdSelection::CmdSelection | ( | int | cmd, |
const std::string & | name = "" |
||
) |
This command clears the set of selected objects.
cmd | The type of action to do on the selection set. Must be CmdSelection::k_clear |
name | The displayable name for the command. If not specified or empty will be replaced by "Selection: clear selection". |
Remarks
As parameter cmd must be always k_clear, a convenience class CmdClearSelection(const string& name="") has been defined.
CmdSelection::CmdSelection | ( | int | cmd, |
ImoId | id, | ||
const std::string & | name = "" |
||
) |
This command changes the content of the set of selected objects.
cmd | The type of action to do on the selection set. Must be a value from enum ESelectionAction. |
id | The ID of the object to add to or remove from the selection set. |
name | The displayable name for the command. If not specified or empty will be replaced by one of the following strings, depending on value for parameter cmd:
|
Remarks
Example
|
inlineoverridevirtual |
Returns a value from ECmdCursorPolicy that indicates the update policy followed by this command.
Implements DocCommand.
|
inlineoverridevirtual |
Returns a value from ECmdSelectionPolicy that indicates the undo policy followed by this command.
Implements DocCommand.
|
inlineoverridevirtual |
Returns a value from ECmdUndoPolicy that indicates the undo policy followed by this command.
Implements DocCommand.