From 8198e51799ba715d27e82b276b93cb39918d3361 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 22 Apr 2008 23:33:17 +0000 Subject: Added support for keyboard shortcuts to Fl_Input_ derived widgets (STR #1770). Code added for Fluid. Documentation updated. This commit must be considered partial because there is no shortcut handling for Fl_Text_Display derived widgets or Fl_Value_Input which is derived form Fl_Valuator. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ FL/Fl_Input_.H | 4 ++++ documentation/Fl_Input_.html | 18 ++++++++++++++++++ fluid/Fl_Menu_Type.cxx | 14 ++++++++++++-- fluid/Fl_Type.cxx | 1 + fluid/Fl_Type.h | 1 + fluid/Fl_Widget_Type.cxx | 23 +++++++++++++++++++++++ fluid/factory.cxx | 4 ++++ src/Fl_Input_.cxx | 9 +++++++++ test/input.cxx | 14 ++++++++------ 10 files changed, 82 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 84ea2295f..a31b176af 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ CHANGES IN FLTK 1.3.0 + - added support for shortcuts for Fl_Input_ derived + widgets (STR #1770) - initial setup (STR #1904) CHANGES IN FLTK 1.1.9 diff --git a/FL/Fl_Input_.H b/FL/Fl_Input_.H index df52e36a0..985d74f99 100644 --- a/FL/Fl_Input_.H +++ b/FL/Fl_Input_.H @@ -58,6 +58,7 @@ class FL_EXPORT Fl_Input_ : public Fl_Widget { int xscroll_, yscroll_; int mu_p; int maximum_size_; + int shortcut_; uchar erase_cursor_only; uchar textfont_; @@ -119,6 +120,9 @@ public: int undo(); int copy_cuts(); + int shortcut() const {return shortcut_;} + void shortcut(int s) {shortcut_ = s;} + Fl_Font textfont() const {return (Fl_Font)textfont_;} void textfont(uchar s) {textfont_ = s;} uchar textsize() const {return textsize_;} diff --git a/documentation/Fl_Input_.html b/documentation/Fl_Input_.html index 9b7fb34ed..0c6c8fe7b 100644 --- a/documentation/Fl_Input_.html +++ b/documentation/Fl_Input_.html @@ -87,6 +87,7 @@ setting type() to one of the following values: