logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoXtResource — used to retrieve X resources for SoXtComponents and widgets

Description

       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 Inventor  components.  For  instance,
       the  Inventor  Material  Editor  top  level widget is a Motif form widget. Its class name is thus XmForm.
       SoXtResource knows that the editor is an Inventor component, though, so it uses the class  name  provided
       by the editor (in this case "SoXtMaterialEditor") when looking up resource values.

       EXAMPLE:
          SoXtResourcexr(materialEditor->getWidget());xr.getResource("tile1Color","Tile1Color",color);xr.getResource("updateFrequency","UpdateFrequency",freq);

Inherits From

       SoXtResource

Methods

SoXtResource(Widgetw)~SoXtResource()
          Constructor  and  destructor.  The  constructor  takes  the widget for which it will retrieve resource
          values.

     SbBoolgetResource(char*resName,char*resClass,SbColor&c)SbBoolgetResource(char*resName,char*resClass,short&i)SbBoolgetResource(char*resName,char*resClass,unsignedshort&u)SbBoolgetResource(char*resName,char*resClass,char*&s)SbBoolgetResource(char*resName,char*resClass,SbBool&b)SbBoolgetResource(char*resName,char*resClass,float&f)
          This 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.

Name

       SoXtResource — used to retrieve X resources for SoXtComponents and widgets

Notes

       Components  will  typically look up their own resources during buildWidget(). In order for a component to
       have its Inventor class name recognized by SoXtResource, it must call SoXtComponent::registerWidget()  in
       its buildWidget() method. (This is done in every Inventor component.)

See Also

XResources(Xrm),XIntrinsics(Xt),SoXt,SoXtComponentSoXtResource(3IV)()

Synopsis

#include<Inventor/Xt/SoXtResource.h>

          Methods from class SoXtResource:

                         SoXtResource(Widgetw)~SoXtResource()SbBoolgetResource(char*resName,char*resClass,SbColor&c)SbBoolgetResource(char*resName,char*resClass,short&i)SbBoolgetResource(char*resName,char*resClass,unsignedshort&u)SbBoolgetResource(char*resName,char*resClass,char*&s)SbBoolgetResource(char*resName,char*resClass,SbBool&b)SbBoolgetResource(char*resName,char*resClass,float&f)

See Also