Class FrameBufferResizeEvent#

Inheritance Relationships#

Base Type#

Class Documentation#

class FrameBufferResizeEvent : public TRAP::Events::Event#

Window framebuffer resized.

Remark

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

Public Functions

FrameBufferResizeEvent(u32 width, u32 height, TRAP::Window &window)#

Constructor.

Note

The window must outlive the FrameBufferResizeEvent!

Parameters:
  • width – New framebuffer width.

  • height – New framebuffer height.

  • window – The affected window.

constexpr ~FrameBufferResizeEvent() override = default#

Destructor.

consteval FrameBufferResizeEvent(const FrameBufferResizeEvent&) noexcept = delete#

Copy constructor.

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

Copy assignment operator.

constexpr FrameBufferResizeEvent(FrameBufferResizeEvent&&) noexcept = default#

Move constructor.

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

Move assignment operator.

constexpr u32 GetWidth() const noexcept#

Retrieve the new framebuffer width.

Returns:

Framebuffer width.

constexpr u32 GetHeight() const noexcept#

Retrieve the new framebuffer height.

Returns:

Framebuffer height.

constexpr Math::Vec2ui GetSize() const noexcept#

Retrieve the new framebuffer size.

Returns:

Framebuffer size.

constexpr f32 GetAspectRatio() const noexcept#

Retrieve the aspect ratio of the framebuffer.

Returns:

Aspect ratio.

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.