class new in Git master
PointerMoveEventPointer move event.
Base classes
- class InputEvent
- Base for input events.
Constructors, destructors, conversion operators
- PointerMoveEvent(const PointerMoveEvent&) deleted
- Copying is not allowed.
- PointerMoveEvent(PointerMoveEvent&&) deleted
- Moving is not allowed.
Public functions
- auto operator=(const PointerMoveEvent&) -> PointerMoveEvent& deleted
- Copying is not allowed.
- auto operator=(PointerMoveEvent&&) -> PointerMoveEvent& deleted
- Moving is not allowed.
- auto source() const -> PointerEventSource
- Pointer event source.
-
auto pointer() const -> Containers::
Optional<Pointer> - Pointer type that was added or removed from the set of pressed pointers.
- auto pointers() const -> Pointers
- Pointer types pressed in this event.
- auto isPrimary() const -> bool
- Whether the pointer is primary.
- auto id() const -> Long
- Pointer ID.
- auto position() const -> Vector2
- Position.
- auto relativePosition() const -> Vector2
- Position relative to the previous touch event.
-
auto modifiers() const -> EmscriptenApplication::
Modifiers - Keyboard modifiers.
-
template<class T>auto event() const -> const T&
- Underlying Emscripten event.
Function documentation
PointerEventSource Magnum:: Platform:: EmscriptenApplication:: PointerMoveEvent:: source() const
Pointer event source.
Can be used to distinguish which source the event is coming from in case it's a movement with both pointer() and pointers() being empty.
Containers:: Optional<Pointer> Magnum:: Platform:: EmscriptenApplication:: PointerMoveEvent:: pointer() const
Pointer type that was added or removed from the set of pressed pointers.
Use pointers() to query the set of pointers pressed in this event. This field is is non-empty only in case a mouse button was pressed in addition to an already pressed button, or if one mouse button from multiple pressed buttons was released. If non-empty and pointers() don't contain given Pointer value, the button was released, if they contain given value, the button was pressed.
bool Magnum:: Platform:: EmscriptenApplication:: PointerMoveEvent:: 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:: PointerMoveEvent:: id() const
Pointer ID.
Useful to distinguish among multiple pointers in a multi-touch scenario. See Touch input in HTML5 for more information.
Vector2 Magnum:: Platform:: EmscriptenApplication:: PointerMoveEvent:: relativePosition() const
Position relative to the previous touch event.
The position is always reported in whole pixels. Unlike Sdl2Application, HTML APIs don't provide relative position directly, so this is calculated explicitly as a delta from previous move event position.
template<class T>
const T& Magnum:: Platform:: EmscriptenApplication:: PointerMoveEvent:: 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().