diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-04-07 19:14:25 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-04-07 19:14:25 +0200 |
| commit | 22cb8a7fdb1dfd5cb9e8280ce858dc6803bcdd9d (patch) | |
| tree | 42ec3ed3c4a86fb6d3425aa777c15f6a64e55619 /src | |
| parent | 7f969b54964381f79558b924184f9c2c9afb4a57 (diff) | |
Make Fl_Input::handle_key() protected (#203)
... as requested in this comment:
https://github.com/fltk/fltk/issues/211#issuecomment-814235771
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index 9a3342eb2..5fa16bfb0 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -1,7 +1,7 @@ // // Input widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2020 by Bill Spitzak and others. +// Copyright 1998-2021 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 @@ -300,9 +300,17 @@ int Fl_Input::kf_copy_cut() { return cut(); } -// Handle a keystroke. -// Returns 1 if handled by us, 0 if not. -// +/** Handles a keystroke. + + This \p protected method handles a keystroke in an Fl_Input or derived + class. It handles compose key sequences and can also be used e.g. in + Fl_Multiline_Input, Fl_Float_Input and several more derived classes. + + The details are way too complicated to be documented here and can be + changed as required. If in doubt, please consult the source code. + + \returns 1 if the keystroke is handled by us, 0 if not. +*/ int Fl_Input::handle_key() { char ascii = Fl::event_text()[0]; |
