'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoXtResource(3IV) .SH NAME SoXtResource \(em used to retrieve X resources for SoXtComponents and widgets .SH INHERITS FROM SoXtResource .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 1i \f1Methods from class SoXtResource: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoXtResource\*(Cr(Widget w) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cb~SoXtResource\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, SbColor &c) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, short &i) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, unsigned short &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, char *&s) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, SbBool &b) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, float &f) .sp .SH 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. \*(CbSoXtResource\f1 \&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. .sp EXAMPLE: .nf .in 1i \*(Cr SoXtResource xr( materialEditor->getWidget() ); xr.getResource("tile1Color", "Tile1Color", color); xr.getResource("updateFrequency", "UpdateFrequency", freq); \f1 .fi .in 0.5i .SH METHODS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoXtResource\*(Cr(Widget w) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cb~SoXtResource\*(Cr() .br .in 1i \f1Constructor and destructor. The constructor takes the widget for which it will retrieve resource values. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, SbColor &c) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, short &i) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, unsigned short &u) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, char *&s) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, SbBool &b) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetResource\*(Cr(char *resName, char *resClass, float &f) .br .in 1i \f1This 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. .sp .in 0.5i .SH NOTES Components will typically look up their own resources during \*(CbbuildWidget()\f1. In order for a component to have its Inventor class name recognized by \*(CbSoXtResource\f1, it must call \*(CbSoXtComponent::registerWidget()\f1 in its \*(CbbuildWidget()\f1 method. (This is done in every Inventor component.) .SH SEE ALSO \*(CbX Resources (Xrm), X Intrinsics (Xt), SoXt, SoXtComponent