Public Member Functions |
| manager (const handler &mHandler) |
| Initializes this manager with the proper input source.
|
| manager (const manager &mMgr) |
| This class is non copiable.
|
manager & | operator= (const manager &mMgr) |
| This class is non copiable.
|
void | update (float fDelta) |
| Updates input (keyboard and mouse).
|
void | allow_input (const std::string &sGroupName) |
| Allows a particular input group to receive input events.
|
void | block_input (const std::string &sGroupName) |
| Prevents a particular input group from receiving input events.
|
bool | can_receive_input (const std::string &sGroupName) const |
| Checks if a particular input group can receive input events.
|
void | force_input_allowed (const std::string &sGroupName, bool bForce) |
| Makes sure a particular input group receives input events.
|
bool | get_key (bool bForce=false) const |
| Checks if a key has been pressed.
|
bool | key_is_down (key::code mKey, bool bForce=false) const |
| Checks if a key is being pressed.
|
bool | key_is_down_long (key::code mKey, bool bForce=false) const |
| Checks if a key is being pressed for a long time.
|
double | get_key_press_duration (key::code mKey) const |
| Returns elapsed time since the key has been pressed.
|
bool | key_is_pressed (key::code mKey, bool bForce=false) const |
| Checks if a key has been pressed.
|
bool | key_is_released (key::code mKey, bool bForce=false) const |
| Checks if a key has been released.
|
std::vector< char32_t > | get_chars () const |
| Returns the UTF8 (multibyte) character that has been entered.
|
std::string | get_key_name (key::code mKey) const |
| Returns the name of the provided key, as it appears on your keyboard.
|
std::string | get_key_name (key::code mKey, key::code mModifier) const |
| Returns the name of the provided key combination.
|
std::string | get_key_name (key::code mKey, key::code mModifier1, key::code mModifier2) const |
| Returns the name of the provided key combination.
|
const std::deque< key::code > & | get_key_release_stack () const |
| Returns the list of keys that have been released during this frame.
|
const std::deque< key::code > & | get_key_press_stack () const |
| Returns the list of keys that have been pressed during this frame.
|
bool | alt_is_pressed () const |
| Checks if Alt is beeing pressed.
|
bool | shift_is_pressed () const |
| Checks if Shift is beeing pressed.
|
bool | ctrl_is_pressed () const |
| Checks if Control (Ctrl) is beeing pressed.
|
bool | mouse_is_down (mouse::button mID) const |
| Checks if a mouse button is being pressed.
|
bool | mouse_is_down_long (mouse::button mID) const |
| Checks if a mouse button is being pressed for a long time.
|
double | get_mouse_press_duration (mouse::button mKey) const |
| Returns elapsed time since the mouse button has been pressed.
|
bool | mouse_is_pressed (mouse::button mID) const |
| Checks if a mouse button has been pressed.
|
bool | mouse_is_released (mouse::button mID) const |
| Checks if a mouse button has been released.
|
bool | mouse_is_doubleclicked (mouse::button mID) const |
| Checks if a mouse button has been double clicked.
|
bool | wheel_is_rolled () const |
| Checks if the mouse wheel has been rolled.
|
bool | mouse_last_dragged () const |
| Checks if the mouse has just started beeing dragged.
|
mouse::state | get_mouse_state (mouse::button mID) const |
| Returns a mouse button's state.
|
float | get_mouse_x () const |
| Returns the horizontal position of the mouse.
|
float | get_mouse_y () const |
| Returns the vertical position of the mouse.
|
float | get_mouse_rel_x () const |
| Returns the horizontal position of the mouse in window units.
|
float | get_mouse_rel_y () const |
| Returns the vertical position of the mouse in window units.
|
float | get_mouse_raw_dx () const |
| Returns the horizontal position variation of the mouse.
|
float | get_mouse_raw_dy () const |
| Returns the vertical position variation of the mouse.
|
float | get_mouse_dx () const |
| Returns the horizontal position variation of the mouse.
|
float | get_mouse_dy () const |
| Returns the vertical position variation of the mouse.
|
float | get_mouse_rel_dx () const |
| Returns the horizontal position variation of the mouse in window units.
|
float | get_mouse_rel_dy () const |
| Returns the vertical position variation of the mouse in window units.
|
float | get_mouse_smooth_dx () const |
| Returns the horizontal position variation of the mouse.
|
float | get_mouse_smooth_dy () const |
| Returns the vertical position variation of the mouse.
|
float | get_mouse_wheel () const |
| Returns the rolling ammount of the mouse wheel.
|
std::string | get_mouse_button_string (mouse::button mID) const |
| Returns the string associated to a mouse button.
|
void | set_doubleclick_time (double dDoubleClickTime) |
| Sets the double click maximum time.
|
double | get_doubleclick_time () const |
| Returns the double click maximum time.
|
void | set_mouse_buffer_duration (double dMouseHistoryMaxLength) |
| Sets the ammount of mouse movement to be buffered.
|
double | get_mouse_buffer_duration () const |
| Returns the ammount of mouse movement to be buffered.
|
void | set_mouse_sensibility (float fMouseSensibility) |
| Sets the mouse movement factor.
|
float | get_mouse_sensibility () const |
| Returns the mouse movement factor.
|
void | set_long_press_delay (double dLongPressDelay) |
| Sets the duration after which a key is considered as pressed for a long time.
|
double | get_long_press_delay () const |
| Returns the duration after which a key is considered as pressed for a long time.
|
void | set_focus (bool bFocus, gui::event_receiver *pReceiver=nullptr) |
| Sets whether input should be stopped.
|
bool | is_focused () const |
| Checks whether input is focused somewhere, to prevent multiple inputs.
|
void | register_event_manager (utils::wptr< gui::event_manager > pManager) |
| Registers a new event manager that will listen to input events.
|
void | unregister_event_manager (utils::wptr< gui::event_manager > pManager) |
| Unregisters an event manager.
|
const handler & | get_handler () const |
| Returns this manager's handler.
|
handler & | get_handler () |
| Returns this manager's handler.
|