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_Return_Button Class Reference

#include <Fl_Return_Button.H>

Inheritance diagram for Fl_Return_Button:
Collaboration diagram for Fl_Return_Button:

List of all members.

Public Member Functions

int handle (int)
 Fl_Return_Button (int X, int Y, int W, int H, const char *l=0)

Protected Member Functions

void draw ()

Detailed Description

The Fl_Return_Button is a subclass of Fl_Button that generates a callback when it is pressed or when the user presses the Enter key. A carriage-return symbol is drawn next to the button label.

Fl_Return_Button.png

Definition at line 42 of file Fl_Return_Button.H.


Constructor & Destructor Documentation

Fl_Return_Button::Fl_Return_Button ( int  X,
int  Y,
int  W,
int  H,
const char *  l = 0 
) [inline]

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

The inherited destructor deletes the button.

Definition at line 52 of file Fl_Return_Button.H.


Member Function Documentation

void Fl_Return_Button::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_Button.

Definition at line 50 of file Fl_Return_Button.cxx.

References Fl_Widget::box(), Fl_Widget::color(), Fl_Button::down_box(), Fl_Widget::draw_box(), Fl_Widget::draw_focus(), Fl_Widget::draw_label(), fl_down(), FL_HIDDEN_BUTTON, fl_return_arrow(), Fl::focus(), Fl_Widget::h(), Fl_Widget::selection_color(), Fl_Widget::type(), Fl_Button::value(), Fl_Widget::w(), Fl_Widget::x(), and Fl_Widget::y().

int Fl_Return_Button::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_Button.

Definition at line 61 of file Fl_Return_Button.cxx.

References Fl_Widget::do_callback(), Fl::event_key(), FL_Enter, FL_KP_Enter, FL_SHORTCUT, and Fl_Button::simulate_key_action().


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