class Fl_Spinner


Class Hierarchy

Include Files

Description

The Fl_Spinner widget is a combination of the input widget and repeat buttons. The user can either type into the input area or use the buttons to change the value.

Methods

Fl_Spinner::Fl_Spinner(int x, int y, int w, int h, const char *label = 0)

Creates a new Fl_Spinner widget using the given position, size, and label string.

virtual Fl_Spinner::~Fl_Spinner()

Destroys the widget and any value associated with it.

void format(const char *f)
const char *format()

Sets or returns the format string for the value.

void maximum(double m)
double maximum() const

Sets or returns the maximum value of the widget.

void minimum(double m)
double minimum() const

Sets or returns the minimum value of the widget.

void range(double minval, double maxval)

Sets the minimum and maximum values for the widget.

void step(double s)
double step() const

Sets or returns the amount to change the value when the user clicks a button. Before setting step to a non-integer value, the spinner type() should be changed to floating point.

void textcolor(Fl_Color c)
Fl_Color textcolor() const

Sets or returns the color of the text in the input field.

void textfont(uchar f)
uchar textfont() const

Sets or returns the font of the text in the input field.

void textsize(uchar s)
uchar textsize() const

Sets or returns the size of the text in the input field.

void type(uchar s)
uchar type() const

Sets or returns the numeric representation in the input field. Valid values are FL_INT_INPUT and FL_FLOAT_INPUT. The first form also changes the format() template. Please note that type is not a virtual function. Setting a new spinner type via a superclass pointer will not work.

void Fl_Spinner::value(double v)
double Fl_Spinner::value() const

Sets or returns the current value of the widget. Before setting value to a non-integer value, the spinner type() should be changed to floating point.