Magnum::Platform::EmscriptenApplication::MouseMoveEvent class

Mouse move event.

Base classes

class InputEvent
Base for input events.

Public types

enum class Button: Int { Left = 1 << 0, Middle = 1 << 1, Right = 1 << 2 }
Mouse button.
using Buttons = Containers::EnumSet<Button>
Set of mouse buttons.

Public functions

auto position() const -> Vector2i
auto relativePosition() const -> Vector2i
Relative position.
auto buttons() const -> Buttons
Mouse buttons.
auto modifiers() const -> Modifiers
auto event() const -> const EmscriptenMouseEvent&
Underlying Emscripten event.

Enum documentation

enum class Magnum::Platform::EmscriptenApplication::MouseMoveEvent::Button: Int

Mouse button.


Left mouse button


Middle mouse button


Right mouse button

Typedef documentation

typedef Containers::EnumSet<Button> Magnum::Platform::EmscriptenApplication::MouseMoveEvent::Buttons

Set of mouse buttons.

Function documentation

Vector2i Magnum::Platform::EmscriptenApplication::MouseMoveEvent::relativePosition() const

Relative position.

Position relative to previous move event. Unlike Sdl2Application, HTML APIs don't provide relative position directly, so this is calculated explicitly as a delta from previous move event position.