Other Thumbwheel Routines (XForms (Forms Library) - Version 1.2 (Rev. 4) A Graphical User Interface Toolkit for X)

Next: Thumbwheel Attributes, Previous: Thumbwheel Interaction, Up: Thumbwheel Object [Contents][Index]

#### 17.7.4 Other Thumbwheel Routines

To change the value and bounds of a thumbwheel use the following routines

    double fl_set_thumbwheel_value(FL_OBJECT *obj, double val);
    void fl_set_thumbwheel_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 value or bounds of a thumbwheel use

    double fl_get_thumbwheel_value(FL_OBJECT *obj);
    void fl_get_thumbwheel_bounds(FL_OBJECT *obj, double *min, double *max);

By default, the bounds are "hard", i.e., once you reach the minimum or maximum, the wheel would not turn further in this direction. However, if desired, you can make the bounds to turn over such that it crosses over from the minimum to the maximum value and vice versa. To this end, the following routine is available

    int fl_set_thumbwheel_crossover(FL_OBJECT *obj, int yes_no);

In a number of situations you might like thumbwheel values to be rounded to some values, e.g., to integer values. To this end use the routine

    void fl_set_thumbwheel_step(FL_OBJECT *obj, double step);

After this call thumbwheel values will be rounded to multiples of `step`. Use a value 0.0 for `step` to switch off rounding.

To get the current setting for this call

    double fl_set_thumbwheel_step(FL_OBJECT *obj);