FLTK 1.3.0
|
The Fl_Value_Slider widget is a Fl_Slider widget with a box displaying the current value. More...
#include <Fl_Value_Slider.H>
Public Member Functions | |
Fl_Value_Slider (int x, int y, int w, int h, const char *l=0) | |
Creates a new Fl_Value_Slider widget using the given position, size, and label string. | |
int | handle (int) |
Handles the specified event. | |
Fl_Color | textcolor () const |
Gets the color of the text in the value box. | |
void | textcolor (Fl_Color s) |
Sets the color of the text in the value box. | |
Fl_Font | textfont () const |
Gets the typeface of the text in the value box. | |
void | textfont (Fl_Font s) |
Sets the typeface of the text in the value box. | |
Fl_Fontsize | textsize () const |
Gets the size of the text in the value box. | |
void | textsize (Fl_Fontsize s) |
Sets the size of the text in the value box. | |
Protected Member Functions | |
void | draw () |
Draws the widget. |
The Fl_Value_Slider widget is a Fl_Slider widget with a box displaying the current value.
Fl_Value_Slider::Fl_Value_Slider | ( | int | X, |
int | Y, | ||
int | W, | ||
int | H, | ||
const char * | l = 0 |
||
) |
Creates a new Fl_Value_Slider widget using the given position, size, and label string.
The default boxtype is FL_DOWN_BOX.
void Fl_Value_Slider::draw | ( | ) | [protected, virtual] |
Draws the widget.
Never call this function directly. FLTK will schedule redrawing whenever needed. If your widget must be redrawn as soon as possible, call redraw() instead.
Override this function to draw your own widgets.
If you ever need to call another widget's draw method from within your own draw() method, e.g. for an embedded scrollbar, you can do it (because draw() is virtual) like this:
Fl_Widget *s = &scroll; // scroll is an embedded Fl_Scrollbar s->draw(); // calls Fl_Scrollbar::draw()
Reimplemented from Fl_Slider.
int Fl_Value_Slider::handle | ( | int | event | ) | [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_Slider.
Fl_Color Fl_Value_Slider::textcolor | ( | ) | const [inline] |
Gets the color of the text in the value box.
void Fl_Value_Slider::textcolor | ( | Fl_Color | s | ) | [inline] |
Sets the color of the text in the value box.
Fl_Font Fl_Value_Slider::textfont | ( | ) | const [inline] |
Gets the typeface of the text in the value box.
void Fl_Value_Slider::textfont | ( | Fl_Font | s | ) | [inline] |
Sets the typeface of the text in the value box.
Fl_Fontsize Fl_Value_Slider::textsize | ( | ) | const [inline] |
Gets the size of the text in the value box.
void Fl_Value_Slider::textsize | ( | Fl_Fontsize | s | ) | [inline] |
Sets the size of the text in the value box.