SoXtResource Class Reference
[Xt]

Used to retrieve X resources for SoXt components and widgets . More...

#include <Inventor/Xt/SoXtResource.h>

List of all members.

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)

Detailed Description

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);
     

NOTES

SEE ALSO

X Resources (Xrm), X Intrinsics (Xt), SoXt, SoXtComponent


Constructor & Destructor Documentation

SoXtResource::SoXtResource ( SoWidget  w  ) 

Constructor.

The constructor takes the widget for which it will retrieve resource values.

SoXtResource::~SoXtResource (  ) 

Destructor.


Member Function Documentation

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.

SbBool SoXtResource::getResource ( char *  resName,
char *  resClass,
SbBool b 
)

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.

SbBool SoXtResource::getResource ( char *  resName,
char *  resClass,
SbColor c 
)

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.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/