Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SoXtMaterialList Class Reference

Component which lets you edit a material interactively. More...

#include <Inventor/Xt/SoXtMaterialList.h>

+ Inheritance diagram for SoXtMaterialList:

Public Types

typedef void SoXtMaterialListCB(void *userData, const SoMaterial *mtl)
 
- Public Types inherited from SoXtComponent
typedef void SoXtComponentCB(void *data, SoXtComponent *v)
 

Public Member Functions

 SoXtMaterialList (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, const char *dir=NULL)
 The constructor is passed a directory name which serves as the home directory for the material palettes.
 
 ~SoXtMaterialList ()
 Destructor.
 
void addCallback (SoXtMaterialListCB *f, void *userData=NULL)
 Registers functions that will be called whenever the user chooses a new material from the list.
 
void removeCallback (SoXtMaterialListCB *f, void *userData=NULL)
 Removes callback.
 
- Public Member Functions inherited from SoXtComponent
virtual void show ()
 This shows the component.
 
virtual void hide ()
 This hides the component.
 
SbBool isVisible ()
 Returns TRUE if this component is mapped onto the screen.
 
SoWidget getWidget () const
 This returns the base widget for this component.
 
SbBool isTopLevelShell () const
 Returns TRUE if this component is a top level shell component (has its own window).
 
SoWidget getShellWidget () const
 Returns the shell widget (NULL if the shell hasn't been created by this component).
 
SoWidget getParentWidget () const
 Returns the parent widget, be it a shell or not.
 
void setSize (const SbVec2s &size)
 Convenience routine on the widget.
 
SbVec2s getSize ()
 Convenience routine on the widget.
 
SbBool setFullScreen (const SbBool enable)
 Switches the viewer into (or out of) fullscreen mode.
 
SbBool isFullScreen (void) const
 Queries if the viewer is in fullscreen mode.
 
void setFullScreenEnable (const SbBool enable)
 Enables/disables fullscreen mode.
 
SbBool isFullScreenEnable () const
 Queries if it is possible to put the viewer in fullscreen mode.
 
Display * getDisplay ()
 Returns the X display associated with this components widget.
 
SoNONUNICODE void setTitle (const char *newTitle)
 Sets window title.
 
void setTitle (const SbString &newTitle)
 Sets window title.
 
SbString getTitle () const
 Gets window title.
 
SoNONUNICODE void setIconTitle (const char *newIconTitle)
 Sets icon title.
 
void setIconTitle (const SbString &newIconTitle)
 Sets icon title.
 
SbString getIconTitle () const
 Gets icon title.
 
void setWindowCloseCallback (SoXtComponentCB *func, void *data=NULL)
 Sets which callback to call when the user closes this component (double click in the upper left corner) - by default hide() is called on this component, unless a callback is set to something other than NULL.
 
SbString getWidgetName () const
 Returns the widget name.
 
SbString getClassName () const
 Returns the class name.
 

Additional Inherited Members

- Static Public Member Functions inherited from SoXtComponent
static void displayHelp (const char *filename, UINT contextID)
 Static method to display the specified topic of the specified help file.
 
static SoXtComponentgetComponent (SoWidget w)
 This returns the SoXtComponent for this widget.
 

Detailed Description

Component which lets you edit a material interactively.

This class is used to choose an SoMaterial from palettes of predefined materials (for example, gold, silver, or bronze from the metal palette; emerald, pearl, or ruby from the stones palette). The chosen material is passed to callback functions registered with this component.

RESOURCES

      !!------------------------------------------------
      !! Material List !!
      !!------------------------------------------------
      *IvMaterialListTitle.labelString: Material List
      *IvMaterialListeIconTitle.labelString: Mat List
      *IvMLMenuBar*IvPalettes.labelString: Palettes
    

SEE ALSO

SoXtComponent, SoCallbackList, SoMaterial, SoXtMaterialEditor

Definition at line 103 of file SoXtMaterialList.h.

Member Typedef Documentation

◆ SoXtMaterialListCB

typedef void SoXtMaterialListCB(void *userData, const SoMaterial *mtl)

Definition at line 65 of file SoXtMaterialList.h.

Constructor & Destructor Documentation

◆ SoXtMaterialList()

SoXtMaterialList::SoXtMaterialList ( SoWidget  parent = NULL,
const char *  name = NULL,
SbBool  buildInsideParent = TRUE,
const char *  dir = NULL 
)

The constructor is passed a directory name which serves as the home directory for the material palettes.

You can have any number of palettes in this directory. A palette is a subdirectory that contains Open Inventor data files, where each file describes one material. Predefined Open Inventor materials are found in $OIVHOME/data/materials.

◆ ~SoXtMaterialList()

SoXtMaterialList::~SoXtMaterialList ( )

Destructor.

Member Function Documentation

◆ addCallback()

void SoXtMaterialList::addCallback ( SoXtMaterialListCB f,
void *  userData = NULL 
)
inline

Registers 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.

Definition at line 127 of file SoXtMaterialList.h.

◆ removeCallback()

void SoXtMaterialList::removeCallback ( SoXtMaterialListCB f,
void *  userData = NULL 
)
inline

Removes callback.

Definition at line 135 of file SoXtMaterialList.h.


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