Lomse library. API documentation
0.30.0
|
#include <lomse_command.h>
DocCommandExecuter class is responsible of maintaining the stack of executed commands and performing undo/redo.
Public Member Functions | |
DocCommandExecuter (Document *target) | |
virtual | ~DocCommandExecuter () |
DocCommandExecuter (const ImoStyles &)=delete | |
DocCommandExecuter & | operator= (const ImoStyles &)=delete |
DocCommandExecuter (ImoStyles &&)=delete | |
DocCommandExecuter & | operator= (ImoStyles &&)=delete |
virtual int | execute (DocCursor *pCursor, DocCommand *pCmd, SelectionSet *pSelection) |
virtual void | undo (DocCursor *pCursor, SelectionSet *pSelection) |
virtual void | redo (DocCursor *pCursor, SelectionSet *pSelection) |
std::string | get_error () |
bool | is_undo_possible () |
bool | is_redo_possible () |
virtual size_t | undo_stack_size () |
Friends | |
class | DocCmdComposite |
DocCommandExecuter::DocCommandExecuter | ( | Document * | target | ) |
Constructor.
|
virtual |
the five special
|
virtual |
Executes a command and saves the necessary information for undo/redo operations. Returns value 0 if the command successfully executed. Otherwise returns value 1 and a relevant error message can be retrieved by invoking method get_error().
|
inline |
In case an comand failed, this method provides an string with the error message
|
inline |
Returns true if there are redo-able commands in the undo/redo stack.
|
inline |
Returns true if there are undo-able commands in the undo/redo stack.
|
virtual |
Redo the last undo command.
|
virtual |
Pop a command from the stack and undo it.
|
inlinevirtual |
Returns the number of undo/redo elements in the undo/redo stack.