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)  

Fl_Roller Class Reference

#include <Fl_Roller.H>

Inheritance diagram for Fl_Roller:
Collaboration diagram for Fl_Roller:

List of all members.

Public Member Functions

int handle (int)
 Fl_Roller (int X, int Y, int W, int H, const char *L=0)

Protected Member Functions

void draw ()

Detailed Description

The Fl_Roller widget is a "dolly" control commonly used to move 3D objects.

Fl_Roller.png

Definition at line 44 of file Fl_Roller.H.


Constructor & Destructor Documentation

Fl_Roller::Fl_Roller ( int  X,
int  Y,
int  W,
int  H,
const char *  L = 0 
)

Creates a new Fl_Roller widget using the given position, size, and label string. The default boxtype is FL_NO_BOX.

Inherited destructor destroys the valuator.

Definition at line 177 of file Fl_Roller.cxx.

References Fl_Widget::box(), FL_UP_BOX, and Fl_Valuator::step().


Member Function Documentation

void Fl_Roller::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 89 of file Fl_Roller.cxx.

References Fl_Widget::active_r(), Fl_Widget::box(), Fl::box_dh(), Fl::box_dw(), Fl::box_dx(), Fl::box_dy(), Fl_Widget::color(), Fl_Widget::damage(), Fl_Widget::draw_box(), Fl_Widget::draw_focus(), fl_color(), FL_DAMAGE_ALL, FL_DARK2, FL_DARK3, FL_GRAY, FL_LIGHT1, FL_LIGHT2, fl_rectf(), FL_THIN_UP_FRAME, fl_xyline(), fl_yxline(), Fl::focus(), Fl_Widget::h(), H, Fl_Valuator::horizontal(), i, int, Fl_Valuator::step(), Fl_Valuator::value(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().

int Fl_Roller::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]eventthe kind of event received
Return values:
0if the event was not used or understood
1if the event was used and can be deleted
See also:
Fl_Event

Reimplemented from Fl_Widget.

Definition at line 35 of file Fl_Roller.cxx.

References Fl_Valuator::clamp(), Fl::event_key(), Fl::event_x(), Fl::event_y(), FL_Down, FL_DRAG, FL_ENTER, FL_FOCUS, FL_KEYBOARD, FL_LEAVE, FL_Left, FL_PUSH, FL_RELEASE, FL_Right, FL_UNFOCUS, FL_Up, Fl::focus(), Fl_Valuator::handle_drag(), Fl_Valuator::handle_push(), Fl_Valuator::handle_release(), Fl_Valuator::horizontal(), Fl_Valuator::increment(), Fl_Valuator::previous_value(), Fl_Widget::redraw(), Fl_Valuator::round(), Fl_Valuator::value(), and Fl::visible_focus().


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