User Tools

Site Tools


DzActionMenuItem

Class that encapsulates an 'Action Menu Item'.

More...

Inherits :

Enumerations

Properties

Methods

Detailed Description

Action Menu Items are registered with a DzActionMenu and are available to access via methods on that class.

Enumerations


: Type

The types of action menu items.

  • Separator - A menu separator (i.e., horizontal divider).
  • Action - A menu item that activates a DzAction object.
  • CustomAction - A menu item that activates a custom action. See Also: DzActionMgr - for more about custom actions.
  • SubMenu - A menu item that opens a submenu.
  • FileOpenAction - A menu item that opens a file, replacing the contents of the current scene. See Also: DzContentMgr::openFile() - for more about opening a file.
  • FileMergeAction - A menu item that merges a file with the current scene. See Also: DzContentMgr::openFile() - for more about merging a file.

Properties


String : action

Holds the identifier for the Action (classname), CustomAction (GUID), FileOpenAction or FileMergeAction (file path) to perform.


Boolean : isDefault

Holds whether or not the menu item is considered to be placed by the application (true) or placed by the user (false).

Since:

  • 4.6.0.83

String : label

Holds the label displayed for the item.

Since:

  • 4.6.0.76 - Note: Prior to 4.12.1.68, items of the Action and CustomAction type would yeild an empty string.

Type : type

Holds the type of the menu item (Read Only)

Methods


DzActionMenu : getParentMenu()

Return Value:

  • The menu that this item is in.

Since:

  • 4.11.0.164

DzActionMenu : getSubMenu()

Return Value:

  • The submenu that is displayed by this menu item (if any), otherwise null.

void : loadFile()

Causes the file for a FileOpenAction or FileMergeAction item to load.

Since:

  • 4.6.0.44

void : setSubMenu( DzActionMenu menu )

Sets the menu that is displayed as the submenu when this menu item is activated. This call has no effect unless the type of this item is SubMenu.

Parameter(s):

  • menu - The menu that is displayed as a submenu when this menu item is activated. The menu item takes ownership of the menu - the menu will be deleted when this item is destroyed.