Class MouseScrollEvent#

Inheritance Relationships#

Base Type#

Class Documentation#

class MouseScrollEvent : public TRAP::Events::Event#

Mouse scrolled.

Remark

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

Public Functions

MouseScrollEvent(f32 xOffset, f32 yOffset, TRAP::Window &window)#

Constructor.

Note

The window must outlive the MouseScrollEvent!

Parameters:
  • xOffset – New mouse scroll wheel x offset.

  • yOffset – New mouse scroll wheel y offset.

  • window – The affected window.

constexpr ~MouseScrollEvent() override = default#

Destructor.

consteval MouseScrollEvent(const MouseScrollEvent&) noexcept = delete#

Copy constructor.

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

Copy assignment operator.

constexpr MouseScrollEvent(MouseScrollEvent&&) noexcept = default#

Move constructor.

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

Move assignment operator.

constexpr f32 GetXOffset() const noexcept#

Retrieve the new mouse scroll wheel x offset.

Returns:

Mouse scroll wheel x offset.

constexpr f32 GetYOffset() const noexcept#

Retrieve the new mouse scroll wheel y offset.

Returns:

Mouse scroll wheel y offset.

constexpr Math::Vec2 GetOffset() const noexcept#

Retrieve the new mouse scroll wheel offset.

Returns:

Mouse scroll wheel offset.

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.