21 #ifndef GF_WINDOW_GEOMETRY_TRACKER_H
22 #define GF_WINDOW_GEOMETRY_TRACKER_H
28 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85 float getXRatio(
float ratio,
float width)
const;
123 float getYRatio(
float ratio,
float height)
const;
167 Vector2u m_screenSize;
170 #ifndef DOXYGEN_SHOULD_SKIP_THIS
float getXFromRight(float width) const
Compute x for a right aligned element.
void setInitialScreenSize(Vector2u screenSize)
Set the initial screen size.
float getYFromBottom(float height) const
Compute y for a bottom aligned element.
void onScreenResize(Vector2u screenSize)
Update the geometry with the new screen size.
WindowGeometryTracker()
Default constructor.
Vector2f getCornerPosition(const Vector2f &pos) const
Get a position relative to a corner.
void processEvent(const Event &event)
Update the geometry thanks to the event.
float getXRatio(float ratio, float width) const
Compute x for an element at some percent from the left.
float getYRatio(float ratio, float height) const
Compute y for an element at some percent from the top.
float getYCentered(float height) const
Compute y for a centered element.
Defines a system event and its parameters.
Definition: Event.h:115
#define GF_API
Definition: Portability.h:35
float getXCentered(float width) const
Compute x for a centered element.
A window geometry tracker.
Definition: WindowGeometryTracker.h:43