Manages virtual input devices.
More...
#include <input-manager.hpp>
Manages virtual input devices.
Definition at line 37 of file input-manager.hpp.
◆ ~input_manager()
virtual app::input_manager::~input_manager |
( |
| ) |
|
|
virtualdefault |
Destructs an input manager.
◆ get_event_dispatcher() [1/2]
Returns the event dispatcher associated with registered input devices.
Definition at line 71 of file input-manager.hpp.
◆ get_event_dispatcher() [2/2]
Returns the event dispatcher associated with registered input devices.
Definition at line 75 of file input-manager.hpp.
◆ get_gamepads()
const std::unordered_set<input::gamepad*>& app::input_manager::get_gamepads |
( |
| ) |
|
|
inlinenoexcept |
◆ get_keyboards()
const std::unordered_set<input::keyboard*>& app::input_manager::get_keyboards |
( |
| ) |
|
|
inlinenoexcept |
◆ get_mice()
const std::unordered_set<input::mouse*>& app::input_manager::get_mice |
( |
| ) |
|
|
inlinenoexcept |
◆ instance()
std::unique_ptr< input_manager > app::input_manager::instance |
( |
| ) |
|
|
static |
◆ register_device()
void app::input_manager::register_device |
( |
input::device & |
device | ) |
|
|
protected |
Registers an input device.
- Parameters
-
device | Input device to register. |
Definition at line 30 of file input-manager.cpp.
◆ register_gamepad()
Registers an input device.
- Parameters
-
device | Input device to register. |
Definition at line 52 of file input-manager.cpp.
◆ register_keyboard()
Registers an input device.
- Parameters
-
device | Input device to register. |
Definition at line 65 of file input-manager.cpp.
◆ register_mouse()
void app::input_manager::register_mouse |
( |
input::mouse & |
device | ) |
|
|
protected |
Registers an input device.
- Parameters
-
device | Input device to register. |
Definition at line 77 of file input-manager.cpp.
◆ set_cursor_visible()
virtual void app::input_manager::set_cursor_visible |
( |
bool |
visible | ) |
|
|
pure virtual |
Shows or hides the cursor.
- Parameters
-
visible | true to show the cursor, false to hide it. |
Implemented in app::sdl_input_manager.
◆ set_relative_mouse_mode()
virtual void app::input_manager::set_relative_mouse_mode |
( |
bool |
enabled | ) |
|
|
pure virtual |
Enables or disables relative mouse mode.
- Parameters
-
enabled | true to enable relative mouse mode, false to disable it. |
Implemented in app::sdl_input_manager.
◆ unregister_device()
void app::input_manager::unregister_device |
( |
input::device & |
device | ) |
|
|
protected |
Unregisters an input device.
- Parameters
-
device | Input device to unregister. |
Definition at line 91 of file input-manager.cpp.
◆ unregister_gamepad()
void app::input_manager::unregister_gamepad |
( |
input::gamepad & |
device | ) |
|
|
protected |
Unregisters an input device.
- Parameters
-
device | Input device to unregister. |
Definition at line 115 of file input-manager.cpp.
◆ unregister_keyboard()
Unregisters an input device.
- Parameters
-
device | Input device to unregister. |
Definition at line 120 of file input-manager.cpp.
◆ unregister_mouse()
void app::input_manager::unregister_mouse |
( |
input::mouse & |
device | ) |
|
|
protected |
Unregisters an input device.
- Parameters
-
device | Input device to unregister. |
Definition at line 125 of file input-manager.cpp.
◆ update()
virtual void app::input_manager::update |
( |
| ) |
|
|
pure virtual |
◆ m_event_dispatcher
The documentation for this class was generated from the following files: