Lomse library. API documentation
0.30.0
|
#include <lomse_command.h>
Abstract base class from which all commands must derive. Represents an edition command.
Public Types | |
enum | ECmdCursorPolicy |
enum | ECmdUndoPolicy |
enum | ECmdSelectionPolicy |
Public Member Functions | |
virtual | ~DocCommand () |
virtual int | get_cursor_update_policy ()=0 |
virtual int | get_undo_policy ()=0 |
virtual int | get_selection_update_policy ()=0 |
std::string | get_name () |
bool | is_reversible () |
bool | is_recordable () |
std::string | get_error () |
virtual bool | is_composite ()=0 |
This enum describes the policies for updating the cursor after executing a command.
This enum describes the available policies for updating the SelectionSet after executing a command.
This enum describes the available undo policies for commands.
|
inlinevirtual |
Destructor.
|
pure virtual |
Returns a value from ECmdCursorPolicy that indicates the update policy followed by this command.
Implemented in CmdTranspose, CmdSelection, CmdMoveObjectPoint, CmdJoinBeam, CmdInsertStaffObj, CmdInsertManyStaffObjs, CmdInsertBlockLevelObj, CmdDeleteStaffObj, CmdDeleteSelection, CmdDeleteRelation, CmdDeleteBlockLevelObj, CmdCursor, CmdChangeDots, CmdChangeAttribute, CmdChangeAccidentals, CmdBreakBeam, CmdAddTuplet, CmdAddTie, CmdAddNoteRest, CmdAddChordNote, and DocCmdComposite.
|
inline |
Returns an error message with the error explanation. This method should be invoked after executing a command that fails. Otherwise it will return an empty string.
|
inline |
Returns the name of the command.
|
pure virtual |
Returns a value from ECmdSelectionPolicy that indicates the undo policy followed by this command.
Implemented in CmdTranspose, CmdSelection, CmdMoveObjectPoint, CmdJoinBeam, CmdInsertStaffObj, CmdInsertManyStaffObjs, CmdInsertBlockLevelObj, CmdDeleteStaffObj, CmdDeleteSelection, CmdDeleteRelation, CmdDeleteBlockLevelObj, CmdCursor, CmdChangeDots, CmdChangeAttribute, CmdChangeAccidentals, CmdBreakBeam, CmdAddTuplet, CmdAddTie, CmdAddNoteRest, CmdAddChordNote, and DocCmdComposite.
|
pure virtual |
Returns a value from ECmdUndoPolicy that indicates the undo policy followed by this command.
Implemented in CmdTranspose, CmdSelection, CmdMoveObjectPoint, CmdJoinBeam, CmdInsertStaffObj, CmdInsertManyStaffObjs, CmdInsertBlockLevelObj, CmdDeleteStaffObj, CmdDeleteSelection, CmdDeleteRelation, CmdDeleteBlockLevelObj, CmdCursor, CmdChangeDots, CmdChangeAttribute, CmdChangeAccidentals, CmdBreakBeam, CmdAddTuplet, CmdAddTie, CmdAddNoteRest, CmdAddChordNote, and DocCmdComposite.
|
pure virtual |
Returns true if the command is composite.
Implemented in DocCmdComposite, and DocCmdSimple.
|
inline |
Returns true if the command is recordable.
Command sequences can be recorded and replayed at other point or on another document, allowing the creation of macros or scripts. But not all commands are suitable to be recorded and replayed. Recordable commands are those that can be recorded and replayed safely. All reversible commands are recordable by nature, as this is required for supporting redo. See is_reversible().
|
inline |
Returns true if the command is reversible, that is, if the command supports undo/redo (e.g. insert object), and false if it does not support undo/redo (e.g. print).