User Tools

Site Tools


DzActionMenuItem

Class that encapsulates an 'Action Menu Item'.

More...

Inherits :

Enumerations

Properties

Methods

DAZ Script
DzActionMenugetSubMenu ()
voidloadFile ()
voidsetSubMenu ( DzActionMenu menu )

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 entry that activates a DzAction object
  • CustomAction - A menu entry that activates a custom action. See Also: DzActionMgr - for more about custom actions.
  • SubMenu - A menu entry that opens a submenu
  • FileOpenAction - A menu entry that opens a file, replacing the contents of the current scene See Also: DzContentMgr::openFile() - for more about opening a file.
  • FileMergeAction - A menu entry that merges a file with the current scene See Also: DzContentMgr::openFile() - for more about merging a file.

Properties


String : action

The action to perform for an item of the Action, CustomAction, FileOpenAction or FileMergeAction type


Boolean : isDefault

Whether the menu item is considered to be in a default location.

Since:

  • 4.6.0.83

String : label

The label to display within the interface for an item of the SubMenu, FileOpenAction or FileMergeAction type.

Since:

  • 4.6.0.76

String : subMenuLabel

Deprecated

Use label instead


Type : type

The type of the menu item (Read Only)

Return Value:

  • The type of the menu item

Methods


DzActionMenu : getSubMenu()

Return Value:

  • A pointer to the submenu that is displayed by this menu entry. This function returns NULL if the menu has not been set, or if the type of the item is not SubMenu.

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 entry is activated. The menu item takes ownership of the menu - the menu will be deleted when this item is destroyed.