IInputEventHandler class
#include <nCine/Input/IInputEventHandler.h>
Interface for handling input events from keyboard, touch screen, mouse, accelerometer and joysticks.
An instance registers itself as the active handler on construction. Override the callbacks of interest; the default implementations do nothing.
Constructors, destructors, conversion operators
- IInputEventHandler()
- ~IInputEventHandler() virtual
Public functions
- void OnKeyPressed(const KeyboardEvent& event) virtual
- Called when a key is pressed.
- void OnKeyReleased(const KeyboardEvent& event) virtual
- Called when a key is released.
- void OnTextInput(const TextInputEvent& event) virtual
- Called when text input is generated.
- void OnTouchEvent(const TouchEvent& event) virtual
- Called when a touch event occurs.
- void OnAcceleration(const AccelerometerEvent& event) virtual
- Called at a fixed rate with the latest accelerometer reading.
- void OnMouseDown(const MouseEvent& event) virtual
- Called when a mouse button is pressed.
- void OnMouseUp(const MouseEvent& event) virtual
- Called when a mouse button is released.
- void OnMouseMove(const MouseState& state) virtual
- Called when the mouse is moved.
- void OnMouseWheel(const ScrollEvent& event) virtual
- Called when a scroll input occurs (mouse wheel, touchpad gesture, etc.).
- void OnJoyButtonPressed(const JoyButtonEvent& event) virtual
- Called when a joystick button is pressed.
- void OnJoyButtonReleased(const JoyButtonEvent& event) virtual
- Called when a joystick button is released.
- void OnJoyHatMoved(const JoyHatEvent& event) virtual
- Called when a joystick hat is moved.
- void OnJoyAxisMoved(const JoyAxisEvent& event) virtual
- Called when a joystick axis is moved.
- void OnJoyMappedButtonPressed(const JoyMappedButtonEvent& event) virtual
- Called when a button of a mapped joystick is pressed.
- void OnJoyMappedButtonReleased(const JoyMappedButtonEvent& event) virtual
- Called when a button of a mapped joystick is released.
- void OnJoyMappedAxisMoved(const JoyMappedAxisEvent& event) virtual
- Called when an axis of a mapped joystick is moved.
- void OnJoyConnected(const JoyConnectionEvent& event) virtual
- Called when a joystick is connected.
- void OnJoyDisconnected(const JoyConnectionEvent& event) virtual
- Called when a joystick is disconnected.
- auto OnQuitRequest() -> bool virtual
- Called when the system requests to quit (e.g. the window close button); returns
trueto allow it.