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

#include <MenuManagerInterface.h>

Inherited by AzToolsFramework::MenuManager [private].

Public Member Functions

 AZ_RTTI (MenuManagerInterface, "{D70B7989-62BD-447E-ADF6-0971EC4B7DEE}")
 
virtual MenuManagerOperationResult RegisterMenu (const AZStd::string &menuIdentifier, const MenuProperties &properties)=0
 
virtual MenuManagerOperationResult RegisterMenuBar (const AZStd::string &menuBarIdentifier, QMainWindow *mainWindow)=0
 
virtual bool IsMenuRegistered (const AZStd::string &menuIdentifier) const =0
 
virtual MenuManagerOperationResult AddActionToMenu (const AZStd::string &menuIdentifier, const AZStd::string &actionIdentifier, int sortIndex)=0
 
virtual MenuManagerOperationResult AddActionsToMenu (const AZStd::string &menuIdentifier, const AZStd::vector< AZStd::pair< AZStd::string, int > > &actions)=0
 
virtual MenuManagerOperationResult RemoveActionFromMenu (const AZStd::string &menuIdentifier, const AZStd::string &actionIdentifier)=0
 
virtual MenuManagerOperationResult RemoveActionsFromMenu (const AZStd::string &menuIdentifier, const AZStd::vector< AZStd::string > &actionIdentifiers)=0
 
virtual MenuManagerOperationResult AddSeparatorToMenu (const AZStd::string &menuIdentifier, int sortIndex)=0
 
virtual MenuManagerOperationResult AddSubMenuToMenu (const AZStd::string &menuIdentifier, const AZStd::string &subMenuIdentifier, int sortIndex)=0
 
virtual MenuManagerOperationResult AddSubMenusToMenu (const AZStd::string &menuIdentifier, const AZStd::vector< AZStd::pair< AZStd::string, int > > &subMenus)=0
 
virtual MenuManagerOperationResult RemoveSubMenuFromMenu (const AZStd::string &menuIdentifier, const AZStd::string &subMenuIdentifier)=0
 
virtual MenuManagerOperationResult RemoveSubMenusFromMenu (const AZStd::string &menuIdentifier, const AZStd::vector< AZStd::string > &subMenuIdentifiers)=0
 
virtual MenuManagerOperationResult AddWidgetToMenu (const AZStd::string &menuIdentifier, const AZStd::string &widgetActionIdentifier, int sortIndex)=0
 
virtual MenuManagerOperationResult AddMenuToMenuBar (const AZStd::string &menuBarIdentifier, const AZStd::string &menuIdentifier, int sortIndex)=0
 
virtual MenuManagerIntegerResult GetSortKeyOfActionInMenu (const AZStd::string &menuIdentifier, const AZStd::string &actionIdentifier) const =0
 
virtual MenuManagerIntegerResult GetSortKeyOfSubMenuInMenu (const AZStd::string &menuIdentifier, const AZStd::string &subMenuIdentifier) const =0
 
virtual MenuManagerIntegerResult GetSortKeyOfWidgetInMenu (const AZStd::string &menuIdentifier, const AZStd::string &widgetActionIdentifier) const =0
 
virtual MenuManagerIntegerResult GetSortKeyOfMenuInMenuBar (const AZStd::string &menuBarIdentifier, const AZStd::string &menuIdentifier) const =0
 
virtual MenuManagerOperationResult DisplayMenuAtScreenPosition (const AZStd::string &menuIdentifier, const QPoint &screenPosition) const =0
 
virtual MenuManagerOperationResult DisplayMenuUnderCursor (const AZStd::string &menuIdentifier) const =0
 

Detailed Description

MenuManagerInterface Interface to register and manage menus in the Editor.

Member Function Documentation

◆ AddActionsToMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::AddActionsToMenu ( const AZStd::string &  menuIdentifier,
const AZStd::vector< AZStd::pair< AZStd::string, int > > &  actions 
)
pure virtual

Add multiple Actions to a Menu.

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

◆ AddActionToMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::AddActionToMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  actionIdentifier,
int  sortIndex 
)
pure virtual

Add an Action to a Menu. Will prompt an update of the menu.

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

◆ AddMenuToMenuBar()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::AddMenuToMenuBar ( const AZStd::string &  menuBarIdentifier,
const AZStd::string &  menuIdentifier,
int  sortIndex 
)
pure virtual

Add a Menu to a Menu Bar.

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

◆ AddSeparatorToMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::AddSeparatorToMenu ( const AZStd::string &  menuIdentifier,
int  sortIndex 
)
pure virtual

Add a Separator to a Menu.

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

◆ AddSubMenusToMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::AddSubMenusToMenu ( const AZStd::string &  menuIdentifier,
const AZStd::vector< AZStd::pair< AZStd::string, int > > &  subMenus 
)
pure virtual

Add multiple Sub-Menus to a Menu.

Parameters
menuIdentifierThe identifier for the menu the sub-menus are being added to.
actionsA vector of pairs of identifiers for the sub-menus to add to the menu and their sort position.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ AddSubMenuToMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::AddSubMenuToMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  subMenuIdentifier,
int  sortIndex 
)
pure virtual

Add a Sub-Menu to a Menu.

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

◆ AddWidgetToMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::AddWidgetToMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  widgetActionIdentifier,
int  sortIndex 
)
pure virtual

Add a Widget to a Menu.

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

◆ DisplayMenuAtScreenPosition()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::DisplayMenuAtScreenPosition ( const AZStd::string &  menuIdentifier,
const QPoint &  screenPosition 
) const
pure virtual

Show the menu at the position provided.

Parameters
menuIdentifierThe identifier for the menu to display.
screenPositionThe position where the menu should appear.
Returns
A successful outcome object if the menu could be displayed, or a string with a message detailing the error in case of failure.

◆ DisplayMenuUnderCursor()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::DisplayMenuUnderCursor ( const AZStd::string &  menuIdentifier) const
pure virtual

Show the menu under the mouse cursor.

Parameters
menuIdentifierThe identifier for the menu to display.
Returns
A successful outcome object if the menu could be displayed, or a string with a message detailing the error in case of failure.

◆ GetSortKeyOfActionInMenu()

virtual MenuManagerIntegerResult AzToolsFramework::MenuManagerInterface::GetSortKeyOfActionInMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  actionIdentifier 
) const
pure virtual

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

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

◆ GetSortKeyOfMenuInMenuBar()

virtual MenuManagerIntegerResult AzToolsFramework::MenuManagerInterface::GetSortKeyOfMenuInMenuBar ( const AZStd::string &  menuBarIdentifier,
const AZStd::string &  menuIdentifier 
) const
pure virtual

Retrieve the sort key of a sub-menu in a menu from its identifier.

Parameters
menuBarIdentifierThe identifier for the menu bar to query.
menuIdentifierThe identifier for the menu whose sort key to get in the menu bar.
Returns
A successful outcome object containing the sort key, or a string with a message detailing the error in case of failure.

◆ GetSortKeyOfSubMenuInMenu()

virtual MenuManagerIntegerResult AzToolsFramework::MenuManagerInterface::GetSortKeyOfSubMenuInMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  subMenuIdentifier 
) const
pure virtual

Retrieve the sort key of a sub-menu in a menu from its identifier.

Parameters
menuIdentifierThe identifier for the menu to query.
subMenuIdentifierThe identifier for the sub-menu whose sort key to get in the menu.
Returns
A successful outcome object containing the sort key, or a string with a message detailing the error in case of failure.

◆ GetSortKeyOfWidgetInMenu()

virtual MenuManagerIntegerResult AzToolsFramework::MenuManagerInterface::GetSortKeyOfWidgetInMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  widgetActionIdentifier 
) const
pure virtual

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

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

◆ IsMenuRegistered()

virtual bool AzToolsFramework::MenuManagerInterface::IsMenuRegistered ( const AZStd::string &  menuIdentifier) const
pure virtual

Returns whether a menu with the identifier queried is registered to the Menu Manager.

Parameters
menuIdentifierThe identifier for the menu to query.
Returns
True if a Menu with the identifier provided was found, false otherwise.

◆ RegisterMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::RegisterMenu ( const AZStd::string &  menuIdentifier,
const MenuProperties properties 
)
pure virtual

Register a new Menu to the Menu Manager.

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

◆ RegisterMenuBar()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::RegisterMenuBar ( const AZStd::string &  menuBarIdentifier,
QMainWindow *  mainWindow 
)
pure virtual

Register a new Menu Bar to the Menu Manager.

Parameters
menuBarIdentifierThe identifier for the menu bar that is being registered.
mainWindowPointer to the QMainWindow to associate the menu bar with.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RemoveActionFromMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::RemoveActionFromMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  actionIdentifier 
)
pure virtual

Removes an Action from a Menu.

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

◆ RemoveActionsFromMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::RemoveActionsFromMenu ( const AZStd::string &  menuIdentifier,
const AZStd::vector< AZStd::string > &  actionIdentifiers 
)
pure virtual

Removes multiple Actions from a Menu.

Parameters
menuIdentifierThe identifier for the menu the actions are being removed from.
actionIdentifiersA vector of identifiers for the actions to remove from the menu.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RemoveSubMenuFromMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::RemoveSubMenuFromMenu ( const AZStd::string &  menuIdentifier,
const AZStd::string &  subMenuIdentifier 
)
pure virtual

Removes a Sub-Menu from a Menu.

Parameters
menuIdentifierThe identifier for the menu the sub-menu is being removed from.
subMenuIdentifierThe identifier for the sub-menu to remove from the menu.
Returns
A successful outcome object, or a string with a message detailing the error in case of failure.

◆ RemoveSubMenusFromMenu()

virtual MenuManagerOperationResult AzToolsFramework::MenuManagerInterface::RemoveSubMenusFromMenu ( const AZStd::string &  menuIdentifier,
const AZStd::vector< AZStd::string > &  subMenuIdentifiers 
)
pure virtual

Removes multiple Sub-Menus from a Menu.

Parameters
menuIdentifierThe identifier for the menu the sub-menus are being removed from.
subMenuIdentifiersA vector of identifiers for the sub-menus to remove from the menu.
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: