FLTK Utility Library and Widget Collection (FLU): Flu_Spinner class Reference

Main Page | Class Hierarchy | Class List | File List | Class Members

# Flu_Spinner Class Reference

This class provides a simple spinner widget similar to Fl_Counter, except the manipulator buttons are vertical and you can click, click and hold, or click and drag to change the value. More...

`#include <Flu_Spinner.h>`

List of all members.

## Public Member Functions
| Flu_Spinner (int x, int y, int w, int h, const char *l=0)
| Normal FLTK widget constructor.
| ~Flu_Spinner ()
| Default destructor.
bool | enable_repeating () const
| Get whether the spinner automatically changes when you hold the button down.
void | enable_repeating (bool b)
| Set whether the spinner automatically changes when you hold the button down.
void | repeat (float initialDelay, float initialTime, float rapidDelay, float rapidTime)
| Set the auto repeating parameters.
int | input_when () const
| Get when the input calls the callback.
void | input_when (int w)
| Set when the input calls the callback.
bool | editable () const
| Get whether the input field can be edited. Default is `true`.
void | editable (bool b)
| Set whether the input field can be edited.
int | handle (int)
| Override of Fl_Widget::handle().
void | resize (int X, int Y, int W, int H)
| Override of Fl_Widget::resize().
void | unlimited_range ()
| The default range for Fl_Valuators is [0,1]. This function sets the range of the spinner to +/- infinity.
void | wrap_range (bool b)
| Set whether the value "wraps" to the range during interaction.
bool | wrap_range () const
| Set whether the value "wraps" to the range during interaction.
void | precision (int p)
| Override of Fl_Valuator::precision().
void | value_damage ()
| Override of Fl_Valuator::value_damage().
void | hide ()
| Override of Fl_Valuator::hide().
void | show ()
| Override of Fl_Valuator::show().
Fl_Font | valuefont () const
| Get the font for the widget value.
void | valuefont (uchar s)
| Set the font for the widget value.
uchar | valuesize () const
| Get the size of the font for the widget value.
void | valuesize (uchar s)
| Set the size of the font for the widget value.
Fl_Color | valuecolor () const
| Get the background color of the widget value.
void | valuecolor (unsigned s)
| Set the background color for the widget value.
void | valuecolor (unsigned s, unsigned s1)
| Set the background and selection color for the widget value.
Fl_Color | valuefontcolor () const
| Get the color of the font for the widget value.
void | valuefontcolor (unsigned s)
| Set the color of the font for the widget value.
## Protected Member Functions
void | _setvalue (double v)
void | increment_cb ()
void | draw ()
## Static Protected Member Functions
void | input_cb (Fl_Widget *, void *v)
void | repeat_callback (void *)
## Protected Attributes
NoTabInput | _input
uchar | _valbox [2]
bool | _up
bool | _pushed
bool | _editable
bool | _dragging
float | _totalTime
double | _lastValue
int | _lastY
float | _initialDelay
float | _repeatTime [2]
float | _rapidDelay
bool | _doRepeat
bool | _wrapRange
## Friends
class | NoTabInput

## Detailed Description

This class provides a simple spinner widget similar to Fl_Counter, except the manipulator buttons are vertical and you can click, click and hold, or click and drag to change the value.

## Member Function Documentation

void Flu_Spinner::repeat | ( | float | initialDelay,
|  | float | initialTime,
|  | float | rapidDelay,
|  | float | rapidTime
| ) | `[inline]`

  | Set the auto repeating parameters. Parameters:
  initialDelay | is how long to wait before repeating starts. Default is 0.5 seconds
  initialTime | is how long to wait between value changes. Default is 0.1 seconds (i.e. 10x per second)
  rapidDelay | is how long to wait before repeating more quickly. Default is 2 seconds
  rapidTime | is how long to wait between rapid value changes. Default is 0.02 seconds (i.e. 50x per second)

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

- Flu_Spinner.h