class
#include <Magnum/Platform/Sdl2Application.h>
InputEvent Base for input events.
Derived classes
- class KeyEvent
- Key event.
- class MouseEvent deprecated in Git master
- Mouse event.
- class MouseMoveEvent deprecated in Git master
- Mouse move event.
- class MouseScrollEvent deprecated in Git master
- Mouse scroll event.
- class PointerEvent new in Git master
- Pointer event.
- class PointerMoveEvent new in Git master
- Pointer move event.
- class ScrollEvent new in Git master
- Scroll event.
Public types
-
using Modifier = Sdl2Application::
Modifier deprecated in Git master - Keyboard modifier.
-
using Modifiers = Sdl2Application::
Modifiers deprecated in Git master - Set of keyboard modifiers.
Constructors, destructors, conversion operators
- InputEvent(const InputEvent&) deleted
- Copying is not allowed.
- InputEvent(InputEvent&&) deleted
- Moving is not allowed.
Public functions
- auto operator=(const InputEvent&) -> InputEvent& deleted
- Copying is not allowed.
- auto operator=(InputEvent&&) -> InputEvent& deleted
- Moving is not allowed.
- auto isAccepted() const -> bool
- Whether the event is accepted.
- void setAccepted(bool accepted = true)
- Set event as accepted.
- auto event() const -> const SDL_Event&
- Underlying SDL event.
Typedef documentation
typedef Sdl2Application:: Modifier Magnum:: Platform:: Sdl2Application:: InputEvent:: Modifier
Keyboard modifier.
typedef Sdl2Application:: Modifiers Magnum:: Platform:: Sdl2Application:: InputEvent:: Modifiers
Set of keyboard modifiers.
Function documentation
void Magnum:: Platform:: Sdl2Application:: InputEvent:: setAccepted(bool accepted = true)
Set event as accepted.
If the event is ignored (i.e., not set as accepted), it might be propagated elsewhere, for example to another screen when using ScreenedApplication. By default is each event ignored and thus propagated.
const SDL_Event& Magnum:: Platform:: Sdl2Application:: InputEvent:: event() const
Underlying SDL event.
Of type SDL_KEYDOWN
/ SDL_KEYUP
for KeyEvent, SDL_MOUSEBUTTONDOWN
/ SDL_MOUSEBUTTONUP
or SDL_FINGERDOWN
/ SDL_FINGERUP
for PointerEvent, SDL_MOUSEMOTION
or SDL_FINGERMOTION
for PointerMoveEvent and SDL_MOUSEWHEEL
for ScrollEvent.