nCine::IInputEventHandler class

Interface for handling input events from keyboard, screen touches, mouse, accelerometer and joystick.

Constructors, destructors, conversion operators

IInputEventHandler()
~IInputEventHandler() virtual

Public functions

void OnKeyPressed(const KeyboardEvent& event) virtual
Callback function called every time a key is pressed.
void OnKeyReleased(const KeyboardEvent& event) virtual
Callback function called every time a key is released.
void OnTextInput(const TextInputEvent& event) virtual
Callback function called every time a text input is generated.
void OnTouchEvent(const TouchEvent& event) virtual
Callback function called every time a touch event is made.
void OnAcceleration(const AccelerometerEvent& event) virtual
Callback function called at fixed time with the updated reading from the accelerometer sensor.
void OnMouseDown(const MouseEvent& event) virtual
Callback function called every time a mouse button is pressed.
void OnMouseUp(const MouseEvent& event) virtual
Callback function called every time a mouse button is released.
void OnMouseMove(const MouseState& state) virtual
Callback function called every time the mouse is moved.
void OnMouseWheel(const ScrollEvent& event) virtual
Callback function called every time a scroll input occurs (mouse wheel, touchpad gesture, etc.)
void OnJoyButtonPressed(const JoyButtonEvent& event) virtual
Callback function called every time a joystick button is pressed.
void OnJoyButtonReleased(const JoyButtonEvent& event) virtual
Callback function called every time a joystick button is released.
void OnJoyHatMoved(const JoyHatEvent& event) virtual
Callback function called every time a joystick hat is moved.
void OnJoyAxisMoved(const JoyAxisEvent& event) virtual
Callback function called every time a joystick axis is moved.
void OnJoyMappedButtonPressed(const JoyMappedButtonEvent& event) virtual
Callback function called every time a button of a joystick with mapping is pressed.
void OnJoyMappedButtonReleased(const JoyMappedButtonEvent& event) virtual
Callback function called every time a button of a joystick with mapping is released.
void OnJoyMappedAxisMoved(const JoyMappedAxisEvent& event) virtual
Callback function called every time an axis of a joystick with mapping is moved.
void OnJoyConnected(const JoyConnectionEvent& event) virtual
Callback function called every time a joystick is connected.
void OnJoyDisconnected(const JoyConnectionEvent& event) virtual
Callback function called every time a joystick is disconnected.
auto OnQuitRequest() -> bool virtual
Callback function called when the system sends a quit event, for example when the user clicks the window close button.

Function documentation

bool nCine::IInputEventHandler::OnQuitRequest() virtual

Callback function called when the system sends a quit event, for example when the user clicks the window close button.

Returns True if the application should quit