diff --git a/FL/Fl_Dial.H b/FL/Fl_Dial.H index 438f2abb2..ce6fdb312 100644 --- a/FL/Fl_Dial.H +++ b/FL/Fl_Dial.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Dial.H,v 1.6 1999/03/08 21:44:28 carl Exp $" +// "$Id: Fl_Dial.H,v 1.7 1999/03/10 08:17:40 bill Exp $" // // Dial header file for the Fast Light Tool Kit (FLTK). // @@ -35,13 +35,9 @@ #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: @@ -54,14 +50,16 @@ public: FL_EXPORT int handle(int); FL_EXPORT Fl_Dial(int x,int y,int w,int h, const char *l = 0); - void angles(short a, short b); - void direction(uchar d) {direction_ = d;} - uchar direction() const {return direction_;} + short angle1() const {return a1;} + void angle1(short a) {a1 = a;} + short angle2() const {return a2;} + void angle2(short a) {a2 = a;} + void angles(short a, short b) {a1 = a; a2 = b;} }; #endif // -// End of "$Id: Fl_Dial.H,v 1.6 1999/03/08 21:44:28 carl Exp $". +// End of "$Id: Fl_Dial.H,v 1.7 1999/03/10 08:17:40 bill Exp $". // diff --git a/FL/forms.H b/FL/forms.H index 635d75fb5..ac84dc421 100644 --- a/FL/forms.H +++ b/FL/forms.H @@ -1,5 +1,5 @@ // -// "$Id: forms.H,v 1.6 1999/02/16 21:59:48 mike Exp $" +// "$Id: forms.H,v 1.7 1999/03/10 08:17:40 bill Exp $" // // Forms emulation header file for the Fast Light Tool Kit (FLTK). // @@ -618,10 +618,10 @@ inline void fl_get_dial_bounds(Fl_Widget* o, float* a, float* b) { inline void fl_set_dial_return(Fl_Widget* o, int i) { ((Fl_Dial*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));} inline void fl_set_dial_angles(Fl_Widget* o, int a, int b) { - ((Fl_Dial*)o)->angles(a,b);} + ((Fl_Dial*)o)->angles(a, b);} //inline void fl_set_dial_cross(Fl_Widget* o, int); -inline void fl_set_dial_direction(Fl_Widget* o, uchar d) { - ((Fl_Dial*)o)->direction(d);} +// inline void fl_set_dial_direction(Fl_Widget* o, uchar d) { +// ((Fl_Dial*)o)->direction(d);} inline void fl_set_dial_step(Fl_Widget* o, double v) { ((Fl_Dial*)o)->step(v);} @@ -841,5 +841,5 @@ inline void fl_draw() {Fl::flush();} #endif /* define __FORMS_H__ */ // -// End of "$Id: forms.H,v 1.6 1999/02/16 21:59:48 mike Exp $". +// End of "$Id: forms.H,v 1.7 1999/03/10 08:17:40 bill Exp $". // diff --git a/documentation/Fl_Dial.html b/documentation/Fl_Dial.html index db0659f8e..395f4ce9e 100644 --- a/documentation/Fl_Dial.html +++ b/documentation/Fl_Dial.html @@ -23,6 +23,8 @@ single floating point value. @@ -32,14 +34,22 @@ h, const char *label = 0) and label string. The default type is FL_NORMAL_DIAL.

virtual Fl_Dial::~Fl_Dial()

Destroys the valuator. -

void Fl_Dial::angles(short a, short b)

- Sets the angles used for the minimum and maximum values. By default -these are 0 and 360, respectively. (0 degrees is straight down and the -angles progress clockwise.) The angles specified should be greater than -or equal to 0 and less than or equal to 360. The progress of the dial always -starts at the minimum angle and progresses clockwise to the maximum angle. -Currently, counter-clockwise progression is not supported (but user code can -always use 1/value()). + +

+ +short Fl_Dial::angle1() const;
+void Fl_Dial::angle1(short);
+short Fl_Dial::angle2() const;
+void Fl_Dial::angle2(short);
+void Fl_Dial::angles(short a, short b); +
+

+ +Sets the angles used for the minimum and maximum values. The default +values are 45 and 315 (0 degrees is straight down and the angles +progress clockwise). Normally angle1 is less than angle2, but if you +reverse them the dial moves counter-clockwise. +

type(uchar)

Sets the type of the dial to: