Used to retrieve X resources for SoXt components and widgets . More...
#include <Inventor/Xt/SoXtResource.h>
Public Member Functions | |
SoXtResource (SoWidget w) | |
~SoXtResource () | |
SbBool | getResource (char *resName, char *resClass, SbColor &c) |
SbBool | getResource (char *resName, char *resClass, short &i) |
SbBool | getResource (char *resName, char *resClass, unsigned short &u) |
SbBool | getResource (char *resName, char *resClass, char *&s) |
SbBool | getResource (char *resName, char *resClass, SbBool &b) |
SbBool | getResource (char *resName, char *resClass, float &f) |
Used to retrieve X resources for SoXt components and widgets .
This class provides an easy-to-use interface for retrieving X resource values for widgets and components. Rather than use standard Xt calls to traverse up a widget hierarchy, this class performs its own traversal so that it may provide special care for widgets which are Open Inventor components. For instance, the Open Inventor Material Editor top level widget is a Motif form widget. Its class name is thus XmForm . SoXtResource knows that the editor is an Open Inventor component, though, so it uses the class name provided by the editor (in this case "SoXtMaterialEditor") when looking up resource values.
EXAMPLE:
SoXtResource xr( materialEditor->getWidget() ); xr.getResource("tile1Color", "Tile1Color", color); xr.getResource("updateFrequency", "UpdateFrequency", freq);
X Resources (Xrm), X Intrinsics (Xt), SoXt, SoXtComponent
SoXtResource::SoXtResource | ( | SoWidget | w | ) |
Constructor.
The constructor takes the widget for which it will retrieve resource values.
SoXtResource::~SoXtResource | ( | ) |
Destructor.
SbBool SoXtResource::getResource | ( | char * | resName, | |
char * | resClass, | |||
float & | f | |||
) |
Returns the X resource value for the specified resource name and class.
There is no need to specify the widget hierarchy; this is automatically computed in the constructor.
Returns the X resource value for the specified resource name and class.
There is no need to specify the widget hierarchy; this is automatically computed in the constructor.
SbBool SoXtResource::getResource | ( | char * | resName, | |
char * | resClass, | |||
char *& | s | |||
) |
Returns the X resource value for the specified resource name and class.
There is no need to specify the widget hierarchy; this is automatically computed in the constructor.
SbBool SoXtResource::getResource | ( | char * | resName, | |
char * | resClass, | |||
unsigned short & | u | |||
) |
Returns the X resource value for the specified resource name and class.
There is no need to specify the widget hierarchy; this is automatically computed in the constructor.
SbBool SoXtResource::getResource | ( | char * | resName, | |
char * | resClass, | |||
short & | i | |||
) |
Returns the X resource value for the specified resource name and class.
There is no need to specify the widget hierarchy; this is automatically computed in the constructor.
Returns the X resource value for the specified resource name and class.
There is no need to specify the widget hierarchy; this is automatically computed in the constructor.