From a33f1f7b35bdb1ea39e458c2b7c4cdff13fb3650 Mon Sep 17 00:00:00 2001
From: Matthias Melcher Uses internal rules to format the fields numerical value into
+the character array pointed to by the passed parameter. 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. This method is used by the Fl_Value_... 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 buffer.
-buffer should have space for up to 128 bytes.int Fl_Valuator::format(char *buffer)
+
You may override this function to create your own text formatting.
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">Fl_Input widget with there - and when they hit return or tab the value updates to what they typed and the callback is done. +If step() 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 Fl_Input widget +is of type(FL_FLOAT_INPUT).
+If step() is non-zero, the user can also drag the mouse across the object and thus slide the value. The left button moves one step() per pixel, the middle by 10 -- cgit v1.2.3