GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SOXTRESOURCE (3)

NAME

SoXtResource — used to retrieve X resources for SoXtComponents and widgets

CONTENTS

Inherits From
Synopsis
Description
Methods
Notes
See Also

INHERITS FROM

SoXtResource

SYNOPSIS

#include <Inventor/Xt/SoXtResource.h>

Methods from class SoXtResource:

       
                    
                     SoXtResource(Widget w)    
   
                    
                     ~SoXtResource()    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, SbColor &c)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, short &i)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, unsigned short &u)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, char *&s)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, SbBool &b)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, float &f)

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:




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


METHODS

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

    SbBool    
                    
SbBool               getResource(char *resName, char *resClass, SbColor &c)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, short &i)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, unsigned short &u)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, char *&s)    
SbBool    
                    
SbBool               getResource(char *resName, char *resClass, SbBool &b)    
SbBool    
                    
SbBool               getResource(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.

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

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

Search for    or go to Top of page |  Section 3 |  Main Index


SOXTRESOURCE(3IV) (-->)

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.