FLTK 1.3.0
|
This widget is a combination of the input widget and repeat buttons. More...
#include <Fl_Spinner.H>
Public Member Functions | |
Fl_Spinner (int X, int Y, int W, int H, const char *L=0) | |
Creates a new Fl_Spinner widget using the given position, size, and label string. | |
const char * | format () |
Sets or returns the format string for the value. | |
void | format (const char *f) |
Sets or returns the format string for the value. | |
int | handle (int event) |
Handles the specified event. | |
double | maximum () const |
Gets the maximum value of the widget. | |
void | maximum (double m) |
Sets the maximum value of the widget. | |
double | maxinum () const |
Speling mistakes retained for source compatibility. | |
double | minimum () const |
Gets the minimum value of the widget. | |
void | minimum (double m) |
Sets the minimum value of the widget. | |
double | mininum () const |
Speling mistakes retained for source compatibility. | |
void | range (double a, double b) |
Sets the minimum and maximum values for the widget. | |
void | resize (int X, int Y, int W, int H) |
Resizes the Fl_Group widget and all of its children. | |
double | step () const |
Sets or returns the amount to change the value when the user clicks a button. | |
void | step (double s) |
See double Fl_Spinner::step() const. | |
Fl_Color | textcolor () const |
Gets the color of the text in the input field. | |
void | textcolor (Fl_Color c) |
Sets the color of the text in the input field. | |
Fl_Font | textfont () const |
Gets the font of the text in the input field. | |
void | textfont (Fl_Font f) |
Sets the font of the text in the input field. | |
void | textsize (Fl_Fontsize s) |
Sets the size of the text in the input field. | |
Fl_Fontsize | textsize () const |
Gets the size of the text in the input field. | |
void | type (uchar v) |
Sets the numeric representation in the input field. | |
uchar | type () const |
Gets the numeric representation in the input field. | |
void | value (double v) |
Sets the current value of the widget. | |
double | value () const |
Gets the current value of the widget. |
This 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.
Fl_Spinner::Fl_Spinner | ( | int | X, |
int | Y, | ||
int | W, | ||
int | H, | ||
const char * | L = 0 |
||
) | [inline] |
Creates a new Fl_Spinner widget using the given position, size, and label string.
Inherited destructor Destroys the widget and any value associated with it.
const char* Fl_Spinner::format | ( | ) | [inline] |
Sets or returns the format string for the value.
void Fl_Spinner::format | ( | const char * | f | ) | [inline] |
Sets or returns the format string for the value.
int Fl_Spinner::handle | ( | int | event | ) | [inline, virtual] |
Handles the specified event.
You normally don't call this method directly, but instead let FLTK do it when the user interacts with the widget.
When implemented in a widget, this function must return 0 if the widget does not use the event or 1 otherwise.
Most of the time, you want to call the inherited handle() method in your overridden method so that you don't short-circuit events that you don't handle. In this last case you should return the callee retval.
[in] | event | the kind of event received |
0 | if the event was not used or understood |
1 | if the event was used and can be deleted |
Reimplemented from Fl_Group.
double Fl_Spinner::maximum | ( | ) | const [inline] |
Gets the maximum value of the widget.
void Fl_Spinner::maximum | ( | double | m | ) | [inline] |
Sets the maximum value of the widget.
double Fl_Spinner::maxinum | ( | ) | const [inline] |
Speling mistakes retained for source compatibility.
double Fl_Spinner::minimum | ( | ) | const [inline] |
Gets the minimum value of the widget.
void Fl_Spinner::minimum | ( | double | m | ) | [inline] |
Sets the minimum value of the widget.
double Fl_Spinner::mininum | ( | ) | const [inline] |
Speling mistakes retained for source compatibility.
void Fl_Spinner::range | ( | double | a, |
double | b | ||
) | [inline] |
Sets the minimum and maximum values for the widget.
void Fl_Spinner::resize | ( | int | X, |
int | Y, | ||
int | W, | ||
int | H | ||
) | [inline, virtual] |
Resizes the Fl_Group widget and all of its children.
The Fl_Group widget first resizes itself, and then it moves and resizes all its children according to the rules documented for Fl_Group::resizable(Fl_Widget*)
Reimplemented from Fl_Group.
double Fl_Spinner::step | ( | ) | const [inline] |
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 Fl_Spinner::textcolor | ( | Fl_Color | c | ) | [inline] |
Sets the color of the text in the input field.
Fl_Color Fl_Spinner::textcolor | ( | ) | const [inline] |
Gets the color of the text in the input field.
Fl_Font Fl_Spinner::textfont | ( | ) | const [inline] |
Gets the font of the text in the input field.
void Fl_Spinner::textfont | ( | Fl_Font | f | ) | [inline] |
Sets the font of the text in the input field.
void Fl_Spinner::textsize | ( | Fl_Fontsize | s | ) | [inline] |
Sets the size of the text in the input field.
Fl_Fontsize Fl_Spinner::textsize | ( | ) | const [inline] |
Gets the size of the text in the input field.
void Fl_Spinner::type | ( | uchar | v | ) | [inline] |
uchar Fl_Spinner::type | ( | ) | const [inline] |
Gets the numeric representation in the input field.
Reimplemented from Fl_Widget.
void Fl_Spinner::value | ( | double | v | ) | [inline] |
Sets the current value of the widget.
Before setting value to a non-integer value, the spinner type() should be changed to floating point.
double Fl_Spinner::value | ( | ) | const [inline] |
Gets the current value of the widget.