#include <CommandManagerCallback.h>
Inherited by EMStudio::ActionHistoryCallback.
Public Member Functions | |
CommandManagerCallback () | |
virtual | ~CommandManagerCallback () |
virtual void | OnPreExecuteCommand (CommandGroup *group, Command *command, const CommandLine &commandLine)=0 |
virtual void | OnPostExecuteCommand (CommandGroup *group, Command *command, const CommandLine &commandLine, bool wasSuccess, const AZStd::string &outResult)=0 |
virtual void | OnPreUndoCommand (MCore::Command *command, const MCore::CommandLine &commandLine) |
virtual void | OnPostUndoCommand (MCore::Command *command, const MCore::CommandLine &commandLine) |
virtual void | OnPreExecuteCommandGroup (CommandGroup *group, bool undo)=0 |
virtual void | OnPostExecuteCommandGroup (CommandGroup *group, bool wasSuccess)=0 |
virtual void | OnAddCommandToHistory (size_t historyIndex, CommandGroup *group, Command *command, const CommandLine &commandLine)=0 |
virtual void | OnRemoveCommand (size_t historyIndex)=0 |
virtual void | OnSetCurrentCommand (size_t index)=0 |
virtual void | OnShowErrorReport (const AZStd::vector< AZStd::string > &errors) |
The command manager callback class. Specific events are triggered by the command manager through this callback class. For example you can get notified when a given command is being executed. This can be used to for example link the command manager to a graphical user interface. It could show the command history in which the user can step back and forth to undo and redo commands.
|
inline |
The constructor.
|
inlinevirtual |
The destructor.
|
pure virtual |
This callback is executed when a new item is added to the command history.
historyIndex | The history index where the new item was added. |
group | The group that was added to the history list, or nullptr when it is not a group but a regular command. |
command | The command that is linked with this history item. |
commandLine | The command line that is linked to this history item. |
Implemented in EMStudio::ActionHistoryCallback.
|
pure virtual |
This callback is executed after we have executed a given command.
group | The group that just executed, or nullptr when it is not a group but a regular command. |
command | The command that has just been executed. |
commandLine | The command line that was used when executing the command. |
wasSuccess | This is set to true when the command execution was successful, or false when it failed. |
outResult | The string that contains the result of the execution, or the error when the execution failed. |
Implemented in EMStudio::ActionHistoryCallback.
|
pure virtual |
This callback is executed after we have executed a given command group.
group | The group that just executed, or nullptr when it is not a group but a regular command. |
wasSuccess | This is set to true when the command execution was successful, or false when it failed. |
Implemented in EMStudio::ActionHistoryCallback.
|
pure virtual |
This callback is executed before we are going to execute a given command.
group | The group that is about to be executed, or nullptr when it is not a group but a regular command. |
command | The command that is about to be executed. |
commandLine | The command line that is going to be used when executing the command. |
Implemented in EMStudio::ActionHistoryCallback.
|
pure virtual |
This callback is executed before we are going to execute a given command group.
group | The group that is about to be executed, or nullptr when it is not a group but a regular command. |
undo | True in case the command group has been executed already and is now being undone, false in case the command group is normally executed. |
Implemented in EMStudio::ActionHistoryCallback.
|
pure virtual |
This callback is executed when a command is being removed from the command history.
historyIndex | The history index of the command that is being removed. |
Implemented in EMStudio::ActionHistoryCallback.
|
pure virtual |
This callback is executed when we step back or forth in the command history.
index | The new history index which will be the current state the system will be in. |
Implemented in EMStudio::ActionHistoryCallback.
|
inlinevirtual |
This callback is executed before the error array is getting cleared and the interfaces shall show some error reporting window or something similar. @errors[in] errors The errors that happened and shall be made visible to the user.