diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 1998-10-06 18:21:25 +0000 |
| commit | f9039b2ae21988783feae9b362818e7923e82d14 (patch) | |
| tree | 6d6fe3679d73448758f9794e7d4d4f6b22a4adad /FL/Fl_Dial.H | |
| parent | 67e89232f9ba067825a158734a09e0fa21aacbe3 (diff) | |
Initial revision
git-svn-id: file:///fltk/svn/fltk/trunk@2 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Dial.H')
| -rw-r--r-- | FL/Fl_Dial.H | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/FL/Fl_Dial.H b/FL/Fl_Dial.H new file mode 100644 index 000000000..a6b74c7b1 --- /dev/null +++ b/FL/Fl_Dial.H @@ -0,0 +1,43 @@ +// Fl_Dial.H + +// A circular dial control, like xv uses. From Forms. + +#ifndef Fl_Dial_H +#define Fl_Dial_H + +#ifndef Fl_Valuator_H +#include "Fl_Valuator.H" +#endif + +// values for type(): +#define FL_NORMAL_DIAL 0 +#define FL_LINE_DIAL 1 +#define FL_FILL_DIAL 2 + +#define FL_DIAL_CW 0 +#define FL_DIAL_CCW 1 + +class Fl_Dial : public Fl_Valuator { + + short a1,a2; + uchar direction_; + +protected: + + // these allow subclasses to put the dial in a smaller area: + void draw(int, int, int, int); + int handle(int, int, int, int, int); + void draw(); + +public: + + int handle(int); + Fl_Dial(int x,int y,int w,int h, const char *l = 0); + void angles(short a, short b) {a1=a; a2=b;} + void direction(uchar d) {direction_ = d;} + uchar direction() const {return direction_;} + +}; + +#endif + |
