|
fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |
#include <Fl_Value_Output.H>


Public Member Functions | |
| int | handle (int) |
| Fl_Value_Output (int x, int y, int w, int h, const char *l=0) | |
| void | soft (uchar s) |
| uchar | soft () const |
| Fl_Font | textfont () const |
| void | textfont (Fl_Font s) |
| Fl_Fontsize | textsize () const |
| void | textsize (Fl_Fontsize s) |
| Fl_Color | textcolor () const |
| void | textcolor (Fl_Color s) |
Protected Member Functions | |
| void | draw () |
The Fl_Value_Output widget displays a floating point value. If step() is not zero, the user can adjust the value by dragging the mouse left and right. The left button moves one step() per pixel, the middle by 10 * step(), and the right button by 100 * step().
This is much lighter-weight than Fl_Value_Input because it contains no text editing code or character buffer.
Definition at line 50 of file Fl_Value_Output.H.
| Fl_Value_Output::Fl_Value_Output | ( | int | X, |
| int | Y, | ||
| int | W, | ||
| int | H, | ||
| const char * | l = 0 |
||
| ) |
Creates a new Fl_Value_Output widget using the given position, size, and label string. The default boxtype is FL_NO_BOX.
Inherited destructor destroys the Valuator.
Definition at line 96 of file Fl_Value_Output.cxx.
References Fl_Widget::align(), Fl_Widget::box(), FL_ALIGN_LEFT, FL_FOREGROUND_COLOR, FL_HELVETICA, FL_NO_BOX, and FL_NORMAL_SIZE.
| void Fl_Value_Output::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()
Implements Fl_Widget.
Definition at line 36 of file Fl_Value_Output.cxx.
References Fl_Widget::active_r(), b, Fl_Widget::box(), Fl::box_dh(), Fl::box_dw(), Fl::box_dx(), Fl::box_dy(), buf, Fl_Widget::color(), Fl_Widget::damage(), Fl_Widget::draw_box(), FL_ALIGN_LEFT, fl_color(), FL_DAMAGE_CHILD, FL_DOWN_BOX, fl_draw(), fl_font(), fl_inactive(), fl_rectf(), Fl_Valuator::format(), Fl_Widget::h(), H, textcolor(), textfont(), textsize(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().
| int Fl_Value_Output::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_Widget.
Definition at line 55 of file Fl_Value_Output.cxx.
References Fl_Valuator::clamp(), Fl::event_button(), Fl::event_x(), FL_DRAG, FL_ENTER, FL_LEAVE, FL_PUSH, FL_RELEASE, Fl_Valuator::handle_drag(), Fl_Valuator::handle_push(), Fl_Valuator::handle_release(), Fl_Valuator::increment(), Fl_Valuator::previous_value(), Fl_Valuator::round(), soft(), Fl_Valuator::softclamp(), and Fl_Valuator::step().
| uchar Fl_Value_Output::soft | ( | ) | const [inline] |
If "soft" is turned on, the user is allowed to drag the value outside the range. If they drag the value to one of the ends, let go, then grab again and continue to drag, they can get to any value. Default is one.
Definition at line 76 of file Fl_Value_Output.H.
Referenced by handle().
| void Fl_Value_Output::soft | ( | uchar | s | ) | [inline] |
If "soft" is turned on, the user is allowed to drag the value outside the range. If they drag the value to one of the ends, let go, then grab again and continue to drag, they can get to any value. Default is one.
Definition at line 69 of file Fl_Value_Output.H.
| Fl_Color Fl_Value_Output::textcolor | ( | ) | const [inline] |
Sets the color of the text in the value box.
Definition at line 86 of file Fl_Value_Output.H.
Referenced by draw(), and Fl_Value_Output_Type::textstuff().
| void Fl_Value_Output::textcolor | ( | Fl_Color | s | ) | [inline] |
Gets the color of the text in the value box.
Definition at line 88 of file Fl_Value_Output.H.
| Fl_Font Fl_Value_Output::textfont | ( | ) | const [inline] |
Gets the typeface of the text in the value box.
Definition at line 79 of file Fl_Value_Output.H.
Referenced by draw(), Fl_Value_Output_Type::ideal_size(), and Fl_Value_Output_Type::textstuff().
| void Fl_Value_Output::textfont | ( | Fl_Font | s | ) | [inline] |
Sets the typeface of the text in the value box.
Definition at line 81 of file Fl_Value_Output.H.
| void Fl_Value_Output::textsize | ( | Fl_Fontsize | s | ) | [inline] |
Definition at line 84 of file Fl_Value_Output.H.
| Fl_Fontsize Fl_Value_Output::textsize | ( | ) | const [inline] |
Gets the size of the text in the value box.
Definition at line 83 of file Fl_Value_Output.H.
Referenced by draw(), Fl_Value_Output_Type::ideal_size(), and Fl_Value_Output_Type::textstuff().