User Tools

Site Tools


DzActionMenu

Class that encapsulates a popup menu that contains DzActionMenuItems.

More...

Inherits :

Enumerations

Properties

DAZ Script
NumbermenuType

Methods

DAZ Script
voidclear ()
voidexec ()
voidexec ( Point pos )
DzActionMenufindSubMenu ( String label )
DzActionMenuItemgetItem ( Number which )
ArraygetItemList ()
NumbergetNumItems ()
DzActionMenugetSubMenu ( String label )
BooleanhasItems ()
voidinsertAction ( String className, Number at=-1 )
voidinsertCustomAction ( String guid, Number at=-1 )
voidinsertFileMergeAction ( String fileName, String label=“”, Number at=-1 )
voidinsertFileOpenAction ( String fileName, String label=“”, Number at=-1 )
voidinsertItem ( DzActionMenuItem item, Number at=-1 )
voidinsertMenu ( String label, DzActionMenu menu, Number at=-1 )
voidinsertSeparator ( Number where=-1 )
voidremoveItem ( DzActionMenuItem item )
voidsimplifySeparators ()

Signals

Detailed Description

Enumerations


: MenuType

TODO: Add description.

Properties


Number : menuType

The type of the menu (Read Only until 4.6.0.74)

Methods


void : clear()

Removes all items from the menu.


void : exec()

Displays the menu to the user


void : exec( Point pos )

Displays the menu to the user at the given position.

Parameter(s):

  • pos - The global window coordinates at which to display the popup menu.

DzActionMenu : findSubMenu( String label )

Parameter(s):

  • label - The label of the submenu to find.

Return Value:

  • A pointer to the submenu with the given label, NULL if no submenu with the label is found.

DzActionMenuItem : getItem( Number which )

Parameter(s):

  • which - The index of the item to return.

Return Value:

  • A pointer to the menu item at the given index, NULL if the index is invalid

Array : getItemList()

Return Value:


Number : getNumItems()

Return Value:

  • The number of items in the menu

DzActionMenu : getSubMenu( String label )

Parameter(s):

  • label - The label of the submenu to get.

Return Value:

  • A pointer to a submenu with the given label - if one does not already exist, it is created, and added to the end of the menu.

Boolean : hasItems()

Return Value:

  • true if there are items in this menu, false if the menu is empty.

void : insertAction( String className, Number at=-1 )

Inserts the given action into the menu at the given location.

Parameter(s):

  • className - The class name of the DzAction to insert into the menu
  • at - The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void : insertCustomAction( String guid, Number at=-1 )

Inserts the given custom action into the menu at the given location.

Parameter(s):

  • guid - The globally unique identifier for the custom action to insert into the menu
  • at - The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void : insertFileMergeAction( String fileName, String label=“”, Number at=-1 )

Inserts the given file merge action into the menu at the given location.

Parameter(s):

  • fileName - The path of the file to insert into the menu
  • label - The label to display within the interface; defaults to fileName if not specified
  • at - The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

Since:

  • 4.6.0.76

void : insertFileOpenAction( String fileName, String label=“”, Number at=-1 )

Inserts the given file open action into the menu at the given location.

Parameter(s):

  • fileName - The path of the file to insert into the menu
  • label - The label to display within the interface; defaults to fileName if not specified
  • at - The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

Since:

  • 4.6.0.76

void : insertItem( DzActionMenuItem item, Number at=-1 )

Inserts the given item into the menu at the given location.

Parameter(s):

  • item - The item to insert into the menu
  • at - The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void : insertMenu( String label, DzActionMenu menu, Number at=-1 )

Inserts the given menu into the menu at the given location as a submenu.

Parameter(s):

  • label - The label to display in this menu for the submenu item
  • menu - The submenu to insert into this menu; if null, a new menu is created at the given index.
  • at - The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void : insertSeparator( Number where=-1 )

Inserts a separator into the menu at the given location.

Parameter(s):

  • at - The index at which to insert the item, if the index is invalid (the default) the item is appended to the end of the menu.

void : removeItem( DzActionMenuItem item )

Remove the given item from the menu.

Parameter(s):

  • item - The item to remove from the menu

void : simplifySeparators()

Removes any duplicate separators from the menu by replacing two or more adjacent separators with a single separator.

Signals


void : itemListChanged()

Signature:“itemListChanged()”

Emitted when items are added to or removed from this menu