Debian Codegraph @

src/include/flinput2.h

raw
1 // ----------------------------------------------------------------------------
2 // Copyright (C) 2014
3 // David Freese, W1HKJ
4 //
5 // This file is part of fldigi
6 //
7 // fldigi is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // fldigi is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 // ----------------------------------------------------------------------------
20
21 #ifndef FL_INPUT2_
22 #define FL_INPUT2_
23
24 #include <FL/Fl_Input.H>
25
26 #include "config.h"
27
28 class Fl_Input2 : public Fl_Input
29 {
30 private:
31 int ascii_cnt; // restart the numeric keypad entries.
32 int ascii_chr; // character value of ASCII > 0x80
33 int handle_key_ascii(int key);
34 char *utf8text;
35 int utf8cnt;
36
37 public:
38 Fl_Input2(int x, int y, int w, int h, const char* l = 0);
39 int handle(int event);
40
41 #if FLMSG_FLTK_API_MINOR > 3
42 int position() { return Fl_Input::insert_position(); }
43 int position(int p, int m) { return Fl_Input::insert_position(p, m); }
44 int position(int p) { return Fl_Input::insert_position(p, p); }
45 #endif
46
47 };
48
49 #endif // FL_INPUT2_