@ -34,12 +34,12 @@ and label string. The default type is <TT>FL_NORMAL_DIAL</TT>.
@@ -34,12 +34,12 @@ and label string. The default type is <TT>FL_NORMAL_DIAL</TT>.
Destroys the valuator.
<H4><Aname=Fl_Dial.angles>void Fl_Dial::angles(short a, short b)</A></H4>
Sets the angles used for the minimum and maximum values. By default
these are 225 and 135, respectively. (0 degrees is straight up and the
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 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()).
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
@ -114,7 +114,7 @@ int Fl_Dial::handle(int event, int x, int y, int w, int h) {
@@ -114,7 +114,7 @@ int Fl_Dial::handle(int event, int x, int y, int w, int h) {
intmy=Fl::event_y()-y-h/2;
if(!mx&&!my)return1;
angle=atan2((float)-my,(float)-mx)+M_PI;
angle=(angle*360)/(2*M_PI)+90;
angle=(angle*360)/(2*M_PI)+270;
while(angle<oldangle-180)angle+=360;
while(angle>oldangle+180)angle-=360;
if(angle<=a1){
@ -143,9 +143,9 @@ Fl_Dial::Fl_Dial(int x, int y, int w, int h, const char* l)
@@ -143,9 +143,9 @@ Fl_Dial::Fl_Dial(int x, int y, int w, int h, const char* l)
:Fl_Valuator(x,y,w,h,l){
box(FL_OVAL_BOX);
selection_color(FL_INACTIVE_COLOR);// was 37
angles(225,135);
angles(0,360);
}
//
// End of "$Id: Fl_Dial.cxx,v 1.10 1999/03/09 07:51:10 bill Exp $".
// End of "$Id: Fl_Dial.cxx,v 1.11 1999/03/10 00:13:52 carl Exp $".