class new in Git master
PointerEventPointer event.
Base classes
- class InputEvent
- Base for input events.
Constructors, destructors, conversion operators
- PointerEvent(const PointerEvent&) deleted
- Copying is not allowed.
- PointerEvent(PointerEvent&&) deleted
- Moving is not allowed.
Public functions
- auto operator=(const PointerEvent&) -> PointerEvent& deleted
- Copying is not allowed.
- auto operator=(PointerEvent&&) -> PointerEvent& deleted
- Moving is not allowed.
- auto source() const -> PointerEventSource
- Pointer event source.
- auto pointer() const -> Pointer
- Pointer type that was pressed or released.
- auto isPrimary() const -> bool
- Whether the pointer is primary.
- auto id() const -> Long
- Pointer ID.
- auto position() const -> Vector2
- Position.
-
auto modifiers() const -> EmscriptenApplication::
Modifiers - Keyboard modifiers.
-
template<class T>auto event() const -> const T&
- Underlying Emscripten event.
Function documentation
Pointer Magnum:: Platform:: EmscriptenApplication:: PointerEvent:: pointer() const
Pointer type that was pressed or released.
The browser is free to report any extra mouse buttons in addition to the ones listed in Pointer. In that case a zero value is returned and you can get the actual button index through event().
bool Magnum:: Platform:: EmscriptenApplication:: PointerEvent:: isPrimary() const
Whether the pointer is primary.
Useful to distinguish among multiple pointers in a multi-touch scenario. See Touch input in HTML5 for more information.
Long Magnum:: Platform:: EmscriptenApplication:: PointerEvent:: id() const
Pointer ID.
Useful to distinguish among multiple pointers in a multi-touch scenario. See Touch input in HTML5 for more information.
template<class T>
const T& Magnum:: Platform:: EmscriptenApplication:: PointerEvent:: event() const
Underlying Emscripten event.
The T
can only be EmscriptenMouseEvent
for PointerEventSource::EmscriptenTouchEvent
for PointerEventSource::EmscriptenTouchEvent
instance. The concrete EmscriptenTouchPoint
corresponding to given event is the one that has the touches[i].identifier
matching id().