summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-02-15 15:24:25 +0100
committerGitHub <noreply@github.com>2023-02-15 15:24:25 +0100
commit6fbfaba19d0a2d2dc7080e450d5055ff19ac89e1 (patch)
tree8df0fc35817474ce6558bba94e739f5fef493d8d /FL
parenta4d0f7d269dc01e0a22c56aef13aa1f23405969a (diff)
Move class Fl_Shortcut_Button from FLUID to core (#677) (#680)
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Shortcut_Button.H38
1 files changed, 38 insertions, 0 deletions
diff --git a/FL/Fl_Shortcut_Button.H b/FL/Fl_Shortcut_Button.H
new file mode 100644
index 000000000..f928944f5
--- /dev/null
+++ b/FL/Fl_Shortcut_Button.H
@@ -0,0 +1,38 @@
+//
+// Shortcut Button header file for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2023 by Bill Spitzak and others.
+//
+// This library is free software. Distribution and use rights are outlined in
+// the file "COPYING" which should have been included with this file. If this
+// file is missing or damaged, see the license at:
+//
+// https://www.fltk.org/COPYING.php
+//
+// Please see the following page on how to report bugs and issues:
+//
+// https://www.fltk.org/bugs.php
+//
+
+#ifndef Fl_Shortcut_Button_H
+#define Fl_Shortcut_Button_H
+
+#include <FL/Fl_Button.H>
+
+class Fl_Shortcut_Button : public Fl_Button {
+private:
+ bool hot_, pre_hot_;
+ Fl_Shortcut pre_esc_;
+protected:
+ Fl_Shortcut shortcut_value;
+ void do_end_hot_callback();
+ int handle(int) FL_OVERRIDE;
+ void draw() FL_OVERRIDE;
+public:
+ Fl_Shortcut_Button(int X,int Y,int W,int H, const char* l = 0);
+ void value(Fl_Shortcut shortcut);
+ Fl_Shortcut value();
+};
+
+#endif // Fl_Shortcut_Button_H
+