2023-02-15 17:24:25 +03:00
|
|
|
//
|
|
|
|
// 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>
|
|
|
|
|
2023-03-01 19:24:03 +03:00
|
|
|
class FL_EXPORT Fl_Shortcut_Button : public Fl_Button {
|
2023-02-15 17:24:25 +03:00
|
|
|
private:
|
2023-07-22 16:30:09 +03:00
|
|
|
bool hot_, pre_hot_, default_set_, handle_default_button_;
|
2023-02-15 17:24:25 +03:00
|
|
|
Fl_Shortcut pre_esc_;
|
2023-07-22 16:30:09 +03:00
|
|
|
Fl_Shortcut default_shortcut_;
|
2023-02-15 17:24:25 +03:00
|
|
|
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();
|
2023-07-22 16:30:09 +03:00
|
|
|
void default_value(Fl_Shortcut shortcut);
|
|
|
|
Fl_Shortcut default_value();
|
|
|
|
void default_clear();
|
2023-02-15 17:24:25 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // Fl_Shortcut_Button_H
|
|
|
|
|