diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-03-08 13:51:01 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2016-03-08 13:51:01 +0000 |
| commit | bcb756da38ff65e028ca054f0bfae7cd122a7349 (patch) | |
| tree | c534d4afe2f90b14d11f0b75516fbd65873e277a /FL/Fl_Valuator.H | |
| parent | ad230031f5e3f1a2777645f45cbf01aa5e2c97db (diff) | |
Improve documentation of Fl_Valuator class.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11318 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Valuator.H')
| -rw-r--r-- | FL/Fl_Valuator.H | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/FL/Fl_Valuator.H b/FL/Fl_Valuator.H index 6ec496aab..9fc36f7bf 100644 --- a/FL/Fl_Valuator.H +++ b/FL/Fl_Valuator.H @@ -3,7 +3,7 @@ // // Valuator header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2010 by Bill Spitzak and others. +// Copyright 1998-2016 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -34,13 +34,16 @@ The Fl_Valuator class controls a single floating-point value and provides a consistent interface to set the value, range, and step, and insures that callbacks are done the same for every object. - <P>There are probably more of these classes in FLTK than any others: - <P ALIGN=CENTER>\image html valuators.png</P> - \image latex valuators.png "Valuators derived from Fl_Valuators" width=10cm - <P>In the above diagram each box surrounds an actual subclass. These - are further differentiated by setting the type() of the widget t - o the symbolic value labeling the widget. - The ones labelled "0" are the default versions with a type(0). + + There are probably more of these classes in FLTK than any others: + + <P ALIGN=CENTER>\image html valuators.png</P> + \image latex valuators.png "Valuators derived from Fl_Valuators" width=10cm + + In the above diagram each box surrounds an actual subclass. These + are further differentiated by setting the type() of the widget to + the symbolic value labeling the widget. + The ones labelled "0" are the default versions with a type(0). For consistency the symbol FL_VERTICAL is defined as zero. */ class FL_EXPORT Fl_Valuator : public Fl_Widget { @@ -84,18 +87,18 @@ public: range. This clamping is done <I>after</I> rounding to the step value (this makes a difference if the range is not a multiple of the step). - - <P>The minimum may be greater than the maximum. This has the + + The minimum may be greater than the maximum. This has the effect of "reversing" the object so the larger values are in the opposite direction. This also switches which end of - the filled sliders is filled.</P> - - <P>Some widgets consider this a "soft" range. This + the filled sliders is filled. + + Some widgets consider this a "soft" range. This means they will stop at the range, but if the user releases and grabs the control again and tries to move it further, it is - allowed.</P> - - <P>The range may affect the display. You must redraw() + allowed. + + The range may affect the display. You must redraw() the widget after changing the range. */ void range(double a, double b) {min = a; max = b;} @@ -107,16 +110,16 @@ public: /** Gets or sets the step value. As the user moves the mouse the value is rounded to the nearest multiple of the step value. This - is done <I>before</I> clamping it to the range. For most widgets + is done \e before clamping it to the range. For most widgets the default step is zero. - - <P>For precision the step is stored as the ratio of two - integers, A/B. You can set these integers directly. Currently + + For precision the step is stored as the ratio of a double \p A and + an integer \p B = A/B. You can set these values directly. Currently setting a floating point value sets the nearest A/1 or 1/B value possible. */ double step() const {return A/B;} - void precision(int); + void precision(int digits); /** Gets the floating point(double) value. See int value(double) */ double value() const {return value_;} |
