FLTK 1.3.2

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
Fl_Spinner Class Reference

This widget is a combination of the input widget and repeat buttons. More...

`#include <Fl_Spinner.H>`

Inheritance diagram for Fl_Spinner:

List of all members.

## Public Member Functions
void | color (Fl_Color v)
| Change the background color of the spinner widget's input field.
Fl_Color | color () const
| Return the background color of the spinner widget's input field.
| 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.
Fl_Fontsize | textsize () const
| Gets the size of the text in the input field.
void | textsize (Fl_Fontsize s)
| Sets the size of the text in the input field.
uchar | type () const
| Gets the numeric representation in the input field.
void | type (uchar v)
| Sets the numeric representation in the input field.
double | value () const
| Gets the current value of the widget.
void | value (double v)
| Sets the current value of the widget.

## Detailed Description

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 widget

## Constructor & Destructor Documentation

Fl_Spinner::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.

Inherited destructor Destroys the widget and any value associated with it.

## Member Function Documentation

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.

Parameters:

  [in] | event | the kind of event received

Return values:

  0 | if the event was not used or understood
  1 | if the event was used and can be deleted

See also:
  Fl_Event

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.

Deprecated:

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.

Deprecated:

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*)

See also:
  Fl_Group::resizable(Fl_Widget*)
  Fl_Group::resizable()
  Fl_Widget::resize(int,int,int,int)

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.

Fl_Color Fl_Spinner::textcolor | ( |  | ) | const`[inline]`

Gets the color of the text in the input field.

void Fl_Spinner::textcolor | ( | Fl_Color | c | ) | `[inline]`

Sets 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.

Fl_Fontsize Fl_Spinner::textsize | ( |  | ) | const`[inline]`

Gets the size 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.

uchar Fl_Spinner::type | ( |  | ) | const`[inline]`

Gets the numeric representation in the input field.

See also:
  Fl_Spinner::type(uchar)

Reimplemented from Fl_Widget.

void Fl_Spinner::type | ( | uchar | v | ) | `[inline]`

Sets the numeric representation in the input field.

Valid values are FL_INT_INPUT and FL_FLOAT_INPUT. Also changes the format() template. Setting a new spinner type via a superclass pointer will not work.

Note:
  type is not a virtual function.

Reimplemented from Fl_Widget.

double Fl_Spinner::value | ( |  | ) | const`[inline]`

Gets the current value of the 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.

The documentation for this class was generated from the following files:

- Fl_Spinner.H
- Fl_Group.cxx