Open 3D Engine AzToolsFramework 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.
AzToolsFramework::ActionManagerInterface Class Referenceabstract

#include <ActionManagerInterface.h>

Inherited by AzToolsFramework::ActionManager [private].

Public Member Functions

 AZ_RTTI (ActionManagerInterface, "{2E2A421E-0842-4F90-9F5C-DDE0C4F820DE}")
 
virtual ActionManagerOperationResult RegisterActionContext (const AZStd::string &contextIdentifier, const ActionContextProperties &properties)=0
 
virtual bool IsActionContextRegistered (const AZStd::string &contextIdentifier) const =0
 
virtual ActionManagerOperationResult RegisterActionContextMode (const AZStd::string &actionContextIdentifier, const AZStd::string &modeIdentifier)=0
 
virtual ActionManagerOperationResult RegisterAction (const AZStd::string &contextIdentifier, const AZStd::string &actionIdentifier, const ActionProperties &properties, AZStd::function< void()> handler)=0
 
virtual ActionManagerOperationResult RegisterCheckableAction (const AZStd::string &contextIdentifier, const AZStd::string &actionIdentifier, const ActionProperties &properties, AZStd::function< void()> handler, AZStd::function< bool()> checkStateCallback)=0
 
virtual bool IsActionRegistered (const AZStd::string &actionIdentifier) const =0
 
virtual ActionManagerGetterResult GetActionName (const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerOperationResult SetActionName (const AZStd::string &actionIdentifier, const AZStd::string &name)=0
 
virtual ActionManagerGetterResult GetActionDescription (const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerOperationResult SetActionDescription (const AZStd::string &actionIdentifier, const AZStd::string &description)=0
 
virtual ActionManagerGetterResult GetActionCategory (const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerOperationResult SetActionCategory (const AZStd::string &actionIdentifier, const AZStd::string &category)=0
 
virtual ActionManagerGetterResult GetActionIconPath (const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerOperationResult SetActionIconPath (const AZStd::string &actionIdentifier, const AZStd::string &iconPath)=0
 
virtual int GenerateActionAlphabeticalSortKey (const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerBooleanResult IsActionEnabled (const AZStd::string &actionIdentifier) const =0
 
virtual ActionManagerOperationResult TriggerAction (const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerOperationResult InstallEnabledStateCallback (const AZStd::string &actionIdentifier, AZStd::function< bool()> enabledStateCallback)=0
 
virtual ActionManagerOperationResult UpdateAction (const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerOperationResult RegisterActionUpdater (const AZStd::string &actionUpdaterIdentifier)=0
 
virtual ActionManagerOperationResult AddActionToUpdater (const AZStd::string &actionUpdaterIdentifier, const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerOperationResult TriggerActionUpdater (const AZStd::string &actionUpdaterIdentifier)=0
 
virtual ActionManagerOperationResult RegisterWidgetAction (const AZStd::string &widgetActionIdentifier, const WidgetActionProperties &properties, AZStd::function< QWidget *()> generator)=0
 
virtual bool IsWidgetActionRegistered (const AZStd::string &widgetActionIdentifier) const =0
 
virtual ActionManagerGetterResult GetWidgetActionName (const AZStd::string &widgetActionIdentifier)=0
 
virtual ActionManagerOperationResult SetWidgetActionName (const AZStd::string &widgetActionIdentifier, const AZStd::string &name)=0
 
virtual ActionManagerGetterResult GetWidgetActionCategory (const AZStd::string &widgetActionIdentifier)=0
 
virtual ActionManagerOperationResult SetWidgetActionCategory (const AZStd::string &widgetActionIdentifier, const AZStd::string &category)=0
 
virtual ActionManagerOperationResult AssignModeToAction (const AZStd::string &modeIdentifier, const AZStd::string &actionIdentifier)=0
 
virtual ActionManagerBooleanResult IsActionActiveInCurrentMode (const AZStd::string &actionIdentifier) const =0
 
virtual ActionManagerOperationResult SetActiveActionContextMode (const AZStd::string &actionContextIdentifier, const AZStd::string &modeIdentifier)=0
 
virtual ActionManagerGetterResult GetActiveActionContextMode (const AZStd::string &actionContextIdentifier) const =0
 

Detailed Description

ActionManagerInterface Interface to register and trigger actions in the Editor.

Member Function Documentation

◆ AddActionToUpdater()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::AddActionToUpdater ( const AZStd::string &  actionUpdaterIdentifier,
const AZStd::string &  actionIdentifier 
)
pure virtual

Adds an action identifier to the updater's list.

Parameters
actionUpdaterIdentifierThe identifier for the updater to add the action to.
actionIdentifierThe identifier for the action to add the updater's list.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ AssignModeToAction()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::AssignModeToAction ( const AZStd::string &  modeIdentifier,
const AZStd::string &  actionIdentifier 
)
pure virtual

Sets an additional mode for an action via its identifier.

Parameters
modeIdentifierThe action context mode identifier to add to the action.
actionIdentifierThe action to set the mode to.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ GenerateActionAlphabeticalSortKey()

virtual int AzToolsFramework::ActionManagerInterface::GenerateActionAlphabeticalSortKey ( const AZStd::string &  actionIdentifier)
pure virtual

Generates a sort key from the action's name that can be used to sort alphabetically.

Parameters
actionIdentifierThe action identifier to query.
Returns
A sortKey if the action was found, or the max integer otherwise.

◆ GetActionCategory()

virtual ActionManagerGetterResult AzToolsFramework::ActionManagerInterface::GetActionCategory ( const AZStd::string &  actionIdentifier)
pure virtual

Get an Action's category via its identifier.

Parameters
actionIdentifierThe action identifier to get the value from.
Returns
A successful outcome object containing the value, or a string with a message detailing the error in case of failure.

◆ GetActionDescription()

virtual ActionManagerGetterResult AzToolsFramework::ActionManagerInterface::GetActionDescription ( const AZStd::string &  actionIdentifier)
pure virtual

Get an Action's description via its identifier.

Parameters
actionIdentifierThe action identifier to get the value from.
Returns
A successful outcome object containing the value, or a string with a message detailing the error in case of failure.

◆ GetActionIconPath()

virtual ActionManagerGetterResult AzToolsFramework::ActionManagerInterface::GetActionIconPath ( const AZStd::string &  actionIdentifier)
pure virtual

Get an Action's icon path via its identifier.

Parameters
actionIdentifierThe action identifier to get the value from.
Returns
A successful outcome object containing the value, or a string with a message detailing the error in case of failure.

◆ GetActionName()

virtual ActionManagerGetterResult AzToolsFramework::ActionManagerInterface::GetActionName ( const AZStd::string &  actionIdentifier)
pure virtual

Get an Action's name via its identifier.

Parameters
actionIdentifierThe action identifier to get the value from.
Returns
A successful outcome object containing the value, or a string with a message detailing the error in case of failure.

◆ GetActiveActionContextMode()

virtual ActionManagerGetterResult AzToolsFramework::ActionManagerInterface::GetActiveActionContextMode ( const AZStd::string &  actionContextIdentifier) const
pure virtual

Gets the active mode for an action context via its identifier.

Parameters
actionContextIdentifierThe action context to get the active mode of.
Returns
A successful outcome object containing the value, or a string with a message detailing the error in case of failure.

◆ GetWidgetActionCategory()

virtual ActionManagerGetterResult AzToolsFramework::ActionManagerInterface::GetWidgetActionCategory ( const AZStd::string &  widgetActionIdentifier)
pure virtual

Get a Widget Action's category via its identifier.

Parameters
widgetActionIdentifierThe widget action identifier to get the value from.
Returns
A successful outcome object containing the value, or a string with a message detailing the error in case of failure.

◆ GetWidgetActionName()

virtual ActionManagerGetterResult AzToolsFramework::ActionManagerInterface::GetWidgetActionName ( const AZStd::string &  widgetActionIdentifier)
pure virtual

Get a Widget Action's name via its identifier.

Parameters
widgetActionIdentifierThe widget action identifier to get the value from.
Returns
A successful outcome object containing the value, or a string with a message detailing the error in case of failure.

◆ InstallEnabledStateCallback()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::InstallEnabledStateCallback ( const AZStd::string &  actionIdentifier,
AZStd::function< bool()>  enabledStateCallback 
)
pure virtual

Installs an enabled state callback to an action that will set its enabled state when the action is updated. An action can only have a single enabled state callback. The function will fail if called multiple times.

Parameters
actionIdentifierThe identifier for the action to install the callback to.

◆ IsActionActiveInCurrentMode()

virtual ActionManagerBooleanResult AzToolsFramework::ActionManagerInterface::IsActionActiveInCurrentMode ( const AZStd::string &  actionIdentifier) const
pure virtual

Returns whether the Action is active in the Mode its Action Context is currently in.

Parameters
actionIdentifierThe action to query.
Returns
A successful outcome object with the result, or a string with a message detailing the error in case of failure.

◆ IsActionContextRegistered()

virtual bool AzToolsFramework::ActionManagerInterface::IsActionContextRegistered ( const AZStd::string &  contextIdentifier) const
pure virtual

Returns whether an action context with the identifier queried is registered to the Action Manager.

Parameters
contextIdentifierThe identifier for the action context to query.
Returns
True if an Action Context with the identifier provided was found, false otherwise.

◆ IsActionEnabled()

virtual ActionManagerBooleanResult AzToolsFramework::ActionManagerInterface::IsActionEnabled ( const AZStd::string &  actionIdentifier) const
pure virtual

Returns the enabled state for the action.

Parameters
actionIdentifierThe action identifier to query.
Returns
A successful outcome object with the enabled state, or a string with a message detailing the error in case of failure.

◆ IsActionRegistered()

virtual bool AzToolsFramework::ActionManagerInterface::IsActionRegistered ( const AZStd::string &  actionIdentifier) const
pure virtual

Returns whether an action with the identifier queried is registered to the Action Manager.

Parameters
actionIdentifierThe identifier for the action to query.
Returns
True if an Action with the identifier provided was found, false otherwise.

◆ IsWidgetActionRegistered()

virtual bool AzToolsFramework::ActionManagerInterface::IsWidgetActionRegistered ( const AZStd::string &  widgetActionIdentifier) const
pure virtual

Returns whether a widget action with the identifier queried is registered to the Action Manager.

Parameters
widgetActionIdentifierThe identifier for the widget action to query.
Returns
True if a WidgetAction with the identifier provided was found, false otherwise.

◆ RegisterAction()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::RegisterAction ( const AZStd::string &  contextIdentifier,
const AZStd::string &  actionIdentifier,
const ActionProperties properties,
AZStd::function< void()>  handler 
)
pure virtual

Register a new Action to the Action Manager.

Parameters
contextIdentifierThe identifier for the action context the newly registered action should be added to.
actionIdentifierThe identifier for the newly registered action.
propertiesThe properties object for the newly registered action.
handlerThe handler function that should be called when the action is triggered.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RegisterActionContext()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::RegisterActionContext ( const AZStd::string &  contextIdentifier,
const ActionContextProperties properties 
)
pure virtual

Register a new Action Context to the Action Manager.

Parameters
contextIdentifierThe identifier for the newly registered action context.
propertiesThe properties object for the newly registered action context.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RegisterActionContextMode()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::RegisterActionContextMode ( const AZStd::string &  actionContextIdentifier,
const AZStd::string &  modeIdentifier 
)
pure virtual

Register a new Mode for an Action Context to the Action Manager.

Parameters
actionContextIdentifierThe identifier for the action context the newly registered mode should be added to.
modeIdentifierThe new value for the category property of the widget action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RegisterActionUpdater()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::RegisterActionUpdater ( const AZStd::string &  actionUpdaterIdentifier)
pure virtual

Register a new Action Updater to the Action Manager. An Action Updater stores a list of Action identifiers that will be updated when the Updater condition is met. The system that registers the Action Updater is expected to trigger the TriggerActionUpdater function appropriately.

Parameters
actionUpdaterIdentifierThe identifier for the newly registered action updater.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RegisterCheckableAction()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::RegisterCheckableAction ( const AZStd::string &  contextIdentifier,
const AZStd::string &  actionIdentifier,
const ActionProperties properties,
AZStd::function< void()>  handler,
AZStd::function< bool()>  checkStateCallback 
)
pure virtual

Register a new Checkable Action to the Action Manager.

Parameters
contextIdentifierThe identifier for the action context the newly registered action should be added to.
actionIdentifierThe identifier for the newly registered action.
propertiesThe properties object for the newly registered action.
handlerThe handler function that should be called when the action is triggered.
checkStateCallbackThe handler function that will be called when the action's checked state needs to be updated. Returns a boolean that will be used to set the checked value of the action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RegisterWidgetAction()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::RegisterWidgetAction ( const AZStd::string &  widgetActionIdentifier,
const WidgetActionProperties properties,
AZStd::function< QWidget *()>  generator 
)
pure virtual

Register a new Widget Action to the Action Manager.

Parameters
widgetActionIdentifierThe identifier for the newly registered widget action.
propertiesThe properties object for the newly registered widget action.
generatorThe generator function that will be called to create the widget when invoked.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ SetActionCategory()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::SetActionCategory ( const AZStd::string &  actionIdentifier,
const AZStd::string &  category 
)
pure virtual

Set an Action's category via its identifier.

Parameters
actionIdentifierThe action identifier to set the value to.
categoryThe new value for the category property of the action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ SetActionDescription()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::SetActionDescription ( const AZStd::string &  actionIdentifier,
const AZStd::string &  description 
)
pure virtual

Set an Action's description via its identifier.

Parameters
actionIdentifierThe action identifier to set the value to.
descriptionThe new value for the description property of the action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ SetActionIconPath()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::SetActionIconPath ( const AZStd::string &  actionIdentifier,
const AZStd::string &  iconPath 
)
pure virtual

Set an Action's icon path via its identifier.

Parameters
actionIdentifierThe action identifier to set the value to.
iconPathThe new value for the icon path property of the action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ SetActionName()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::SetActionName ( const AZStd::string &  actionIdentifier,
const AZStd::string &  name 
)
pure virtual

Set an Action's name via its identifier.

Parameters
actionIdentifierThe action identifier to set the value to.
nameThe new value for the name property of the action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ SetActiveActionContextMode()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::SetActiveActionContextMode ( const AZStd::string &  actionContextIdentifier,
const AZStd::string &  modeIdentifier 
)
pure virtual

Sets the active mode for an action context via its identifier.

Parameters
actionContextIdentifierThe action context to set the active mode to.
modeIdentifierThe action context mode identifier to set as active.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ SetWidgetActionCategory()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::SetWidgetActionCategory ( const AZStd::string &  widgetActionIdentifier,
const AZStd::string &  category 
)
pure virtual

Set a Widget Action's category via its identifier.

Parameters
widgetActionIdentifierThe widget action identifier to set the value to.
categoryThe new value for the category property of the widget action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ SetWidgetActionName()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::SetWidgetActionName ( const AZStd::string &  widgetActionIdentifier,
const AZStd::string &  name 
)
pure virtual

Set a Widget Action's name via its identifier.

Parameters
widgetActionIdentifierThe widget action identifier to set the value to.
nameThe new value for the name property of the widget action.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ TriggerAction()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::TriggerAction ( const AZStd::string &  actionIdentifier)
pure virtual

Trigger an Action via its identifier.

Parameters
actionIdentifierThe identifier for the action to trigger.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ TriggerActionUpdater()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::TriggerActionUpdater ( const AZStd::string &  actionUpdaterIdentifier)
pure virtual

Trigger an update on all actions registered to the Action Updater.

Parameters
actionUpdaterIdentifierThe identifier for the action updater to trigger an update on.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ UpdateAction()

virtual ActionManagerOperationResult AzToolsFramework::ActionManagerInterface::UpdateAction ( const AZStd::string &  actionIdentifier)
pure virtual

Update the state of an Action via its identifier. This will update both the enabled and checked state.

Parameters
actionIdentifierThe identifier for the action to update.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

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