]> git.tdb.fi Git - libs/gui.git/blob - source/input/controlscheme.h
Add decorations for things which should be exported from the library
[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 #include <msp/graphics/mspgui_api.h>
7
8 namespace Msp {
9 namespace Input {
10
11 class Control;
12
13 class MSPGUI_API ControlScheme
14 {
15 private:
16         std::map<std::string, Control *> controls;
17
18 protected:
19         ControlScheme() = default;
20 public:
21         virtual ~ControlScheme() = default;
22
23 protected:
24         void add(const std::string &, Control &);
25 public:
26         Control &get(const std::string &) const;
27         Control *find(const std::string &) const;
28         const std::map<std::string, Control *> &get_controls() const { return controls; }
29
30         void reset_edges();
31 };
32
33 } // namespace Input
34 } // namespace Msp
35
36 #endif