Magnum::Platform::GlfwApplication::PointerMoveEvent class new in Git master

Pointer 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() -> 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() -> GlfwApplication::Modifiers
Keyboard modifiers.

Function documentation

PointerEventSource Magnum::Platform::GlfwApplication::PointerMoveEvent::source() const

Pointer event source.

Included mainly for compatibility with touch-aware application implementations such as Sdl2Application, returns always PointerEventSource::Mouse.

Containers::Optional<Pointer> Magnum::Platform::GlfwApplication::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.

Pointers Magnum::Platform::GlfwApplication::PointerMoveEvent::pointers()

Pointer types pressed in this event.

Returns an empty set if no pointers are pressed, which happens for example when a mouse is just moved around. Lazily populated on first request.

bool Magnum::Platform::GlfwApplication::PointerMoveEvent::isPrimary() const

Whether the pointer is primary.

Included mainly for compatibility with touch-aware application implementations such as Sdl2Application, returns always true.

Long Magnum::Platform::GlfwApplication::PointerMoveEvent::id() const

Pointer ID.

Included mainly for compatibility with touch-aware application implementations such as Sdl2Application, returns always 0.

Vector2 Magnum::Platform::GlfwApplication::PointerMoveEvent::position() const

Position.

May return fractional values for example on HiDPI systems where window size is smaller than actual framebuffer size. Use Math::round() to snap them to the nearest window pixel.

Vector2 Magnum::Platform::GlfwApplication::PointerMoveEvent::relativePosition() const

Position relative to the previous touch event.

May return fractional values for example on HiDPI systems where window size is smaller than actual framebuffer size. Use Math::round() to snap them to the nearest window pixel. Unlike Sdl2Application, GLFW doesn't provide relative position directly, so this is calculated explicitly as a delta from previous move event position.

GlfwApplication::Modifiers Magnum::Platform::GlfwApplication::PointerMoveEvent::modifiers()

Keyboard modifiers.

Lazily populated on first request.