FLTK 1.3.2
|
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>
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. |
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.
Fl_Repeat_Button::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.
The default boxtype is FL_UP_BOX. Deletes the button.
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.
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.
[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_Button.