FLTK 1.3.0
Fl_Repeat_Button Class Reference

The Fl_Repeat_Button is a subclass of Fl_Button that generates a callback when it is pressed and then repeatedly generates callbacks as long as it is held down. More...

#include <Fl_Repeat_Button.H>

Inheritance diagram for Fl_Repeat_Button:
Fl_Button Fl_Widget

List of all members.

Public Member Functions

void deactivate ()
 Deactivates the widget.
 Fl_Repeat_Button (int X, int Y, int W, int H, const char *l=0)
 Creates a new Fl_Repeat_Button widget using the given position, size, and label string.
int handle (int)
 Handles the specified event.

Detailed Description

The Fl_Repeat_Button is a subclass of Fl_Button that generates a callback when it is pressed and then repeatedly generates callbacks as long as it is held down.

The speed of the repeat is fixed and depends on the implementation.


Constructor & Destructor Documentation

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

Creates a new Fl_Repeat_Button widget using the given position, size, and label string.

The default boxtype is FL_UP_BOX. Deletes the button.


Member Function Documentation

void Fl_Repeat_Button::deactivate ( ) [inline]

Deactivates the widget.

Inactive widgets will be drawn "grayed out", e.g. with less contrast than the active widget. Inactive widgets will not receive any keyboard or mouse button events. Other events (including FL_ENTER, FL_MOVE, FL_LEAVE, FL_SHORTCUT, and others) will still be sent. A widget is only active if active() is true on it and all of its parents.

Changing this value will send FL_DEACTIVATE to the widget if active_r() is true.

Currently you cannot deactivate Fl_Window widgets.

See also:
activate(), active(), active_r()

Reimplemented from Fl_Widget.

int Fl_Repeat_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.


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