56#ifndef _SO_XT_MATERIAL_EDITOR_
57#define _SO_XT_MATERIAL_EDITOR_
178 const char *name = NULL,
207 void *userData = NULL);
213 void *userData = NULL);
223 {
return updateFreq; }
255 virtual SbString getDefaultWidgetName()
const;
256 virtual SbString getDefaultTitle()
const;
257 virtual SbString getDefaultIconTitle()
const;
266 SoWidget acceptButton, diamondButtons[4], radioButtons[4];
267 SoXtMaterialEditor::UpdateFrequency updateFreq;
297 void updateLocalComponents();
300 void updateColorEditor(
SbBool updateTitle =
FALSE);
307 void updateMaterialColor(
312 void updateMaterialColor(
319 void copyMaterial(
SoMaterial *mat1,
int index1,
324 void undoIgnoresIfChanged();
327 static void pasteDone(
void *userData,
SoPathList *pathList);
330 static void materialListCB(
void *,
const SoMaterial *);
331 static void colorEditorCB(
void *,
const SbColor *);
332 static void ambientSliderCB(
void *,
float);
333 static void diffuseSliderCB(
void *,
float);
334 static void specularSliderCB(
void *,
float);
335 static void emissiveSliderCB(
void *,
float);
336 static void shininessSliderCB(
void *,
float);
337 static void transparencySliderCB(
void *,
float);
347 static void sensorCB(
void *,
SoSensor *);
354 static void visibilityChangeCB(
void *pt,
SbBool visible);
359 void constructorCommon(
SbBool buildNow);
#define TRUE
Possible value of SbBool.
#define FALSE
Possible value of SbBool.
#define XmAnyCallbackStruct
void addMaterialChangedCallback(SoWinMaterialPaletteCB *f, void *userData=NULL)
void removeMaterialChangedCallback(SoWinMaterialPaletteCB *f, void *userData=NULL)
#define SoXtMaterialEditorCB
#define SoXtMaterialEditor
void SoXtMaterialEditorCB(void *userData, const SoMaterial *mtl)
Class for smart character strings.
Node that defines an object's base color.
Base class for all nodes, paths, and engines.
Manages a list of callbacks and associated data.
void addCallback(SoCallbackListCB *f, void *userData=NULL)
Adds a function to the list of callback functions.
void removeCallback(SoCallbackListCB *f, void *userData=NULL)
Removes a function from the list of callback functions.
Node representing a directional light source.
Multiple-value field containing any number of RGB colors stored as three floats.
Surface material definition node.
Abstract base class for all database nodes.
Sensor class that can be attached to Open Inventor nodes.
Maintains a list of pointers to paths.
Field containing an RGB color.
Manages a list of selected objects.
Abstract base class for Open Inventor sensors.
Group node that saves and restores traversal state.
Supports copy/paste for Open Inventor using the Xt clipboard.
Component that lets you edit a color interactively.
Abstract base class for all Open Inventor components.
Component which lets you edit a material interactively.
void attach(SoMaterial *material, int index=0)
Attaches the editor to a material node and edits the material of the given index.
virtual void hide()
This hides the component.
~SoXtMaterialEditor()
Destructor.
UpdateFrequency
UpdateFrequency is how often new values should be sent to the node or the callback routine.
@ CONTINUOUS
Send updates with every mouse motion.
@ AFTER_ACCEPT
Only send updates after user hits accept button.
const SoMaterial & getMaterial() const
Gets the current material value.
virtual void show()
This shows the component.
SbBool isAttached()
Returns TRUE if the editor is attached.
void addMaterialChangedCallback(SoXtMaterialEditorCB *f, void *userData=NULL)
Additional way of using the material editor, by registering a callback which will be called whenever ...
SoXtMaterialEditor(SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
Constructor.
void detach()
Detaches the editor from the material node.
SoXtMaterialEditor::UpdateFrequency getUpdateFrequency()
Gets the update frequency.
void removeMaterialChangedCallback(SoXtMaterialEditorCB *f, void *userData=NULL)
Removes the material changed callback.
void setMaterial(const SoMaterial &mtl)
Sets a new material value.
void setUpdateFrequency(SoXtMaterialEditor::UpdateFrequency freq)
Sets the update frequency.
Component which lets you edit a material interactively.
Component for rendering Open Inventor scene graphs.
void SoCallbackListCB(void *userData, void *callbackData)