23#ifndef _SO_WIN_GDI_THUMB_WHEEL_
24#define _SO_WIN_GDI_THUMB_WHEEL_
33class SoDataCallbackList;
35class SgThumbWheelPart ;
36class XmPrimitivePart ;
50#define THUMBWHEEL_START 0
51#define THUMBWHEEL_DRAG 1
52#define THUMBWHEEL_FINISH 2
53#define THUMBWHEEL_VALUE_CHANGE 3
56#define XmCR_DRAG THUMBWHEEL_DRAG
57#define XmCR_VALUE_CHANGED THUMBWHEEL_VALUE_CHANGE
77 const char *name = NULL,
102 float getValue() {
return (
float)thumbWheel.value; }
113 void *userData = NULL);
116 void *userData = NULL);
120 void *userData = NULL);
125 void *userData = NULL);
129 void *userData = NULL);
132 void *userData = NULL);
136 void *userData = NULL);
140 void *userData = NULL);
147 { thumbWheel.lower_bound = nLower ;
148 thumbWheel.upper_bound = nUpper ; } ;
151 { thumbWheel.home_position = n; } ;
154 { thumbWheel.angle_range = n; } ;
157 { thumbWheel.angle_factor = n; } ;
160 { primitive.highlight_thickness = n; } ;
163 { primitive.shadow_thickness = n; } ;
167 { thumbWheel.value = n; } ;
170 { thumbWheel.orientation = n; } ;
173 { thumbWheel.animate = n; } ;
176 { thumbWheel.show_home_button = n; } ;
187 virtual void redraw();
188 virtual void processEvent(
XAnyEvent *anyevent);
189 virtual void sizeChanged(
const SbVec2s &newSize);
197 SoDataCallbackList *startCallbacks;
198 SoDataCallbackList *finishCallbacks;
199 SoDataCallbackList *changedCallbacks;
200 SoDataCallbackList *dragCallbacks;
204 void constructorCommon(
SbBool horizontal,
SbBool buildNow);
208 typedef struct _XmPrimitivePart
210 int highlight_thickness ;
211 int shadow_thickness ;
214 typedef struct _XmCorePart
221 typedef int Dimension ;
222 typedef int Cardinal ;
223 typedef void XtString ;
226 typedef struct _SgThumbWheelPart {
234 unsigned char orientation;
241 int drag_begin_value;
242 int last_mouse_position;
244 int pegged_mouse_position;
245 Dimension viewable_pixels;
255 Pixmap current_quiet_pixmap;
256 Pixmap current_hilite_pixmap;
259 Pixmap button_quiet_pixmap;
260 Pixmap button_hilite_pixmap;
280 XmPrimitivePart primitive;
281 SgThumbWheelPart thumbWheel;
290 void GetForegroundGC() ;
291 int ConvertPixelsToUserUnits(
int pixels);
292 int ConvertUserUnitsToPixels(
int uu);
293 void CreateAndRenderPixmaps() ;
296 HDC SetupGC(
int nGC) ;
298 void RenderPixmap(
int which);
299 void RenderButtonPixmaps();
303 void SetCurrentPixmap(
SbBool value_increased) ;
307 SbBool MouseIsInWheel(
int event_x,
int event_y);
308 SbBool MouseIsInButton(
int event_x,
int event_y);
310 void Motion(
XEvent *event, XtString *params, Cardinal *num_params);
311 void Btn1Down(
XEvent *event, XtString *params, Cardinal *num_params);
312 void Btn2Down(
XEvent *event, XtString *params, Cardinal *num_params);
313 void Btn3Down(
XEvent *event, XtString *params, Cardinal *num_params);
314 void Btn1Motion(
XEvent *event, XtString *params, Cardinal *num_params);
315 void Btn2Motion(
XEvent *event, XtString *params, Cardinal *num_params);
316 void Btn3Motion(
XEvent *event, XtString *params, Cardinal *num_params);
317 void Btn1Up(
XEvent *event, XtString *params, Cardinal *num_params) ;
318 void Btn2Up(
XEvent *event, XtString *params, Cardinal *num_params) ;
319 void Btn3Up(
XEvent *event, XtString *params, Cardinal *num_params) ;
320 void Enter(
XEvent *event, XtString *params, Cardinal *num_params);
321 void Leave(
XEvent *event, XtString *params, Cardinal *num_params);
323 void PageUp(
XEvent *event, XtString *params, Cardinal *num_params);
324 void PageDown(
XEvent *event, XtString *params, Cardinal *num_params);
325 void Up(
XEvent *event, XtString *params, Cardinal *num_params);
326 void Down(
XEvent *event, XtString *params, Cardinal *num_params);
327 void Left(
XEvent *event, XtString *params, Cardinal *num_params);
328 void Right(
XEvent *event, XtString *params, Cardinal *num_params);
329 void Help(
XEvent *event, XtString *params, Cardinal *num_params);
330 void BeginLine(
XEvent *event, XtString *params, Cardinal *num_params);
331 void EndLine(
XEvent *event, XtString *params, Cardinal *num_params);
332 void ArmHomeButton() ;
333 void DisarmHomeButton() ;
334 void RenderButtonShadows() ;
335 int ProcessMouseEvent(
int event_x,
int event_y) ;
336 void IssueCallback(
int reason,
int value,
XEvent *event) ;
#define TRUE
Possible value of SbBool.
void setAnimate(SbBool n)
void addDragCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
void setOrientation(unsigned char n)
void removeStartCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
void setAngleRange(int n)
void removeFinishCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
void setShadowThickness(int n)
SoWinGDIThumbWheel(SoWidget parent=NULL, const char *name=NULL, SbBool buildInsideParent=TRUE, SbBool horizontal=TRUE)
void addValueChangedCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
void removeValueChangedCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
void setShowHomeButton(SbBool n)
SoWinGDIThumbWheel * SgThumbWheelWidget
void setHomePosition(int n)
void setHighlightThickness(int n)
void addStartCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
void addFinishCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
void setBounds(int nLower, int nUpper)
void SoWinGDIThumbWheelCB(void *userData, void *data)
void setUnitsPerRotation(int n)
void removeDragCallback(SoWinGDIThumbWheelCB *f, void *userData=NULL)
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Translates and r...