23 #ifndef INPUT_MANAGER_H
24 #define INPUT_MANAGER_H
27 #include <forward_list>
47 enum class MouseButton { LEFT,MIDDLE,RIGHT };
111 virtual void onKeyPress(
const KeyEvent &event)=0;
112 virtual void onKeyRelease(
const KeyEvent &event)=0;
118 virtual void onQuit()=0;
137 bool getKeyState(KeyCode key);
139 bool getMouseButtonState(MouseButton button);
141 const Pos& getMousePosition();
145 virtual void processInput();
155 void notifyKeyEventListeners(
const KeyEvent &event);
157 bool notifyQuitEventListener();
161 std::map<KeyCode,bool> _key_state;
162 std::forward_list<MouseButtonEventListener*> _mouse_button_listeners;
163 std::forward_list<MouseMotionEventListener*> _mouse_motion_listeners;
164 std::forward_list<MouseWheelEventListener*> _mouse_wheel_listeners;
165 std::forward_list<KeyEventListener*> _key_listeners;
Definition: input_manager.h:77
Definition: input_manager.h:96
Definition: input_manager.h:102
Definition: input_manager.h:108
Definition: input_manager.h:83
Definition: input_manager.h:69
Definition: input_manager.h:115
Definition: input_manager.h:56