Abstract base class for DialogViz components More...
#include <DialogViz/dialog/SoDialogViz.h>
Public Types | |
enum | LabelAlignment { LEFT , CENTER , RIGHT } |
Public Types inherited from SoDragger | |
enum | TrackerDirectMode { NONE , MOVE , ROTATE , FREE , DEFAULT } |
Tracker direct mode. More... | |
typedef void | SoDraggerCB(void *userData, SoDragger *dragger) |
Used in defining the callback function lists. | |
Public Types inherited from SoInteractionKit | |
enum | CacheEnabled { OFF , ON , AUTO } |
Possible values for caching. More... | |
Static Public Member Functions | |
static void | init () |
Initalizes the DialogViz classes. | |
static void | finish () |
Shuts down the DialogViz module, which includes freeing any internal static memory that it allocated. | |
static bool | isInitialized () |
Returns TRUE if module is currently initialized. | |
static const char * | getProductName () |
Returns a character string identifying the name of the extension. | |
static SoDialogViz * | loadFromFile (SbString filename, SbString auditorID="") |
Loads a DialogViz node from an Inventor file. | |
static void | setSkin (SbString skinName) |
Sets the directory for 3D DialogViz component skins. | |
static void | setSkinsDirectories (SbString directories) |
Sets a list of directories where to search for skins. | |
static SbString | getSkinsDirectories () |
Returns the skins directory. | |
static void | setFont (DG_FONT font) |
Sets the DialogViz font. | |
Deprecated | |
static SoDEPRECATED const char * | getVersion () |
Returns a character string identifying the version of the extension. | |
Static Public Member Functions inherited from SoDragger | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Returns the SoNodekitCatalog for this class. | |
static void | setMinScale (float newMinScale) |
Sets the smallest scale that any dragger will write. | |
static float | getMinScale () |
Gets the smallest scale that any dragger will write. | |
static void | setInitialTrackerDirectMode (TrackerDirectMode mode=DEFAULT) |
Set the initial tracker direct mode for draggers not yet created. | |
static TrackerDirectMode | getInitialTrackerDirectMode () |
Get the initial tracker direct mode. | |
Static Public Member Functions inherited from SoInteractionKit | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Returns the SoNodekitCatalog for this class. | |
Static Public Member Functions inherited from SoBaseKit | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Returns the SoNodekitCatalog for the class SoBaseKit. | |
static void | setSearchingChildren (SbBool newVal) |
Sets if nodekit children are searched during SoSearchAction traversal. | |
static SbBool | isSearchingChildren () |
Returns TRUE if nodekit children are searched during SoSearchAction traversal. | |
Static Public Member Functions inherited from SoNode | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static SoNode * | getByName (const SbName &name) |
A node's name can be set using SoBase::setName(). | |
static int | getByName (const SbName &name, SoNodeList &list) |
A node's name can be set using SoBase::setName(). | |
Static Public Member Functions inherited from SoFieldContainer | |
static SoType | getClassTypeId () |
Returns the type of this class. | |
Static Public Member Functions inherited from SoBase | |
static SoType | getClassTypeId () |
Returns type identifier for this class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Public Attributes | |
SoSFBool | enable |
Enables component. | |
SoSFString | label |
Label string of the element. | |
SoSFEnum | labelAlignment |
Specifies the label alignment. | |
SoSFString | auditorID |
Specifies the auditor ID of the node. | |
Public Attributes inherited from SoDragger | |
SoSFBool | isActive |
TRUE when mouse is down and dragging, else FALSE. | |
SoSFBool | enableCallbacks |
If set to FALSE, motion, start and finish callbacks are disabled. | |
Public Attributes inherited from SoInteractionKit | |
SoSFEnum | boundingBoxCaching |
Set bounding box caching mode. | |
SoSFEnum | renderCulling |
Set render culling mode. | |
SoSFEnum | pickCulling |
Set pick caching mode. | |
SoDEPRECATED SoSFEnum | renderCaching |
Set render caching mode. | |
Public Attributes inherited from SoBaseKit | |
SoSFBool | boundingBoxIgnoring |
Whether to ignore this node during bounding box traversal. | |
Additional Inherited Members | |
Public Member Functions inherited from SoDragger | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
Returns the SoNodekitCatalog for this instance. | |
void | addStartCallback (SoDraggerCB *f, void *userData=NULL) |
Adds start callback. | |
void | removeStartCallback (SoDraggerCB *f, void *userData=NULL) |
Removes start callback. | |
void | addMotionCallback (SoDraggerCB *f, void *userData=NULL) |
Adds motion callback. | |
void | removeMotionCallback (SoDraggerCB *f, void *userData=NULL) |
Removes motion callback. | |
void | addFinishCallback (SoDraggerCB *f, void *userData=NULL) |
Adds finish callback. | |
void | removeFinishCallback (SoDraggerCB *f, void *userData=NULL) |
Removes finish callback. | |
void | addValueChangedCallback (SoDraggerCB *f, void *userData=NULL) |
Adds value-changed callback. | |
void | removeValueChangedCallback (SoDraggerCB *f, void *userData=NULL) |
Removes value-changed callback. | |
void | setMinGesture (int pixels) |
Sets the number of pixels of movement required to initiate a constraint gesture. | |
void | setMinGesture (float pixels) |
Float version of setMinGesture. | |
int | getMinGesture () const |
Gets the number of pixels of movement required to initiate a constraint gesture. | |
float | getMinGestureFloat () const |
Float version of getMinGesture. | |
SbBool | enableValueChangedCallbacks (SbBool newVal) |
You can temporarily disable a dragger's valueChangedCallbacks. | |
void | setTrackerDirectMode (TrackerDirectMode mode=DEFAULT) |
Sets the tracker direct mode for this dragger (see description above). | |
TrackerDirectMode | getTrackerDirectMode () const |
Get the current tracker direct mode for this dragger. | |
void | setMotionMatrix (const SbMatrix &newMatrix) |
Set the motion matrix. | |
const SbMatrix & | getMotionMatrix () |
Get the motion matrix. | |
Public Member Functions inherited from SoInteractionKit | |
virtual SbBool | setPartAsPath (const SbName &partName, SoPath *surrogatePath) |
Sets any public part in the interaction kit as a "surrogate" path instead. | |
virtual SbBool | affectsState () const |
Returns TRUE if a node has an effect on the state during traversal. | |
Public Member Functions inherited from SoBaseKit | |
SoBaseKit () | |
Constructor. | |
virtual SoNode * | getPart (const SbName &partName, SbBool makeIfNeeded) |
Searches the nodekit catalog (and those of all nested nodekits) for the part named partName. | |
template<typename PartType > | |
PartType * | getPart (const SbName &partName) |
Like getPart(const SbName&,SbBool) but casts the returned part to the specified type and sets the makeIfNeeded parameter to TRUE. | |
template<typename PartType > | |
PartType * | checkPart (const SbName &partName) |
Like getPart(const SbName&,SbBool) but casts the returned part to the specified type and sets the makeIfNeeded parameter to FALSE. | |
SbString | getPartString (const SoBase *part) |
Given a node or a path to a node, checks if the part exists in the nodekit, in a nested nodekit, or an element of a list part. | |
virtual SoNodeKitPath * | createPathToPart (const SbName &partName, SbBool makeIfNeeded, const SoPath *pathToExtend=NULL) |
Returns a path that begins at this nodekit and ends at partName. | |
virtual SbBool | setPart (const SbName &partName, SoNode *newPart) |
Inserts the given node (not a copy) as the new part specified by partName. | |
SoNONUNICODE SbBool | set (char *nameValuePairListString) |
This function allows field values of parts (nodes) to be set in several different parts simultaneously. | |
SbBool | set (const SbString &nameValuePairListString) |
This function allows field values of parts (nodes) to be set in several different parts simultaneously. | |
SoNONUNICODE SbBool | set (const char *partNameString, const char *parameterString) |
This function allows field values of parts (nodes) to be set. | |
SbBool | set (const SbString &partNameString, const SbString ¶meterString) |
This function allows field values of parts (nodes) to be set. | |
Public Member Functions inherited from SoNode | |
virtual void | setOverride (const SbBool state) |
Turns the override flag on or off. | |
virtual SbBool | isOverride () const |
Returns the state of the override flag. | |
virtual SoNode * | copy (SbBool copyConnections=FALSE) const |
Creates and returns an exact copy of the node. | |
virtual void | touch () |
Marks an instance as modified, simulating a change to it. | |
Public Member Functions inherited from SoFieldContainer | |
void | setToDefaults () |
Sets all fields in this object to their default values. | |
SbBool | hasDefaultValues () const |
Returns TRUE if all of the object's fields have their default values. | |
SbBool | fieldsAreEqual (const SoFieldContainer *fc) const |
Returns TRUE if this object's fields are exactly equal to fc's fields. | |
void | copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE) |
Copies the contents of fc's fields into this object's fields. | |
SoNONUNICODE SbBool | set (const char *fieldDataString) |
Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
SbBool | set (const SbString &fieldDataString) |
Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
void | get (SbString &fieldDataString) |
Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. | |
virtual int | getFields (SoFieldList &list) const |
Appends references to all of this object's fields to resultList, and returns the number of fields appended. | |
virtual int | getAllFields (SoFieldList &list) const |
Returns a list of fields, including the eventIn's and eventOut's. | |
virtual SoField * | getField (const SbName &fieldName) const |
Returns a the field of this object whose name is fieldName. | |
virtual SoField * | getEventIn (const SbName &fieldName) const |
Returns a the eventIn with the given name. | |
virtual SoField * | getEventOut (const SbName &fieldName) const |
Returns the eventOut with the given name. | |
SbBool | getFieldName (const SoField *field, SbName &fieldName) const |
Returns the name of the given field in the fieldName argument. | |
SbBool | enableNotify (SbBool flag) |
Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE). | |
SbBool | isNotifyEnabled () const |
Notification is the process of telling interested objects that this object has changed. | |
virtual void | setUserData (void *data) |
Sets application data. | |
void * | getUserData (void) const |
Gets user application data. | |
Public Member Functions inherited from SoBase | |
virtual SbName | getName () const |
Returns the name of an instance. | |
virtual void | setName (const SbName &name) |
Sets the name of an instance. | |
void | setSynchronizable (const bool b) |
Sets this to be a ScaleViz synchronizable object. | |
bool | isSynchronizable () const |
Gets the ScaleViz synchronizable state of this object. | |
Public Member Functions inherited from SoRefCounter | |
void | ref () const |
Adds a reference to an instance. | |
void | unref () const |
Removes a reference from an instance. | |
void | unrefNoDelete () const |
unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero. | |
int | getRefCount () const |
Returns current reference count. | |
void | lock () const |
lock this instance. | |
void | unlock () const |
unlock this instance. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Public Member Functions inherited from SoGetView | |
SoGetView () | |
Default constructor. | |
virtual | ~SoGetView () |
virtual SbBool | getViewportIsEnabled () const |
Returns TRUE if SoGetView functionalities are enabled, FALSE otherwise. | |
virtual const SbVec2f | getViewportOrigin () const |
Returns SbViewportRegion origin. | |
virtual const SbVec2f | getViewportSize () const |
Returns SbViewportRegion size. | |
Abstract base class for DialogViz components
This is the abstract base class for all DialogViz (user interface) nodes. It defines common methods and fields that all DialogViz nodes inherit. It is also used to initialize DialogViz.
SoDialogViz::init must be called before creating any DialogViz nodes.
The enable field allows/disallows use of the node.
The label field specifies the string contained in the left part of a control or the text on a button. See individual components for their specific usage of this field.
An auditor ID is a name that identifies a specific component and is specified using the auditorID field. Generally, the auditor ID should be unique. It allows you to access a specific component from your application program.
DialogViz components can be used to build 2D and/or 3D interfaces. A DialogViz interface definition can be read from an Inventor file or created programmatically. To build a 2D user interface, call the buildDialog() method. To build a 3D user interface, insert the DialogViz nodes in your scene graph. Note that when using 3D mode, DialogViz nodes are fully built only after the first rendering traversal is complete.
When using components as 3D objects in your scene, DialogViz allows the user to customize the look for each type of component using DialogViz skin files. DialogViz components are draggers, and draggers allow their parts to be redefined. A skin file redefines the 3D geometry for different parts of a component. To use your own skin files, use the setSkin() method, or set the DIALOGVIZ_SKIN environment variable to specify the path/name of the skin files directory. By default, the DialogViz skin directory is located at $OIVHOME/data/DialogViz/Skins/ and the used skin name is "default". A skin is a collection of several files defining DialogViz component geometry, colors, etc... For example, the skin file TextProperties.iv is used by all of the DialogViz components. This skin file can be useful for applying a font, a color, etc. to the text nodes.
The default font for DialogViz components in 2D mode is:
In 3D mode, the font is defined in the TextProperties.iv Inventor file.
2D Mode Limitation: We do not recommend the use of ref(), unref(), or unrefNoDelete() when manipulating DialogViz nodes in 2D mode. However, these methods can be used as long as you don't destroy and re-create nodes or change the hierarchical structure of components.
label | "" |
callbackID | "" |
enable | TRUE |
SoTopLevelDialog, SoTopComponent, SoMenuItem
Definition at line 161 of file SoDialogViz.h.
Enumerator | |
---|---|
LEFT | Label is left aligned. |
CENTER | Label is center aligned. |
RIGHT | Label is right aligned (default). |
Definition at line 182 of file SoDialogViz.h.
|
static |
Shuts down the DialogViz module, which includes freeing any internal static memory that it allocated.
Finish methods must be called in the reverse order of the init method calls:
|
static |
Returns a character string identifying the name of the extension.
|
static |
Returns the skins directory.
|
static |
Returns a character string identifying the version of the extension.
|
static |
Initalizes the DialogViz classes.
|
static |
Returns TRUE if module is currently initialized.
|
static |
Loads a DialogViz node from an Inventor file.
filename | Specifies the full path of a file containing DialogViz nodes. This file is loaded. |
auditorID | The first DialogViz node in the file having this auditorID is returned. If this parameter is not supplied or if no DialogViz nodes having this auditorID are found in the file, the first DialogViz node in the file is returned. |
|
static |
Sets the DialogViz font.
|
static |
Sets the directory for 3D DialogViz component skins.
The directory is searched for in the current directory (usually, but not always the directory from which the application was started), and then in $OIVHOME/data/DialogViz/skins. Returns TRUE if the specified directory exists, FALSE otherwise. The default skin to use can be set using the DIALOGVIZ_SKIN environment variable.
|
static |
Sets a list of directories where to search for skins.
Each directory in the list must be separated by a semicolon (;). Using this method overrides the DIALOGVIZ_SKINS_DIR environment value.
SoSFString SoDialogViz::auditorID |
Specifies the auditor ID of the node.
Default is empty string.
Definition at line 199 of file SoDialogViz.h.
SoSFBool SoDialogViz::enable |
Enables component.
Default is TRUE. If set to FALSE, the component is grayed out and is not usable.
Definition at line 170 of file SoDialogViz.h.
SoSFString SoDialogViz::label |
Label string of the element.
Default is an empty string. This field is used by all derived classes except for SoMenuSeparator, SoMenuBar, SoDialogCustom, SoDialogSeparator, and SoDialogGroup. This field is the title of the window created by an SoTopLevelDialog. This field supports the newline (\n) character except for some derived classes such as SoMenuItem. It supports the tab (\t) character as well.
Definition at line 180 of file SoDialogViz.h.
SoSFEnum SoDialogViz::labelAlignment |