Inherited by fltk::IntInput.
Public Types | |
enum | { FLOAT, INT } |
Public Member Functions | |
FloatInput (int x, int y, int w, int h, const char *l=0) | |
double | fvalue () const |
int | ivalue () const |
long | lvalue () const |
You may want a ValueInput widget instead. It has up/down buttons (what is called a "Spinner" in some toolkits).
If you change when() to fltk::WHEN_ENTER_KEY the callback is only done when the user hits the up/down arrow keys or when the user types the Enter key. This may be more useful than the default setting of fltk::WHEN_CHANGED which can make the callback happen when partially-edited numbers are in the field.
The type() can either be either FloatInput::FLOAT or FloatInput::INT. Setting it to INT makes this act like the IntInput subclass.
long FloatInput::lvalue | ( | ) | const |
FloatInput::ivalue() const Convert the string to an integer, using int(strtol())
Convert the string to a long using strtol()
References fltk::Input::text().
double FloatInput::fvalue | ( | ) | const |
Convert the string to a double using strtod()
References fltk::Input::text().