4 #include <FL/Fl_Repeat_Button.H> 5 #undef None // TODO: Remove me 11 "\u25c1",
"\u25b3",
"\u25bd",
"\u25b7",
"OK",
"\u21ba",
12 "Home",
"Power",
"",
"",
"",
"",
13 "shift",
"alpha",
"x,n,t",
"var",
"Toolbox",
"\u232b",
14 "e\u02e3",
"ln",
"log",
"i",
",",
"x\u02b8",
15 "sin",
"cos",
"tan",
"\u03c0",
"\u221a\u203e\u203e",
"x\u00b2",
16 "7",
"8",
"9",
"(",
")",
"",
17 "4",
"5",
"6",
"\u00d7",
"\u00f7",
"",
18 "1",
"2",
"3",
"+",
"\u2212",
"",
19 "0",
".",
"\u00d710\u02e3",
"Ans",
"EXE",
"" 23 FL_Left, FL_Up, FL_Down, FL_Right, FL_Enter, FL_Escape,
24 FL_Home, 0, 0, 0, 0, 0,
25 0, 0,
'x', 0, 0, FL_BackSpace,
28 '7',
'8',
'9',
'(',
')', 0,
29 '4',
'5',
'6',
'*',
'/', 0,
30 '1',
'2',
'3',
'+',
'-', 0,
31 '0',
'.', 0, 0, FL_KP_Enter, 0
38 static void keyHandler(Fl_Widget *,
long key) {
55 m_buttons[k] =
new Fl_Repeat_Button(key_x, key_y, key_width, key_height, kCharForKey[k]);
57 m_buttons[k] =
new Fl_Button(key_x, key_y, key_width, key_height, kCharForKey[k]);
59 #if defined(_WIN32) || defined(_WIN64) 60 m_buttons[k]->labelfont(FL_SYMBOL);
62 if (kCharForKey[k][0] ==
'\0') {
63 m_buttons[k]->deactivate();
65 m_buttons[k]->callback(keyHandler, k);
67 if (kShortcutForKey[k]) {
68 m_buttons[k]->shortcut(kShortcutForKey[k]);
70 m_buttons[k]->clear_visible_focus();
76 return m_buttons[(int)key]->value();
constexpr int KeyboardRows
bool key_down(Ion::Keyboard::Key key)
void updateModifiersFromEvent(Event e)
constexpr int KeyboardColumns
constexpr int NumberOfKeys
Ion::Events::Event currentEvent
FltkKbd(int x, int y, int w, int h)