## class fltk::ValueInput

### Class Hierarchy

    fltk::Valuator
       |
       +----fltk::ValueInput

### Include Files

    #include <fltk/ValueInput.h>

### Description

Controls a single floating point value through a combination of a fltk::FloatInput and two buttons. Other toolkits call this a "Spin Box".

Clicking the buttons increments/decrements by the linesize(). Holding down shift (or ctrl or alt) and clicking increments/decrements by the pagesize().

If step() is greater or equal to 1.0 an fltk::IntInput is used instead. This prevents the user from typing anything other than digits. If step() is less than one then the user can type floating point values with decimal points and exponents.

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.

You can get at the input field by using the public "input" instance variable. For instance you can clobber the text to a word with `value_input->input.static_value("word")`.

### Methods

- fltk::ValueInput
- ~ValueInput

#### fltk::ValueInput::ValueInput(int x, int y, int w, int h, const char *label = 0)

Creates a new `fltk::ValueInput` widget using the given position, size, and label string. The default boxtype is `fltk::DOWN_BOX`.

#### virtual fltk::ValueInput::~ValueInput()

Destroys the valuator.