FLTK 1.4.4

Loading...
Searching...
No Matches
Fl_Shortcut_Button.H
1//
2// Shortcut Button header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2023 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17#ifndef Fl_Shortcut_Button_H
18#define Fl_Shortcut_Button_H
19
20#include <FL/Fl_Button.H>
21
22 class FL_EXPORT Fl_Shortcut_Button : public Fl_Button {
23 private:
24 bool hot_, pre_hot_, default_set_, handle_default_button_;
25 Fl_Shortcut pre_esc_;
26 Fl_Shortcut default_shortcut_;
27 protected:
28 Fl_Shortcut shortcut_value;
29 void do_end_hot_callback();
30 int handle(int) FL_OVERRIDE;
31 void draw() FL_OVERRIDE;
32 public:
33 Fl_Shortcut_Button(int X,int Y,int W,int H, const char* l = 0);
34 void value(Fl_Shortcut shortcut);
35 Fl_Shortcut value();
36#if 0
37 // Default shortcut settings are disabled until successful review of the UI
38 void default_value(Fl_Shortcut shortcut);
39 Fl_Shortcut default_value();
40 void default_clear();
41#endif
42};
43
44#endif // Fl_Shortcut_Button_H
45
Fl_Button::handle
int handle(int) FL_OVERRIDE
Handles the specified event.
Definition Fl_Button.cxx:104
Fl_Button::draw
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Button.cxx:68
Fl_Button::value
char value() const
Returns the current value of the button (0 or 1).
Definition Fl_Button.H:103
Fl_Button::shortcut
int shortcut() const
Returns the current shortcut key for the button.
Definition Fl_Button.H:123
Fl_Button::Fl_Button
Fl_Button(int X, int Y, int W, int H, const char *L=0)
The constructor creates the button using the given position, size, and label.
Definition Fl_Button.cxx:274
Fl_Shortcut_Button::do_end_hot_callback
void do_end_hot_callback()
Call the callback if the user is interested.
Definition Fl_Shortcut_Button.cxx:168
Fl_Shortcut_Button::Fl_Shortcut_Button
Fl_Shortcut_Button(int X, int Y, int W, int H, const char *l=0)
Construct a shortcut button.
Definition Fl_Shortcut_Button.cxx:46
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
Fl_Shortcut
unsigned int Fl_Shortcut
16-bit Unicode character + 8-bit indicator for keyboard flags.
Definition fl_types.h:55