Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMStudio::ActionHistoryCallback Class Reference

Inherits MCore::CommandManagerCallback.

Public Member Functions

 ActionHistoryCallback (QListWidget *list)
 
void OnPreExecuteCommand (MCore::CommandGroup *group, MCore::Command *command, const MCore::CommandLine &commandLine) override
 
void OnPostExecuteCommand (MCore::CommandGroup *group, MCore::Command *command, const MCore::CommandLine &commandLine, bool wasSuccess, const AZStd::string &outResult) override
 
void OnAddCommandToHistory (size_t historyIndex, MCore::CommandGroup *group, MCore::Command *command, const MCore::CommandLine &commandLine) override
 
void OnPreExecuteCommandGroup (MCore::CommandGroup *group, bool undo) override
 
void OnPostExecuteCommandGroup (MCore::CommandGroup *group, bool wasSuccess) override
 
void OnRemoveCommand (size_t historyIndex) override
 
void OnSetCurrentCommand (size_t index) override
 
- Public Member Functions inherited from MCore::CommandManagerCallback
 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)
 

Member Function Documentation

◆ OnAddCommandToHistory()

void EMStudio::ActionHistoryCallback::OnAddCommandToHistory ( size_t  historyIndex,
MCore::CommandGroup group,
MCore::Command command,
const MCore::CommandLine commandLine 
)
overridevirtual

This callback is executed when a new item is added to the command history.

Parameters
historyIndexThe history index where the new item was added.
groupThe group that was added to the history list, or nullptr when it is not a group but a regular command.
commandThe command that is linked with this history item.
commandLineThe command line that is linked to this history item.

Implements MCore::CommandManagerCallback.

◆ OnPostExecuteCommand()

void EMStudio::ActionHistoryCallback::OnPostExecuteCommand ( MCore::CommandGroup group,
MCore::Command command,
const MCore::CommandLine commandLine,
bool  wasSuccess,
const AZStd::string &  outResult 
)
overridevirtual

This callback is executed after we have executed a given command.

Parameters
groupThe group that just executed, or nullptr when it is not a group but a regular command.
commandThe command that has just been executed.
commandLineThe command line that was used when executing the command.
wasSuccessThis is set to true when the command execution was successful, or false when it failed.
outResultThe string that contains the result of the execution, or the error when the execution failed.

Implements MCore::CommandManagerCallback.

◆ OnPostExecuteCommandGroup()

void EMStudio::ActionHistoryCallback::OnPostExecuteCommandGroup ( MCore::CommandGroup group,
bool  wasSuccess 
)
overridevirtual

This callback is executed after we have executed a given command group.

Parameters
groupThe group that just executed, or nullptr when it is not a group but a regular command.
wasSuccessThis is set to true when the command execution was successful, or false when it failed.

Implements MCore::CommandManagerCallback.

◆ OnPreExecuteCommand()

void EMStudio::ActionHistoryCallback::OnPreExecuteCommand ( MCore::CommandGroup group,
MCore::Command command,
const MCore::CommandLine commandLine 
)
overridevirtual

This callback is executed before we are going to execute a given command.

Parameters
groupThe group that is about to be executed, or nullptr when it is not a group but a regular command.
commandThe command that is about to be executed.
commandLineThe command line that is going to be used when executing the command.

Implements MCore::CommandManagerCallback.

◆ OnPreExecuteCommandGroup()

void EMStudio::ActionHistoryCallback::OnPreExecuteCommandGroup ( MCore::CommandGroup group,
bool  undo 
)
overridevirtual

This callback is executed before we are going to execute a given command group.

Parameters
groupThe group that is about to be executed, or nullptr when it is not a group but a regular command.
undoTrue in case the command group has been executed already and is now being undone, false in case the command group is normally executed.

Implements MCore::CommandManagerCallback.

◆ OnRemoveCommand()

void EMStudio::ActionHistoryCallback::OnRemoveCommand ( size_t  historyIndex)
overridevirtual

This callback is executed when a command is being removed from the command history.

Parameters
historyIndexThe history index of the command that is being removed.

Implements MCore::CommandManagerCallback.

◆ OnSetCurrentCommand()

void EMStudio::ActionHistoryCallback::OnSetCurrentCommand ( size_t  index)
overridevirtual

This callback is executed when we step back or forth in the command history.

Parameters
indexThe new history index which will be the current state the system will be in.

Implements MCore::CommandManagerCallback.


The documentation for this class was generated from the following file: