Debian Codegraph @

src/gengine/KeyBinder.h

raw
1 #ifndef HEADER_KEYBINDER_H
2 #define HEADER_KEYBINDER_H
3
4 class BaseMsg;
5
6 #include "NoCopy.h"
7 #include "KeyStroke.h"
8
9 #include <map>
10
11 /**
12 * Key binder.
13 */
14 class KeyBinder : public NoCopy {
15 private:
16 typedef std::map<KeyStroke,BaseMsg*,stroke_less> t_strokes;
17 t_strokes m_strokes;
18 public:
19 ~KeyBinder();
20
21 void addStroke(const KeyStroke &stroke, BaseMsg *msg);
22 void removeStroke(const KeyStroke &stroke);
23
24 void keyDown(const SDL_keysym &keysym) const;
25 };
26
27 #endif