Class WindowContentScaleEvent#
Defined in File WindowEvent.h
Inheritance Relationships#
Base Type#
public TRAP::Events::Event
(Class Event)
Class Documentation#
-
class WindowContentScaleEvent : public TRAP::Events::Event#
Window content scale.
Remark
Headless mode: This class is not available in headless mode.
Public Functions
-
explicit WindowContentScaleEvent(f32 xScale, f32 yScale, TRAP::Window &window)#
Constructor.
Note
The window must outlive the WindowContentScaleEvent!
- Parameters:
xScale – New x content scale.
yScale – New y content scale.
window – The affected window.
-
constexpr ~WindowContentScaleEvent() override = default#
Destructor.
-
consteval WindowContentScaleEvent(const WindowContentScaleEvent&) noexcept = delete#
Copy constructor.
-
consteval WindowContentScaleEvent &operator=(const WindowContentScaleEvent&) noexcept = delete#
Copy assignment operator.
-
constexpr WindowContentScaleEvent(WindowContentScaleEvent&&) noexcept = default#
Move constructor.
-
WindowContentScaleEvent &operator=(WindowContentScaleEvent&&) noexcept = default#
Move assignment operator.
-
constexpr f32 GetXScale() const noexcept#
Retrieve the new x content scale.
- Returns:
Window x content scale.
-
constexpr f32 GetYScale() const noexcept#
Retrieve the new y content scale.
- Returns:
Window y content scale.
-
constexpr Math::Vec2 GetScale() const noexcept#
Retrieve the new content scale.
- Returns:
Window content scale.
-
constexpr TRAP::Window &GetWindow() const noexcept#
Retrieve a reference to the affected window.
- Returns:
Window pointer.
-
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.
-
explicit WindowContentScaleEvent(f32 xScale, f32 yScale, TRAP::Window &window)#