]> git.tdb.fi Git - libs/gui.git/blob - source/input/controlscheme.h
d821fc56f27275127f57d295c1267f8c6570a5b6
[libs/gui.git] / source / input / controlscheme.h
1 #ifndef MSP_INPUT_CONTROLSCHEME_H_
2 #define MSP_INPUT_CONTROLSCHEME_H_
3
4 #include <map>
5 #include <string>
6
7 namespace Msp {
8 namespace Input {
9
10 class Control;
11
12 class ControlScheme
13 {
14 private:
15         std::map<std::string, Control *> controls;
16
17 protected:
18         ControlScheme() = default;
19 public:
20         virtual ~ControlScheme() = default;
21
22 protected:
23         void add(const std::string &, Control &);
24 public:
25         Control &get(const std::string &) const;
26         Control *find(const std::string &) const;
27         const std::map<std::string, Control *> &get_controls() const { return controls; }
28
29         void reset_edges();
30 };
31
32 } // namespace Input
33 } // namespace Msp
34
35 #endif