Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

soxtresource(3iv) [debian man page]

SoXtResource(3IV)()													       SoXtResource(3IV)()

NAME
SoXtResource -- used to retrieve X resources for SoXtComponents and widgets INHERITS FROM
SoXtResource SYNOPSIS
#include <Inventor/Xt/SoXtResource.h> Methods from class SoXtResource: SoXtResource(Widget 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) 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 "SoXtMaterialEdi- tor") 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 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) 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 recog- nized by SoXtResource, it must call SoXtComponent::registerWidget() in its buildWidget() method. (This is done in every Inventor compo- nent.) SEE ALSO
X Resources (Xrm), X Intrinsics (Xt), SoXt, SoXtComponent SoXtResource(3IV)()

Check Out this Related Man Page

SoXtMaterialList(3IV)() 												   SoXtMaterialList(3IV)()

NAME
SoXtMaterialList -- component which lets you edit a material interactively INHERITS FROM
SoXtComponent > SoXtMaterialList SYNOPSIS
#include <Inventor/Xt/SoXtMaterialList.h> typedef void SoXtMaterialListCB(void *userData, const SoMaterial *mtl) Methods from class SoXtMaterialList: SoXtMaterialList(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, const char *dir = NULL) ~SoXtMaterialList() addCallback(SoXtMaterialListCB *f, void *userData = NULL) removeCallback(SoXtMaterialListCB *f, void *userData = NULL) Methods from class SoXtComponent: virtual void show() virtual void hide() SbBool isVisible() Widget getWidget() const SbBool isTopLevelShell() const Widget getShellWidget() const Widget getParentWidget() const void setSize(const SbVec2s &size) SbVec2s getSize() Display * getDisplay() void setTitle(const char *newTitle) const char * getTitle() const void setIconTitle(const char *newIconTitle) const char * getIconTitle() const void setWindowCloseCallback(SoXtComponentCB *func, void *data = NULL) static SoXtComponent * getComponent(Widget w) const char * getWidgetName() const const char * getClassName() const DESCRIPTION
This class is used to choose an SoMaterial from palettes of predefined materials (for example, gold, silver, or bronze from the metal pal- ette; emerald, pearl, or ruby from the stones palette). The chosen material is passed to callback functions registered with this component. METHODS
SoXtMaterialList(Widget parent = NULL, const char *name = NULL, SbBool buildInsideParent = TRUE, const char *dir = NULL) ~SoXtMaterialList() The constructor is passed a directory name which serves as the home directory for the material palettes. You can have any number of pal- ettes in this directory. A palette is a subdirectory that contains Inventor data files, where each file describes one material. Prede- fined Inventor materials are found in /usr/share/data/materials. addCallback(SoXtMaterialListCB *f, void *userData = NULL) removeCallback(SoXtMaterialListCB *f, void *userData = NULL) Register functions that will be called whenever the user chooses a new material from the list. Each callback when invoked will be passed the userData pointer, along with a pointer to the newly selected material. SEE ALSO
SoXtComponent, SoCallbackList, SoMaterial, SoXtMaterialEditor SoXtMaterialList(3IV)()
Man Page