25#ifndef _SO_WIN_SLIDER_
26#define _SO_WIN_SLIDER_
28#include <Inventor/Win/SoWinBeginStrict.h>
29#include <Inventor/misc/SoCallbackList.h>
30#include <Inventor/Win/SoWinGDIWidget.h>
32class SoFloatCallbackList;
36typedef void SoWinSliderCB(
void *userData,
float val);
52 SoWinSlider(SoWidget parent = NULL,
53 const char *name = NULL,
54 SbBool buildInsideParent = TRUE);
65 void setValue(
float v,
SbBool updateText = TRUE);
66 float getValue()
const {
return value; }
72 void setLabel(
const char *newlabel);
73 const char *getLabel()
const {
return labelStr; }
80 void setNumericFieldVisible(
SbBool b);
81 SbBool isNumericFieldVisible()
const {
return numberVisible; }
90 void addStartCallback(SoWinSliderCB *f,
void *userData = NULL);
91 void addValueChangedCallback( SoWinSliderCB *f,
void *userData = NULL);
92 void addFinishCallback(SoWinSliderCB *f,
void *userData = NULL);
94 void removeStartCallback(SoWinSliderCB *f,
void *userData = NULL);
95 void removeValueChangedCallback(SoWinSliderCB *f,
void *userData = NULL);
96 void removeFinishCallback(SoWinSliderCB *f,
void *userData = NULL);
99 void interactivity(
SbBool flag ) { interactive = flag; }
100 SbBool isInteractive() {
return interactive; }
113 void setSliderSize(
const SbVec2s &size);
116 void setNumberWidget(SoWidget hWnd) {numberWidget = hWnd;};
117 SoWidget getNumberWidget() {
return numberWidget;} ;
118 static void textFieldCB(SoWinSlider *p,SoWidget hCtrl);
126 SoWinSlider(SoWidget parent,
132 virtual void redraw();
133 virtual void processEvent(XAnyEvent *anyevent);
134 virtual void sizeChanged(
const SbVec2s &newSize);
136 SoWidget buildWidget(SoWidget parent);
142 virtual void drawSliderTopRegion();
146 short slx1, sly1, slx2, sly2;
147 short thumx1, thumy1, thumx2, thumy2;
151 SoWidget mgrWidget, numberWidget, sliderWidget, labelWidget;
159 short position, posdiff;
162 void doLabelLayout();
163 void doNumberLayout();
166 SoFloatCallbackList *startCallbacks;
167 SoFloatCallbackList *changedCallbacks;
168 SoFloatCallbackList *finishCallbacks;
172 void constructorCommon(
SbBool buildNow);
176#include <Inventor/Win/SoWinEndStrict.h>
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Translates and r...