30#ifndef _SO_XT_COLOR_EDITOR_
31#define _SO_XT_COLOR_EDITOR_
51struct _ColorEditorCBData;
139 const char *name = NULL,
188 inline void addColorChangedCallback(
SoXtColorEditorCB *f,
void *userData = NULL);
192 inline void removeColorChangedCallback(
SoXtColorEditorCB *f,
void *userData = NULL);
254 virtual SbString getDefaultWidgetName()
const;
255 virtual SbString getDefaultTitle()
const;
256 virtual SbString getDefaultIconTitle()
const;
262 static void visibilityChangeCB(
void *pt,
SbBool visible);
267 Sliders whichSliders;
274 _ColorEditorCBData *dataId;
276 SoXtColorEditor::UpdateFrequency updateFreq;
294 void copy(
Time eventTime);
295 void paste(
Time eventTime);
297 static void pasteDoneCB(
void *userData,
SoPathList *pathList);
300 SoWidget acceptButton, slidersForm, buttonsForm, wheelForm;
307 void doSliderLayout();
308 void doDynamicTopLevelLayout();
309 int numberOfSliders(SoXtColorEditor::Sliders slider);
316 static void fieldChangedCB(
void *,
SoSensor *);
319 static void wheelCallback(
void *,
const float hsv[3]);
320 void wheelChanged(
const float hsv[3]);
321 static void sliderCallback(
void *,
float);
322 void sliderChanged(
short id,
float value);
324 void buttonPressed(
short id);
331 void constructorCommon(
SbBool buildNow);
333 void initStrings(
void );
#define TRUE
Possible value of SbBool.
#define XmAnyCallbackStruct
#define SoXtColorEditorCB
void SoXtColorEditorCB(void *userData, const SbColor *color)
List of generic (void *) pointers.
Class for smart character strings.
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.
Multiple-value field containing any number of RGB colors stored as three floats.
Multiple-value field containing any number of uint32_t integers.
Sensor class that can be attached to Open Inventor nodes.
Maintains a list of pointers to paths.
Field containing an RGB color.
Abstract base class for Open Inventor sensors.
Supports copy/paste for Open Inventor using the Xt clipboard.
Component that lets you edit a color interactively.
const SbColor & getColor()
Gets the current color value.
void attach(SoMFColor *color, int index, SoBase *node)
Attaches the editor to a color node and edits the color of the given index.
SoXtColorEditor::UpdateFrequency getUpdateFrequency()
Gets the update frequency.
Sliders
list of possible slider combinations, which is used to specify which sliders should be displayed at a...
@ INTENSITY
Display intensity slider (default)
@ RGB_V
Display RGB and value sliders.
@ RGB
Display RGB sliders.
@ HSV
Display HSV sliders.
@ NONE
Display no sliders.
@ RGB_HSV
Display RGB and HSV sliders.
void attach(SoMFUInt32 *color, int index, SoBase *node)
Attaches the editor to a color node and edits the color of the given index.
SoXtColorEditor::Sliders getCurrentSliders()
Gets which slider(s) should be displayed.
void setWYSIWYG(SbBool trueOrFalse)
Sets the WYSIWYG (what-you-see-is-what-you-get) mode on/off for the colored backgrounds of the slider...
void setUpdateFrequency(SoXtColorEditor::UpdateFrequency freq)
Sets the update frequency.
void attach(SoSFColor *color, SoBase *node)
Attaches the editor to a color node and edits the specified color.
SbBool isWYSIWYG()
Gets the WYSIWYG mode.
~SoXtColorEditor()
Destructor.
void removeColorChangedCallback(SoXtColorEditorCB *f, void *userData=NULL)
Removes colorChanged callback.
void setCurrentSliders(SoXtColorEditor::Sliders whichSliders)
Sets which slider(s) should be displayed.
SbBool isAttached()
Returns TRUE if the editor is attached.
void detach()
Detaches the editor from a color node.
SoXtColorEditor(SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE)
Constructor.
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.
void setColor(const SbColor &color)
Sets a new color value.
void addColorChangedCallback(SoXtColorEditorCB *f, void *userData=NULL)
Additional way of using the color editor, by registering a callback which will be called whenever the...
Abstract base class for all Open Inventor components.
void SoCallbackListCB(void *userData, void *callbackData)