Menu Popup node. More...
#include <DialogViz/dialog/SoMenuPopup.h>
Public Member Functions | |
SoMenuPopup () | |
void | addAuditor (SoDialogAuditor *auditor) |
void | removeAuditor (SoDialogAuditor *auditor) |
SoDialogViz * | searchForAuditorId (SbString id) |
virtual void | addChild (SoMenuItem *child) |
virtual void | insertChild (SoMenuItem *child, int newChildIndex) |
virtual SoNode * | getChild (int index) const |
virtual int | getNumChildren () const |
virtual int | findChild (const SoMenuItem *child) const |
virtual void | removeChild (int index) |
virtual void | removeChild (SoMenuItem *child) |
virtual void | removeAllChildren () |
virtual void | replaceChild (int index, SoMenuItem *newChild) |
virtual void | replaceChild (SoMenuItem *oldChild, SoMenuItem *newChild) |
This node creates either a pulldown menu if it is inserted in an SoMenuBar or a cascade menu mechanism if it is inserted in an SoMenuPopup. A SoMenuPopup node consists in a set of SoMenuItem nodes. You can add, insert and remove menu items (SoMenuItem) by using addChild(), insertChild() and removeChild() methods.
You can change the parts in any instance of this menu popup using setPart(). The default part geometries are defined as resources for this SoMenuPopup class. They are detailed below in the Catalog Parts section of the online reference page for this class. You can make your program use different default resources for the parts by copying the file $OIVHOME/data/DialogViz/Skins/default/MenuPopup.iv into your own directory, editing the file, and then setting the environment variable DIALOGVIZ_SKINS_DIR to be a path to that directory, or by using the setSkinDirectory() method in your application.
Group frame (from SoMenuItem)
Defines the item main frame geometry. Default size is set to (x, 18, z)
Switch frameSwitch {
Defines the geometry of the popup button.
This geometry is used only when SoMenuPopup has no parent or its parent is a SoMenuBar. Group released
Defines the shape when the popup is not activated.
Group pressed
Defines the popup when popup is openedThis geometry is used only when SoMenuPopup has its parent of type SoMenuPopup. Group shapeReleased
Defines the shape when the popup is not activated.
Group shapePressed
Defines the popup when popup is opened}
Group labelProp (from SoMenuItem)
Specifies the properties to apply to the text node representing the item label string
}
Extra information for parts from above structure
Part Name Resource Skin file frame MenuItemFrame MenuItem.iv released MenuPopupReleasedFrame MenuPopup.iv pressed MenuPopupPressedFrame MenuPopup.iv shapeReleased MenuPopupReleasedShape MenuPopup.iv shapePressed MenuPopupPressedShape MenuPopup.iv labelProp TextProperties TextProperties.iv
SoMenuItem, SoMenuCheckBox, SoMenuCheckBoxLauncher, SoMenuPushButton, SoMenuPushButtonLauncher, SoMenuFileSelection, SoMenuRadioButtons, SoMenuSeparator
SoMenuPopup::SoMenuPopup | ( | ) |
Constructor.
void SoMenuPopup::addAuditor | ( | SoDialogAuditor * | auditor | ) |
Add a dialogAuditor to current menuPopup component.
virtual void SoMenuPopup::addChild | ( | SoMenuItem * | child | ) | [virtual] |
Adds a child as last one in group.
virtual int SoMenuPopup::findChild | ( | const SoMenuItem * | child | ) | const [virtual] |
Finds index of given child within group.
Returns -1 if not found.
virtual SoNode* SoMenuPopup::getChild | ( | int | index | ) | const [virtual] |
Returns pointer to child node with the given index.
Reimplemented from SoBaseKit.
virtual int SoMenuPopup::getNumChildren | ( | ) | const [virtual] |
Returns number of children.
Reimplemented from SoBaseKit.
virtual void SoMenuPopup::insertChild | ( | SoMenuItem * | child, | |
int | newChildIndex | |||
) | [virtual] |
Adds a child so that it becomes the one with the given index.
virtual void SoMenuPopup::removeAllChildren | ( | ) | [virtual] |
Removes all children from group.
Reimplemented from SoBaseKit.
void SoMenuPopup::removeAuditor | ( | SoDialogAuditor * | auditor | ) |
Remove the defined DialogAuditor from the auditor list.
virtual void SoMenuPopup::removeChild | ( | SoMenuItem * | child | ) | [virtual] |
Removes first instance of given child from group.
virtual void SoMenuPopup::removeChild | ( | int | index | ) | [virtual] |
Removes child with given index from group.
Reimplemented from SoBaseKit.
virtual void SoMenuPopup::replaceChild | ( | SoMenuItem * | oldChild, | |
SoMenuItem * | newChild | |||
) | [virtual] |
Replaces first instance of given child with new child.
virtual void SoMenuPopup::replaceChild | ( | int | index, | |
SoMenuItem * | newChild | |||
) | [virtual] |
Replaces child with given index with new child.
SoDialogViz* SoMenuPopup::searchForAuditorId | ( | SbString | id | ) |
Retrieves the DialogViz object from the specified auditorID field in an SoMenuPopup structure.
NULL is returned if auditorID string is not found.