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

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

Function documentation

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

Pointer event source.

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

bool Magnum::Platform::GlfwApplication::PointerEvent::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::PointerEvent::id() const

Pointer ID.

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

Vector2 Magnum::Platform::GlfwApplication::PointerEvent::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.