| 1 |
NAME SoXtMaterialList SoXtMtlList "" { |
| 2 |
component which lets you edit a material interactively |
| 3 |
} |
| 4 |
|
| 5 |
TYPEDEF void SoXtMaterialListCB "(void *userData, const SoMaterial *mtl)" |
| 6 |
|
| 7 |
INCLUDE Xt/SoXtMaterialList.h |
| 8 |
|
| 9 |
DESC { |
| 10 |
This class is used to choose an |
| 11 |
\cSoMaterial\. |
| 12 |
from palettes of |
| 13 |
predefined materials (for example, gold, silver, or bronze from the metal |
| 14 |
palette; emerald, pearl, or ruby from the stones palette). The chosen |
| 15 |
material is passed to callback functions registered with this component. |
| 16 |
} |
| 17 |
|
| 18 |
METHOD "" SoXtMaterialList( |
| 19 |
Widget parent = NULL, |
| 20 |
const char *name = NULL, |
| 21 |
SbBool buildInsideParent = TRUE, |
| 22 |
const char *dir = NULL) {} |
| 23 |
METHOD "" ~SoXtMaterialList() |
| 24 |
{ |
| 25 |
The constructor is passed a directory name which serves as the home |
| 26 |
directory for the material palettes. You can have any number of palettes |
| 27 |
in this directory. A palette is a subdirectory that contains Inventor data |
| 28 |
files, where each file describes one material. Predefined Inventor materials |
| 29 |
are found in /usr/share/data/materials. |
| 30 |
} |
| 31 |
|
| 32 |
METHOD addCB addCallback( |
| 33 |
SoXtMaterialListCB *f, |
| 34 |
void *userData = NULL) {} |
| 35 |
METHOD removeCB removeCallback( |
| 36 |
SoXtMaterialListCB *f, |
| 37 |
void *userData = NULL) |
| 38 |
{ |
| 39 |
Register functions that will be called whenever the user chooses a new |
| 40 |
material from the list. Each callback when invoked will be passed the |
| 41 |
\vuserData\. |
| 42 |
pointer, along with a pointer to the newly selected material. |
| 43 |
} |
| 44 |
|
| 45 |
ALSO { SoXtComponent, SoCallbackList, SoMaterial, SoXtMaterialEditor } |