25#ifndef _SO_WIN_COLOR_WHEEL_
26#define _SO_WIN_COLOR_WHEEL_
28#include <Inventor/Win/SoWinBeginStrict.h>
29#include <Inventor/SbColor.h>
30#include <Inventor/SbLinear.h>
31#include <Inventor/misc/SoCallbackList.h>
32#include <Inventor/Win/SoWinGLWidget.h>
37typedef void SoWinColorWheelCB(
void *userData,
const float hsv[3]);
55 SoWidget parent = NULL,
56 const char *name = NULL,
57 SbBool buildInsideParent = TRUE);
66 void setBaseColor(
const float hsv[3]);
67 const float *getBaseColor() {
return hsvColor; }
74 void setWYSIWYG(
SbBool trueOrFalse);
75 SbBool isWYSIWYG() {
return WYSIWYGmode; }
84 void addStartCallback(
86 void *userData = NULL)
87 { startCallbacks->addCallback((SoCallbackListCB *) f, userData); }
89 void addValueChangedCallback(
91 void *userData = NULL)
92 { changedCallbacks->addCallback((SoCallbackListCB *) f, userData); }
94 void addFinishCallback(
96 void *userData = NULL)
97 { finishCallbacks->addCallback((SoCallbackListCB *) f, userData); }
99 void removeStartCallback(
100 SoWinColorWheelCB *f,
101 void *userData = NULL)
102 { startCallbacks->removeCallback((SoCallbackListCB *) f, userData); }
104 void removeValueChangedCallback(
105 SoWinColorWheelCB *f,
106 void *userData = NULL)
107 { changedCallbacks->removeCallback((SoCallbackListCB *) f, userData); }
109 void removeFinishCallback(
110 SoWinColorWheelCB *f,
111 void *userData = NULL)
112 { finishCallbacks->removeCallback((SoCallbackListCB *) f, userData); }
116 SbBool isInteractive() {
return interactive; }
130 SoWidget buildWidget(SoWidget parent);
135 virtual void redraw();
136 virtual void redrawOverlay();
137 virtual void processEvent(XAnyEvent *anyevent);
138 virtual void sizeChanged(
const SbVec2s &newSize);
144 short cx, cy, radius;
145 SbColor *defaultColors, *colors;
156 void makeWheelGeometry();
157 void makeWheelColors(
SbColor *col,
float intensity);
158 void drawWheelSurrounding();
159 void drawWheelColors();
160 void checkMarkerColor();
161 void drawWheelMarker();
162 void moveWheelMarker(
short x,
short y);
165 void constructorCommon(
SbBool buildNow);
167 void SaveUnder(
short x,
short y);
171 int nMarkR,nMarkG,nMarkB;
174 unsigned long *pSaveBuf;
182#include <Inventor/Win/SoWinEndStrict.h>
Manages a list of callbacks and associated data.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Translates and r...