25# include <Inventor/Qt/SoQtColorWheel.h>
27# include <Inventor/Win/SoWinColorWheel.h>
30#ifndef _SO_XT_COLOR_WHEEL_
31#define _SO_XT_COLOR_WHEEL_
33#include <Inventor/SbColor.h>
34#include <Inventor/SbLinear.h>
35#include <Inventor/misc/SoCallbackList.h>
36#include <Inventor/Xt/SoXtGLWidget.h>
41typedef void SoXtColorWheelCB(
void *userData,
const float hsv[3]);
59 SoWidget parent = NULL,
60 const char *name = NULL,
61 SbBool buildInsideParent = TRUE);
70 void setBaseColor(
const float hsv[3]);
71 const float *getBaseColor() {
return hsvColor; }
78 void setWYSIWYG(
SbBool trueOrFalse);
79 SbBool isWYSIWYG() {
return WYSIWYGmode; }
88 void addStartCallback(
90 void *userData = NULL)
91 { startCallbacks->addCallback((SoCallbackListCB *) f, userData); }
93 void addValueChangedCallback(
95 void *userData = NULL)
96 { changedCallbacks->addCallback((SoCallbackListCB *) f, userData); }
98 void addFinishCallback(
100 void *userData = NULL)
101 { finishCallbacks->addCallback((SoCallbackListCB *) f, userData); }
103 void removeStartCallback(
105 void *userData = NULL)
106 { startCallbacks->removeCallback((SoCallbackListCB *) f, userData); }
108 void removeValueChangedCallback(
110 void *userData = NULL)
111 { changedCallbacks->removeCallback((SoCallbackListCB *) f, userData); }
113 void removeFinishCallback(
115 void *userData = NULL)
116 { finishCallbacks->removeCallback((SoCallbackListCB *) f, userData); }
120 SbBool isInteractive() {
return interactive; }
128 SoXtColorWheel( SoWidget parent,
133 SoWidget buildWidget(SoWidget parent);
138 virtual void redraw();
139 virtual void processEvent(XAnyEvent *anyevent);
140 virtual void sizeChanged(
const SbVec2s &newSize);
146 short cx, cy, radius;
147 SbColor *defaultColors, *colors;
158 void makeWheelGeometry();
159 void makeWheelColors(
SbColor *col,
float intensity);
160 void drawWheelSurrounding();
161 void drawWheelColors();
162 void moveWheelMarker(
short x,
short y);
165 void constructorCommon(
SbBool buildNow);
Manages a list of callbacks and associated data.
Translates and reports events for the mouse device.