make it possible to override CXX from the command line
[rofl0r-df-libgraphics.git] / g_src / KeybindingScreen.h
blobfc29f2e1e066410066c3718e18e437569a947777
1 #ifndef KEYBINDINGSCREEN_H
2 #define KEYBINDINGSCREEN_H
4 #include "interface.h"
5 #include "ViewBase.h"
6 #include "enabler.h"
8 #include <set>
9 #include <string>
11 class KeybindingScreen : public viewscreenst {
12 enum { mode_main, mode_keyL, mode_keyR, mode_macro, mode_register } mode;
13 enum keyR_type { sel_add, sel_rep_none, sel_rep_slow, sel_rep_fast, sel_event };
14 enum main_selector { sel_macros, sel_just_exit, sel_save_exit, sel_first_group };
16 struct keyR_selector {
17 keyR_type sel;
18 EventMatch event; // Uninitialized if sel != sel_event
21 widgets::menu<int> main; // Representing main_selector
22 widgets::menu<InterfaceKey> keyL;
23 widgets::menu<keyR_selector> keyR;
24 widgets::menu<std::string> macro;
25 widgets::menu<MatchType> keyRegister;
27 void render_main();
28 void render_macro();
29 void render_key();
30 void render_register();
32 void reset_keyR();
34 void enter_key(int group);
35 void enter_macros();
37 public:
38 KeybindingScreen();
39 virtual void feed(std::set<InterfaceKey> &events);
40 virtual void render();
41 virtual void help();
42 virtual void logic();
43 virtual char is_option_screen() { return 2; }
46 class MacroScreenLoad : public viewscreenst {
47 widgets::menu<string> menu;
48 int width, height;
50 public:
51 MacroScreenLoad();
52 virtual void logic();
53 virtual void render();
54 virtual void feed(std::set<InterfaceKey> &events);
55 virtual char is_option_screen() { return 1; }
58 class MacroScreenSave : public viewscreenst {
59 widgets::textbox id;
60 public:
61 MacroScreenSave();
62 virtual void logic();
63 virtual void render();
64 virtual void feed(std::set<InterfaceKey> &events);
65 virtual char is_option_screen() { return 1; }
69 #endif