Component which lets you edit a material interactively. More...
#include <Inventor/Xt/SoXtMaterialList.h>
Public Member Functions | |
SoXtMaterialList (SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, const char *dir=NULL) | |
~SoXtMaterialList () | |
void | addCallback (SoXtMaterialListCB *f, void *userData=NULL) |
void | removeCallback (SoXtMaterialListCB *f, void *userData=NULL) |
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.
!!------------------------------------------------ !! Material List !! !!------------------------------------------------ *IvMaterialListTitle.labelString: Material List *IvMaterialListeIconTitle.labelString: Mat List *IvMLMenuBar*IvPalettes.labelString: Palettes
SoXtComponent, SoCallbackList, SoMaterial, SoXtMaterialEditor
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 | ( | ) |
Destructor.
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.
void SoXtMaterialList::removeCallback | ( | SoXtMaterialListCB * | f, | |
void * | userData = NULL | |||
) | [inline] |
Removes callback.