Next: Dial Attributes, Previous: Dial Interaction, Up: Dial Object [Contents][Index]
To change the value of the dial and its bounds use
void fl_set_dial_value(FL_OBJECT *obj, double val); void fl_set_dial_bounds(FL_OBJECT *obj, double min, double max);
By default, the minimum value is 0.0, the maximum is 1.0 and the value is 0.5.
To obtain the current values of the dial and its bounds use
double fl_get_dial_value(FL_OBJECT *obj); void fl_get_dial_bounds(FL_OBJECT *obj, double *min, double *max);
Sometimes, it might be desirable to limit the angular range a dial can take or choose an angle other than 0 to represent the minimum value. For this purpose, use the following routine
void fl_set_dial_angles(FL_OBJECT *obj, double thetai, double thetaf)
where thetai
maps to the minimum value of the dial and
thetaf
to its maximum value. The angles are relative to the
origin of the dial, which is by default at 6 o’clock and rotates
clock-wise. By default, the minimum angle is 0 and the maximum angle
is 360.
To obtain the start and end angles use
void fl_get_dial_angles(FL_OBJECT *obj, double *thetai, double *thetaf)
By default, crossing from 359.9 to 0 or from 0 to 359.9 is not allowed. To allowing crossing over, use the following routine
void fl_set_dial_crossover(FL_OBJECT *obj, int yes_no);
where a true value for yes_no
indicates that cross-over is
allowed.
In a number of situations you might want dial values to be rounded to some values, e.g., to integer values. To this end use the routine
void fl_set_dial_step(FL_OBJECT *obj, double step);
After this call dial values will be rounded to multiples of
step
. Use a value of 0.0 for step
to switch off
rounding.
To get the current setting for the rounding steps use
double fl_get_dial_step(FL_OBJECT *obj);
By default, clock-wise rotation increases the dial value. To change, use the following routine
void fl_set_dial_direction(FL_OBJECT *obj, int dir);
where dir
can be either
FL_DIAL_CCW
or
FL_DIAL_CW
.
int fl_get_dial_direction(FL_OBJECT *obj);
Next: Dial Attributes, Previous: Dial Interaction, Up: Dial Object [Contents][Index]