FLTK 1.3.2

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

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

Public Member Functions | Protected Member Functions
Fl_Value_Output Class Reference

The Fl_Value_Output widget displays a floating point value. More...

`#include <Fl_Value_Output.H>`

Inheritance diagram for Fl_Value_Output:

List of all members.

## Public Member Functions
| 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.
int | handle (int)
| Handles the specified event.
void | soft (uchar s)
| If "soft" is turned on, the user is allowed to drag the value outside the range.
uchar | soft () const
| If "soft" is turned on, the user is allowed to drag the value outside the range.
Fl_Color | textcolor () const
| Sets the color of the text in the value box.
void | textcolor (Fl_Color s)
| Gets 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)
## Protected Member Functions
void | draw ()
| Draws the widget.

## Detailed Description

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.

## Constructor & Destructor Documentation

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.

## Member Function Documentation

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.

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.

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

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.

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.

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

Sets the color of the text in the value box.

void Fl_Value_Output::textcolor | ( | Fl_Color | s | ) | `[inline]`

Gets the color of the text in the value box.

Fl_Font Fl_Value_Output::textfont | ( |  | ) | const`[inline]`

Gets the typeface of the text in the value box.

void Fl_Value_Output::textfont | ( | Fl_Font | s | ) | `[inline]`

Sets the typeface of the text in the value box.

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

Gets the size of the text in the value box.

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

- Fl_Value_Output.H
- Fl_Value_Output.cxx