Class MouseMoveEvent#

Inheritance Relationships#

Base Type#

Class Documentation#

class MouseMoveEvent : public TRAP::Events::Event#

Mouse moved.

Remark

Headless mode: This class is not available in headless mode.

Public Functions

MouseMoveEvent(f32 x, f32 y, TRAP::Window &window)#

Constructor.

Note

The window must outlive the MouseMoveEvent!

Parameters:
  • x – New mouse x position.

  • y – New mouse y position.

  • window – The affected window.

constexpr ~MouseMoveEvent() override = default#

Destructor.

consteval MouseMoveEvent(const MouseMoveEvent&) noexcept = delete#

Copy constructor.

consteval MouseMoveEvent &operator=(const MouseMoveEvent&) noexcept = delete#

Copy assignment operator.

constexpr MouseMoveEvent(MouseMoveEvent&&) noexcept = default#

Move constructor.

MouseMoveEvent &operator=(MouseMoveEvent&&) noexcept = default#

Move assignment operator.

constexpr f32 GetX() const noexcept#

Retrieve the new mouse x position.

Returns:

Mouse x position.

constexpr f32 GetY() const noexcept#

Retrieve the new mouse y position.

Returns:

Mouse y position.

constexpr Math::Vec2 GetPosition() const noexcept#

Retrieve the new mouse position.

Returns:

Mouse position.

constexpr TRAP::Window &GetWindow() const noexcept#

Retrieve a reference to the affected window.

Returns:

Window reference.

virtual constexpr EventType GetEventType() const noexcept override#

Retrieve the EventType of the event.

Returns:

EventType.

virtual constexpr std::string GetName() const override#

Retrieve the name of the event.

Returns:

Name.

virtual constexpr EventCategory GetCategoryFlags() const noexcept override#

Retrieve the category flags of the event.

Returns:

Combination of one or more EventCategory’s.

virtual std::string ToString() const override#

Get a string representation of the event.

Returns:

String representation.

Public Static Functions

static constexpr EventType GetStaticType() noexcept#

Retrieve the EventType of the event.

Returns:

EventType.