#include <CommandProcessor.h>
Public Member Functions | |
| CommandProcessor (void) | |
| CommandProcessor (size_t cmd_limit) | |
| ~CommandProcessor (void) | |
| size_t | get_cmd_limit () const |
| unsigned | get_last_number () const |
| bool | execute (Command *cmd) |
| bool | undo () |
| bool | redo () |
| bool | dismiss_all () |
| bool | reject_all () |
The hub for all user actions in the editor.
| cyber::editor::commands::CommandProcessor::CommandProcessor | ( | void | ) |
Default constructor.
| cyber::editor::commands::CommandProcessor::CommandProcessor | ( | size_t | cmd_limit | ) |
Explicit constructor.
| cyber::editor::commands::CommandProcessor::~CommandProcessor | ( | void | ) |
Destructor.
| bool cyber::editor::commands::CommandProcessor::dismiss_all | ( | ) |
Dismisses all commands.
| bool cyber::editor::commands::CommandProcessor::execute | ( | Command * | cmd | ) |
Executes the given command and pushes it on the undo stack.
| size_t cyber::editor::commands::CommandProcessor::get_cmd_limit | ( | ) | const [inline] |
Returns the maximum number of undo/redo commands.
| unsigned cyber::editor::commands::CommandProcessor::get_last_number | ( | ) | const [inline] |
Returns the number of the last executed command.
| bool cyber::editor::commands::CommandProcessor::redo | ( | ) |
Redoes the last undone action on top of the redo stack.
| bool cyber::editor::commands::CommandProcessor::reject_all | ( | ) |
Rejects all commands.
| bool cyber::editor::commands::CommandProcessor::undo | ( | ) |
Undoes the last action on top of the undo stack.
1.7.1