Top Level Dialog node. More...
#include <DialogViz/dialog/SoTopLevelDialog.h>
The SoTopLevelDialog class manages a list of SoTopComponent children. Typically, a top level component is composed of at most one SoMenuBar and a set of SoDialogComponents. You can add, insert, and remove top components (SoTopComponent) by using the addChild(), insertChild(), and removeChild() methods.
The SoTopLevelDialog components has numerous sizing constraints. In fact, the user can define the width and height of the dialog window, and can also add size limits to it using the fields minWidth, minHeight, maxWidth, and maxHeight. The limits will be considered when the resizable field is set to TRUE. Otherwise, the size of the window is static and the minimize and maximize title bar buttons are removed on Windows systems.
Note: While 2D rendering, when triggering the window close button, the window is only hidden. If this dialog is the main window of an application (i.e., buildInsideParent parameter has been defined as TRUE), the dialog window is destroyed and the application is ended. Otherwise, the dialog window is not destroyed until closeDialog() is called.
You can change the parts in any instance of this top level component using setPart(). The default part geometries are defined as resources for this SoTopLevelDialog 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/TopLevelDialog.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.
width | 0 |
height | 0 |
position | 0 0 |
position3D | 0 0 0 |
resizable | TRUE |
minWidth | 0 |
maxWidth | 0 |
minHeight | 0 |
maxHeight | 0 |
margin | 0 |
rowSpacing | 0 |
verticalScrollBar | TRUE |
horizontalScrollBar | TRUE |
scrollPolicy | AUTO |
windowResizedByChildren | FALSE |
modalFrame | FALSE |
hideChildren | FALSE |
// fields from SoDialogViz | |
enable | TRUE |
label | "" |
labelAlignment | RIGHT |
auditorID | "" |
SoTopLevelDialog {
Group frame
Define the geometry of the main frame of the SoTopLevelDialog component. When TopLevelDialog is minimized, default size is set to (x, 20, z).
Group labelProp
Specifies properties to apply to the text node that represents the label field.
Switch minSwtch {
Defines the geometry of the minimize button.
Group minReleased
Defines the released geometry.
Group minPressed
Defines the pressed geometry.
}
}
Extra information for parts from above structure
Part Name Resource Skin file frame TopLevelDialogFrame TopLevelDialog.iv labelProp DialogTextProperties TextProperties.iv minReleased TopLevelDialogMinReleased TopLevelDialog.iv minSelected TopLevelDialogMinPressed TopLevelDialog.iv
SoTopComponent, SoMenuBar, SoDialogComponent
SoTopLevelDialog::SoTopLevelDialog | ( | ) |
Constructor.
void SoTopLevelDialog::addAuditor | ( | SoDialogAuditor * | auditor | ) |
Adds a dialogAuditor to the current topLevelDialog component.
virtual void SoTopLevelDialog::addChild | ( | SoTopComponent * | child | ) | [virtual] |
Adds a child as last one in group.
void SoTopLevelDialog::applyAuditors | ( | ) |
Applies all DialogAuditors in the auditor list.
void SoTopLevelDialog::buildDialog | ( | SoWidget | parent, | |
SbBool | buildInsideParent = FALSE | |||
) |
Builds the dialog window.
If buildInsideParent is set to FALSE, a window is created; its title is the field label of SoDialogViz. If buildInsideParent is set to TRUE, the dialog is created inside the parent window.
void SoTopLevelDialog::close | ( | ) |
Destroys the dialog window.
virtual int SoTopLevelDialog::findChild | ( | const SoTopComponent * | child | ) | const [virtual] |
Finds index of given child within group.
Returns -1 if not found.
virtual SoNode* SoTopLevelDialog::getChild | ( | int | index | ) | const [virtual] |
Returns pointer to child node with the given index.
Reimplemented from SoBaseKit.
virtual int SoTopLevelDialog::getNumChildren | ( | ) | const [virtual] |
Returns number of children.
Reimplemented from SoBaseKit.
virtual void SoTopLevelDialog::hide | ( | ) | [virtual] |
Hides the topLevelDialog widget.
virtual void SoTopLevelDialog::insertChild | ( | SoTopComponent * | child, | |
int | newChildIndex | |||
) | [virtual] |
Adds a child so that it becomes the one with the given index.
virtual void SoTopLevelDialog::removeAllChildren | ( | ) | [virtual] |
Removes all children from group.
Reimplemented from SoBaseKit.
void SoTopLevelDialog::removeAuditor | ( | SoDialogAuditor * | auditor | ) |
Removes the defined DialogAuditor from the auditor list.
virtual void SoTopLevelDialog::removeChild | ( | SoTopComponent * | child | ) | [virtual] |
Removes first instance of given child from group.
virtual void SoTopLevelDialog::removeChild | ( | int | index | ) | [virtual] |
Removes child with given index from group.
Reimplemented from SoBaseKit.
virtual void SoTopLevelDialog::replaceChild | ( | SoTopComponent * | oldChild, | |
SoTopComponent * | newChild | |||
) | [virtual] |
Replaces first instance of given child with new child.
virtual void SoTopLevelDialog::replaceChild | ( | int | index, | |
SoTopComponent * | newChild | |||
) | [virtual] |
Replaces child with given index with new child.
SoDialogViz* SoTopLevelDialog::searchForAuditorId | ( | SbString | id | ) |
Retrieves the DialogViz object from the specified auditorID field in an SoTopLevelDialog structure.
NULL is returned if auditorID string is not found.
virtual void SoTopLevelDialog::show | ( | ) | [virtual] |
Shows the tolLevelDialog widget.
Preferred height of the top component.
Default is zero. The default value zero indicates that the height of the top component will be computed automatically according to its content.
When rendering DialogViz as a scene, children can be hidden while the SoTopLevelDialog frame is moving by setting this field to TRUE.
(Default is FALSE). Hiding children during moves is recommended in order to preserve the frame rate while moving. This is all the more useful when the 3D DialogViz window is complex. Note: This field is not used in 2D mode.
Controls how horizontal scrollbar appears.
Default value is AUTO.
Indicates whether minimized and full size dialog have independant 3D position or not.
Default is TRUE. NOTE: field available since Open Inventor 8.1
Margin width.
Default is zero.
Maximum top component height.
Default is zero. The default value zero indicates no minimum value is specified.
Maximum top component width.
Default is zero. The default value zero indicates no minimum value is specified.
Minimum top component height.
Default is zero. The default value zero indicates no minimum value is specified.
Controls and indicates whether the dialog is minimized or not.
Default is FALSE. NOTE: field available since Open Inventor 8.1
Window world coordinate position when rendering in 3D and minimized.
Minimum top component width.
Default is zero. The default value zero indicates no minimum value is specified.
Sets window property.
If TRUE, the window will have a border and title bar but will not be resizeable. Default is FALSE.
Window screen coordinates.
Default position is (0,0).
Window world coordinate position when rendering in 3D.
Default is (0,0,0).
Indicates if the top component can be resized or not, Default is TRUE.
Space between each child.
Default is zero.
Controls how vertical scrollbar appears.
Default value is AUTO.
Preferred width of the top component.
Default is zero. The default value zero indicates that the width of the top component will be computed automatically according to its content.
Controls the window sizing when a child is added or removed.
If FALSE, the window is not resized; scrollbars appear if needed. Default is FALSE.