Menu bar node. More...
#include <DialogViz/dialog/SoMenuBar.h>
Public Member Functions | |
SoMenuBar () | |
void | addAuditor (SoDialogAuditor *auditor) |
void | removeAuditor (SoDialogAuditor *auditor) |
SoDialogViz * | searchForAuditorId (SbString id) |
virtual void | addChild (SoMenuPopup *child) |
virtual void | insertChild (SoMenuPopup *child, int newChildIndex) |
virtual SoNode * | getChild (int index) const |
virtual int | getNumChildren () const |
virtual int | findChild (const SoMenuPopup *child) const |
virtual void | removeChild (int index) |
virtual void | removeChild (SoMenuPopup *child) |
virtual void | removeAllChildren () |
virtual void | replaceChild (int index, SoMenuPopup *newChild) |
virtual void | replaceChild (SoMenuPopup *oldChild, SoMenuPopup *newChild) |
This node defines a menu bar component.
If several SoMenuBar objects are added to an SoTopLevelDialog, only the first one is used; the others are ignored. An SoMenuBar node consists of a set of SoMenuPopup nodes. You can add, insert, and remove popup menus (SoMenuPopup) by using the addChild(), insertChild(), and removeChild() methods.
You can change the parts in any instance of this menu bar using setPart(). The default part geometries are defined as resources for this SoMenuBar 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/MenuBar.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.
// fields from SoDialogViz | |
enable | TRUE |
label | "" |
labelAlignment | RIGHT |
auditorID | "" |
Group frame
Defines the geometry of the menu bar. Default size is set to (x, 20, z)
}
Extra information for parts from above structure
Part Name Resource Skin file frame MenuBarFrame MenuBar.iv
SoTopLevelDialog, SoMenuPopup, SoMenuItem
SoMenuBar::SoMenuBar | ( | ) |
Constructor.
void SoMenuBar::addAuditor | ( | SoDialogAuditor * | auditor | ) |
Adds a DialogAuditor to current menu bar component.
virtual void SoMenuBar::addChild | ( | SoMenuPopup * | child | ) | [virtual] |
Adds a child as last one in group.
virtual int SoMenuBar::findChild | ( | const SoMenuPopup * | child | ) | const [virtual] |
Finds index of given child within group.
Returns -1 if not found.
virtual SoNode* SoMenuBar::getChild | ( | int | index | ) | const [virtual] |
Returns pointer to child node with the given index.
Reimplemented from SoBaseKit.
virtual int SoMenuBar::getNumChildren | ( | ) | const [virtual] |
Returns number of children.
Reimplemented from SoBaseKit.
virtual void SoMenuBar::insertChild | ( | SoMenuPopup * | child, | |
int | newChildIndex | |||
) | [virtual] |
Adds a child so that it becomes the one with the given index.
virtual void SoMenuBar::removeAllChildren | ( | ) | [virtual] |
Removes all children from group.
Reimplemented from SoBaseKit.
void SoMenuBar::removeAuditor | ( | SoDialogAuditor * | auditor | ) |
Removes the specified DialogAuditor from the auditor list.
virtual void SoMenuBar::removeChild | ( | SoMenuPopup * | child | ) | [virtual] |
Removes first instance of given child from group.
virtual void SoMenuBar::removeChild | ( | int | index | ) | [virtual] |
Removes child with given index from group.
Reimplemented from SoBaseKit.
virtual void SoMenuBar::replaceChild | ( | SoMenuPopup * | oldChild, | |
SoMenuPopup * | newChild | |||
) | [virtual] |
Replaces first instance of given child with new child.
virtual void SoMenuBar::replaceChild | ( | int | index, | |
SoMenuPopup * | newChild | |||
) | [virtual] |
Replaces child with given index with new child.
SoDialogViz* SoMenuBar::searchForAuditorId | ( | SbString | id | ) |
Retrieves the DialogViz object from the specified auditorID field in an SoMenuBar structure.
NULL is returned if auditorID string is not found.