DzPopupMenu Class Reference
[Interface Widget Objects]

DAZ Script popup menu widget. More...

Inheritance diagram for DzPopupMenu:

DzWidget List of all members.

Properties

Boolean checkable

Methods

void changeItem (Number id, pixmap pixmap)
void changeItem (Number id, String text)
void clear ()
Boolean connectItem (Number id, Object receiver, char member)
Boolean disconnectItem (Number id, Object receiver, char member)
Number exec (Point pos, Number indexAtPoint)
Number exec ()
Number idAt (Point pos)
Number idAt (Number index)
Number insertItem (DzWidget widget, Number id, Number index)
Number insertItem (pixmap pixmap, DzPopupMenu popup, Number id, Number index)
Number insertItem (pixmap pixmap, Number id, Number index)
Number insertItem (String text, DzPopupMenu popup, Number id, Number index)
Number insertItem (String text, Number id, Number index)
Number insertSeparator (Number index)
Number insertTearOffHandle (Number id, Number index)
Boolean isItemChecked (Number id)
Boolean isItemEnabled (Number id)
Boolean isItemVisible (Number id)
Number itemParameter (Number id)
Pixmap pixmap (Number id)
void popup (Point pos, Number indexAtPoint)
void removeItem (Number id)
void removeItemAt (Number index)
void setActiveItem (Number i)
void setItemChecked (Number id, Boolean check)
void setItemEnabled (Number id, Boolean enable)
Boolean setItemParameter (Number id, Number param)
void setItemVisible (Number id, Boolean visible)
void setWhatsThis (Number id, String text)
String text (Number id)
void updateItem (Number id)
String whatsThis (Number id)

Constructors

 DzPopupMenu (DzWidget parent)

Signals

void aboutToHide ()
 Signature: "aboutToHide()"
void aboutToShow ()
 Signature: "aboutToShow()"
void activated ()
 Signature: "activated()"
void highlighted ()
 Signature: "highlighted()"

Detailed Description

DAZ Script popup menu widget.

This class provides ta popup menu widget.


Constructor & Destructor Documentation

DzPopupMenu::DzPopupMenu ( DzWidget  parent  ) 

Creates a popup menu with the given parent widget


Member Function Documentation

void DzPopupMenu::aboutToHide (  )  [signal]

Signature: "aboutToHide()"

This signal is emitted just before the popup menu is hidden after it has been displayed.

void DzPopupMenu::aboutToShow (  )  [signal]

Signature: "aboutToShow()"

This signal is emitted just before the popup menu is displayed. You can connect it to any slot that sets up the menu contents (e.g. to ensure that the right items are enabled).

void DzPopupMenu::activated (  )  [signal]

Signature: "activated()"

This signal is emitted when a menu item is selected; id is the id of the selected item.

void DzPopupMenu::changeItem ( Number  id,
pixmap  pixmap 
)

Changes the text of the menu item id to text. If the item has an icon, the icon remains unchanged. Changes the pixmap of the menu item id to the pixmap pixmap.

void DzPopupMenu::changeItem ( Number  id,
String  text 
)

Changes the text of the menu item id to text. If the item has an icon, the icon remains unchanged.

void DzPopupMenu::clear (  ) 

Removes all menu items.

Boolean DzPopupMenu::connectItem ( Number  id,
Object  receiver,
char  member 
)

Connects the menu item with identifier id to receiver's member slot or signal. The receiver's slot (or signal) is activated when the menu item is activated.

Boolean DzPopupMenu::disconnectItem ( Number  id,
Object  receiver,
char  member 
)

Disconnects the receiver's member from the menu item with identifier id. All connections are removed when the menu data object is destroyed.

Number DzPopupMenu::exec ( Point  pos,
Number  indexAtPoint 
)

Executes this popup synchronously. Opens the popup menu so that the item number indexAtPoint will be at the specified global position pos.

int DzPopupMenu::exec (  ) 

Executes this popup synchronously. In most situations you'll want to specify the position yourself, for example at the current mouse position.

void DzPopupMenu::highlighted (  )  [signal]

Signature: "highlighted()"

This signal is emitted when a menu item is highlighted; id is the id of the highlighted item.

Number DzPopupMenu::idAt ( Point  pos  ) 

Returns:
The the id of the item at pos, or -1 if there is no item there or if it is a separator.

Number DzPopupMenu::idAt ( Number  index  ) 

Returns:
The identifier of the menu item at position index in the internal list, or -1 if index is out of range.

Number DzPopupMenu::insertItem ( DzWidget  widget,
Number  id,
Number  index 
)

Inserts a menu item that consists of the widget widget with optional id id, and optional index position.

Number DzPopupMenu::insertItem ( pixmap  pixmap,
DzPopupMenu  popup,
Number  id,
Number  index 
)

Inserts a menu item with pixmap pixmap, submenu popup, optional id id, and optional index position.

Number DzPopupMenu::insertItem ( pixmap  pixmap,
Number  id,
Number  index 
)

Inserts a menu item with pixmap pixmap, optional id id, and optional index position.

Number DzPopupMenu::insertItem ( String  text,
DzPopupMenu  popup,
Number  id,
Number  index 
)

Inserts a menu item with text text, submenu popup, optional id id, and optional index position.

Number DzPopupMenu::insertItem ( String  text,
Number  id,
Number  index 
)

Inserts a menu item with text text, optional id id, and optional index position.

Number DzPopupMenu::insertSeparator ( Number  index  ) 

Inserts a separator at position index, and returns the menu identifier number allocated to it. The separator becomes the last menu item if index is negative.

Number DzPopupMenu::insertTearOffHandle ( Number  id,
Number  index 
)

Inserts a tear-off handle into the menu. A tear-off handle is a special menu item that creates a copy of the menu when the menu is selected. This "torn-off" copy lives in a separate window. It contains the same menu items as the original menu, with the exception of the tear-off handle.

Boolean DzPopupMenu::isItemChecked ( Number  id  ) 

Returns:
TRUE if the menu item with the id id has been checked; otherwise returns FALSE.

Boolean DzPopupMenu::isItemEnabled ( Number  id  ) 

Returns:
TRUE if the item with identifier id is enabled; otherwise returns FALSE

Boolean DzPopupMenu::isItemVisible ( Number  id  ) 

Returns:
TRUE if the menu item with the id id is visible; otherwise returns FALSE.

Number DzPopupMenu::itemParameter ( Number  id  ) 

Returns:
The parameter of the activation signal of item id.

Pixmap DzPopupMenu::pixmap ( Number  id  ) 

Returns:
The pixmap that has been set for menu item id, or 0 if no pixmap has been set.

void DzPopupMenu::popup ( Point  pos,
Number  indexAtPoint 
)

Displays the popup menu so that the item number indexAtPoint will be at the specified global position pos.

void DzPopupMenu::removeItem ( Number  id  ) 

Removes the menu item that has the identifier id.

void DzPopupMenu::removeItemAt ( Number  index  ) 

Removes the menu item at position index.

void DzPopupMenu::setActiveItem ( Number  i  ) 

Sets the currently active item to index i and repaints as necessary.

void DzPopupMenu::setItemChecked ( Number  id,
Boolean  check 
)

If check is TRUE, checks the menu item with id id; otherwise unchecks the menu item with id id. Calls DzPopupMenu::setCheckable( TRUE ) if necessary.

void DzPopupMenu::setItemEnabled ( Number  id,
Boolean  enable 
)

If enable is TRUE, enables the menu item with identifier id; otherwise disables the menu item with identifier id.

Boolean DzPopupMenu::setItemParameter ( Number  id,
Number  param 
)

Sets the parameter of the activation signal of item id to param.

void DzPopupMenu::setItemVisible ( Number  id,
Boolean  visible 
)

If visible is TRUE, shows the menu item with id id; otherwise hides the menu item with id id.

void DzPopupMenu::setWhatsThis ( Number  id,
String  text 
)

Sets text as What's This help for the menu item with identifier id.

String DzPopupMenu::text ( Number  id  ) 

Returns:
The text that has been set for menu item id, or String::null if no text has been set.

void DzPopupMenu::updateItem ( Number  id  ) 

Updates the item with identity id.

String DzPopupMenu::whatsThis ( Number  id  ) 

Returns:
The What's This help text for the item with identifier id or String::null if no text has yet been defined.


Member Data Documentation

Boolean DzPopupMenu::checkable

This property holds whether the display of check marks on menu items is enabled. When TRUE, the display of check marks on menu items is enabled. Checking is always enabled when in Windows-style. Holds whether the display of check marks on menu items is enabled.


Generated on Thu Sep 24 12:21:14 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.