diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-03-29 14:54:39 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-03-29 14:54:39 +0000 |
| commit | a33f1f7b35bdb1ea39e458c2b7c4cdff13fb3650 (patch) | |
| tree | c9684eff206f54129fe6be3a80d73d2842241831 /documentation | |
| parent | 668f1270247aab38f4b8ad78ad0c44e9a87278f6 (diff) | |
STR 1167: updated documentation for Fl_Valuator and Fl_Value_Input
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4885 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'documentation')
| -rw-r--r-- | documentation/Fl_Valuator.html | 15 | ||||
| -rw-r--r-- | documentation/Fl_Value_Input.html | 6 |
2 files changed, 19 insertions, 2 deletions
diff --git a/documentation/Fl_Valuator.html b/documentation/Fl_Valuator.html index b2dc188b0..dc8dcefa5 100644 --- a/documentation/Fl_Valuator.html +++ b/documentation/Fl_Valuator.html @@ -97,11 +97,22 @@ turned off by <TT>value(x)</TT> and just before doing a callback <H4><A name=Fl_Valuator.format>int Fl_Valuator::format(char *buffer)</A></H4> +<P>Uses internal rules to format the fields numerical value into +the character array pointed to by the passed parameter.</P> + +<P>The actual format used depends on the current step value. If +the step value has been set to zero then a %g format is used. +If the step value is non-zero, then a %.*f format is used, +where the precision is calculated to show sufficient digits +for the current step value. An integer step value, such as 1 +or 1.0, gives a precision of 0, so the formatted value will +appear as an integer.</P> + <P>This method is used by the <TT>Fl_Value_...</TT> group of widgets to format the current value into a text string. The return value is the length of the formatted text. -The text itself is returned in <i>buffer</i>. -<i>buffer</i> should have space for up to 128 bytes.</P> +The formatted value is written into in <i>buffer</i>. +<i>buffer</i> should have space for at least 128 bytes.</P> <P>You may override this function to create your own text formatting.</P> diff --git a/documentation/Fl_Value_Input.html b/documentation/Fl_Value_Input.html index eed734574..eb13af664 100644 --- a/documentation/Fl_Value_Input.html +++ b/documentation/Fl_Value_Input.html @@ -31,6 +31,12 @@ href="Fl_Input.html#Fl_Input"><TT>Fl_Input</TT></A> widget with there - and when they hit return or tab the value updates to what they typed and the callback is done. +<P>If <TT>step()</TT> is non-zero and integral, then the range of numbers +is limited to integers instead of floating point numbers. As +well as displaying the value as an integer, typed input is also +limited to integer values, even if the hidden <TT>Fl_Input</TT> widget +is of <TT>type(FL_FLOAT_INPUT)</TT>.</P> + <P>If <TT>step()</TT> is non-zero, the user can also drag the mouse across the object and thus slide the value. The left button moves one <TT>step()</TT> per pixel, the middle by <TT>10 |
