24#ifndef _SO_WIN_MATERIAL_EDITOR_
25#define _SO_WIN_MATERIAL_EDITOR_
41class SoWinMaterialList;
51class SoWinMaterialPalette;
119 const char *name = NULL,
149 void *userData = NULL);
156 void *userData = NULL);
166 {
return updateFreq; }
198 virtual SbString getDefaultWidgetName()
const;
199 virtual SbString getDefaultTitle()
const;
200 virtual SbString getDefaultIconTitle()
const;
203 unsigned long nCurrEditId ;
204 unsigned long diamondButtonId[4] ;
205 unsigned long radioButtonId[4] ;
208 void layoutAccept() ;
211 WPARAM wParam, LPARAM lParam );
212 static void onCommand(
231 void initPlacement() ;
241 SoWidget acceptButton, diamondButtons[4], radioButtons[4];
250 SoWinMaterialList *materialList;
272 void updateLocalComponents();
275 void updateColorEditor(
SbBool updateTitle =
FALSE);
282 void updateMaterialColor(
287 void updateMaterialColor(
296 void copyMaterial(
SoNode *mat1,
int index1,
297 const SoNode *mat2,
int index2);
301 void undoIgnoresIfChanged();
304 static void pasteDone(
void *userData,
SoPathList *pathList);
307 static void materialListCB(
void *,
const SoMaterial *);
308 static void colorEditorCB(
void *,
const SbColor *);
309 static void ambientSliderCB(
void *,
float);
310 static void diffuseSliderCB(
void *,
float);
311 static void specularSliderCB(
void *,
float);
312 static void emissiveSliderCB(
void *,
float);
313 static void shininessSliderCB(
void *,
float);
314 static void transparencySliderCB(
void *,
float);
325 static void sensorCB(
void *,
SoSensor *);
333 static void visibilityChangeCB(
void *pt,
SbBool visible);
338 void constructorCommon(
SbBool buildNow);
#define TRUE
Possible value of SbBool.
#define FALSE
Possible value of SbBool.
SoWinColorSlider(SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, Type type=INTENSITY_SLIDER)
#define XmAnyCallbackStruct
void SoWinMaterialEditorCB(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.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Supports copy/pa...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component that l...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component which ...
virtual void show()
This shows the component.
void setMaterial(const SoMaterial &mtl)
Sets a new material value.
SoWinMaterialEditor(SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
Constructor.
void addMaterialChangedCallback(SoWinMaterialEditorCB *f, void *userData=NULL)
Additional way of using the material editor, by registering a callback which will be called whenever ...
SoWinMaterialEditor::UpdateFrequency getUpdateFrequency()
Gets the update frequency.
void attach(SoMaterial *material, int index=0)
Attaches the editor to a material node and edits the material of the given index.
const SoMaterial & getMaterial() const
Gets the current material value.
void removeMaterialChangedCallback(SoWinMaterialEditorCB *f, void *userData=NULL)
Removes the material changed callback.
UpdateFrequency
UpdateFrequency is how often new values should be sent to the node or the callback routine.
@ AFTER_ACCEPT
Only send updates after user hits accept button.
@ CONTINUOUS
Send updates with every mouse motion.
SbBool isAttached()
Returns TRUE if the editor is attached.
void setUpdateFrequency(SoWinMaterialEditor::UpdateFrequency freq)
Sets the update frequency.
SoWinMaterialPalette * m_pMaterialPalette
virtual ~SoWinMaterialEditor()
Destructor.
void detach()
Detaches the editor from the material node.
virtual void hide()
This hides the component.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Component for re...
void SoCallbackListCB(void *userData, void *callbackData)