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::ToolBarManagerInterface Class Referenceabstract

#include <ToolBarManagerInterface.h>

Inherited by AzToolsFramework::ToolBarManager [private].

Public Member Functions

 AZ_RTTI (ToolBarManagerInterface, "{2736A3CA-B260-4355-B61D-E287A3DB2A6F}")
 
virtual ToolBarManagerOperationResult RegisterToolBar (const AZStd::string &toolBarIdentifier, const ToolBarProperties &properties)=0
 
virtual ToolBarManagerOperationResult RegisterToolBarArea (const AZStd::string &toolBarAreaIdentifier, QMainWindow *mainWindow, Qt::ToolBarArea toolBarArea)=0
 
virtual ToolBarManagerOperationResult AddActionToToolBar (const AZStd::string &toolBarIdentifier, const AZStd::string &actionIdentifier, int sortIndex)=0
 
virtual ToolBarManagerOperationResult AddActionWithSubMenuToToolBar (const AZStd::string &toolBarIdentifier, const AZStd::string &actionIdentifier, const AZStd::string &subMenuIdentifier, int sortIndex)=0
 
virtual ToolBarManagerOperationResult AddActionsToToolBar (const AZStd::string &toolBarIdentifier, const AZStd::vector< AZStd::pair< AZStd::string, int > > &actions)=0
 
virtual ToolBarManagerOperationResult RemoveActionFromToolBar (const AZStd::string &toolBarIdentifier, const AZStd::string &actionIdentifier)=0
 
virtual ToolBarManagerOperationResult RemoveActionsFromToolBar (const AZStd::string &toolBarIdentifier, const AZStd::vector< AZStd::string > &actionIdentifiers)=0
 
virtual ToolBarManagerOperationResult AddSeparatorToToolBar (const AZStd::string &toolBarIdentifier, int sortIndex)=0
 
virtual ToolBarManagerOperationResult AddWidgetToToolBar (const AZStd::string &toolBarIdentifier, const AZStd::string &widgetActionIdentifier, int sortIndex)=0
 
virtual ToolBarManagerOperationResult AddToolBarToToolBarArea (const AZStd::string &toolBarAreaIdentifier, const AZStd::string &toolBarIdentifier, int sortIndex)=0
 
virtual QToolBar * GenerateToolBar (const AZStd::string &toolBarIdentifier)=0
 
virtual ToolBarManagerIntegerResult GetSortKeyOfActionInToolBar (const AZStd::string &toolBarIdentifier, const AZStd::string &actionIdentifier) const =0
 
virtual ToolBarManagerIntegerResult GetSortKeyOfWidgetInToolBar (const AZStd::string &toolBarIdentifier, const AZStd::string &widgetActionIdentifier) const =0
 

Detailed Description

ToolBarManagerInterface Interface to register and manage ToolBars in the Editor.

Member Function Documentation

◆ AddActionsToToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::AddActionsToToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::vector< AZStd::pair< AZStd::string, int > > &  actions 
)
pure virtual

Add multiple Actions to a ToolBar. Saves time as it only updates the toolbar once at the end.

Parameters
toolBarIdentifierThe identifier for the ToolBar the actions are being added to.
actionsA vector of pairs of identifiers for the actions to add to the toolbar and their sort position.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ AddActionToToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::AddActionToToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::string &  actionIdentifier,
int  sortIndex 
)
pure virtual

Add an Action to a ToolBar.

Parameters
toolBarIdentifierThe identifier for the ToolBar the action is being added to.
actionIdentifierThe identifier for the action to add to the ToolBar.
sortIndexAn integer defining the position the action should appear in the ToolBar.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ AddActionWithSubMenuToToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::AddActionWithSubMenuToToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::string &  actionIdentifier,
const AZStd::string &  subMenuIdentifier,
int  sortIndex 
)
pure virtual

Add an Action with a submenu to a ToolBar.

Parameters
toolBarIdentifierThe identifier for the ToolBar the action is being added to.
actionIdentifierThe identifier for the action to add to the ToolBar.
subMenuIdentifierThe identifier for the menu to add to the ToolBar next to the action.
sortIndexAn integer defining the position the action should appear in the ToolBar.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ AddSeparatorToToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::AddSeparatorToToolBar ( const AZStd::string &  toolBarIdentifier,
int  sortIndex 
)
pure virtual

Add a Separator to a ToolBar.

Parameters
toolBarIdentifierThe identifier for the ToolBar the separator is being added to.
sortIndexAn integer defining the position the separator should appear in the ToolBar.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ AddToolBarToToolBarArea()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::AddToolBarToToolBarArea ( const AZStd::string &  toolBarAreaIdentifier,
const AZStd::string &  toolBarIdentifier,
int  sortIndex 
)
pure virtual

Add a ToolBar to a ToolBar Area.

Parameters
toolBarAreaIdentifierThe identifier for the toolbar area the toolbar is being added to.
toolBarIdentifierThe identifier for the toolbar to add to the toolbar area.
sortIndexAn integer defining the position the toolbar should appear in the toolbar area.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ AddWidgetToToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::AddWidgetToToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::string &  widgetActionIdentifier,
int  sortIndex 
)
pure virtual

Add a Widget to a ToolBar.

Parameters
toolBarIdentifierThe identifier for the ToolBar the widget is being added to.
widgetActionIdentifierThe identifier for the widget to add to the ToolBar.
sortIndexAn integer defining the position the widget should appear in the ToolBar.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ GenerateToolBar()

virtual QToolBar * AzToolsFramework::ToolBarManagerInterface::GenerateToolBar ( const AZStd::string &  toolBarIdentifier)
pure virtual

Generate an instance of a ToolBar from its identifier. The requester should take care of correctly parenting and deleting the ToolBar once it is no longer needed. Note that the ToolBar Manager system will still retain control over the contents of the ToolBar and clear and re-populate it when necessary.

Parameters
toolBarIdentifierThe identifier for the ToolBar to generate.
Returns
A raw pointer to the new QToolBar object.

◆ GetSortKeyOfActionInToolBar()

virtual ToolBarManagerIntegerResult AzToolsFramework::ToolBarManagerInterface::GetSortKeyOfActionInToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::string &  actionIdentifier 
) const
pure virtual

Retrieve the sort key of an action in a toolbar from its identifier.

Parameters
toolBarIdentifierThe identifier for the toolbar to query.
actionIdentifierThe identifier for the action whose sort key to get in the toolbar.
Returns
A successful outcome object containing the sort key, or a string with a message detailing the error in case of failure.

◆ GetSortKeyOfWidgetInToolBar()

virtual ToolBarManagerIntegerResult AzToolsFramework::ToolBarManagerInterface::GetSortKeyOfWidgetInToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::string &  widgetActionIdentifier 
) const
pure virtual

Retrieve the sort key of a widget action in a toolbar from its identifier.

Parameters
toolBarIdentifierThe identifier for the toolbar to query.
widgetActionIdentifierThe identifier for the widget whose sort key to get in the toolbar.
Returns
A successful outcome object containing the sort key, or a string with a message detailing the error in case of failure.

◆ RegisterToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::RegisterToolBar ( const AZStd::string &  toolBarIdentifier,
const ToolBarProperties properties 
)
pure virtual

Register a new ToolBar to the ToolBar Manager.

Parameters
toolBarIdentifierThe identifier for the ToolBar that is being registered.
propertiesThe properties object for the newly registered ToolBar.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RegisterToolBarArea()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::RegisterToolBarArea ( const AZStd::string &  toolBarAreaIdentifier,
QMainWindow *  mainWindow,
Qt::ToolBarArea  toolBarArea 
)
pure virtual

Register a new ToolBar Area to the ToolBar Manager.

Parameters
toolBarAreaIdentifierThe identifier for the toolbar area that is being registered.
mainWindowPointer to the QMainWindow to associate the toolbar area with.
toolBarAreaEnum of which part of the QMainWindow the toolbar area will cover.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RemoveActionFromToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::RemoveActionFromToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::string &  actionIdentifier 
)
pure virtual

Removes an Action from a ToolBar.

Parameters
toolBarIdentifierThe identifier for the ToolBar the action is being removed from.
actionIdentifierThe identifier for the action to remove from the ToolBar.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RemoveActionsFromToolBar()

virtual ToolBarManagerOperationResult AzToolsFramework::ToolBarManagerInterface::RemoveActionsFromToolBar ( const AZStd::string &  toolBarIdentifier,
const AZStd::vector< AZStd::string > &  actionIdentifiers 
)
pure virtual

Removes multiple Actions from a Menu.

Parameters
toolBarIdentifierThe identifier for the ToolBar the actions are being removed from.
actionIdentifiersA vector of identifiers for the actions to remove from the ToolBar.
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: