## class fltk::FloatInput

### Class Hierarchy

    fltk::NumericInput
       |
       +----fltk::FloatInput

### Include Files

    #include <fltk/FloatInput.h>

### Description

The `fltk::FloatInput` class is a subclass of `fltk::Input` that only allows the user to type floating point numbers (sign, digits, decimal point, more digits, 'E' or 'e', sign, digits). This is done by overriding the replace() method on `fltk::Input`. Besides editing the text the user can use the up/down arrow keys to change the digits.

You may want a fltk::ValueInput widget instead. It has value() methods that take and return double values rather than strings.

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.

### Methods

- fltk::FloatInput
- ~FloatInput

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

Creates a new `fltk::FloatInput` widget using the given position, size, and label string.

#### virtual fltk::FloatInput::~FloatInput()

Destroys the widget and any value associated with it.

#### void fltk::Widget::type(int)

The type() can either be either `fltk::FloatInput::FLOAT` or `fltk::FloatInput::INT`. Setting it to `INT` makes this act like the fltk::IntInput subclass.