26#ifndef TGUI_REL_FLOAT_RECT_HPP
27#define TGUI_REL_FLOAT_RECT_HPP
30#include <TGUI/AbsoluteOrRelativeValue.hpp>
31#include <TGUI/Rect.hpp>
137 TGUI_CONSTEXPR
void updateParentSize(
Vector2f newParentSize)
139 m_left.updateParentSize(newParentSize.
x);
140 m_top.updateParentSize(newParentSize.
y);
141 m_width.updateParentSize(newParentSize.
x);
142 m_height.updateParentSize(newParentSize.
y);
148 AbsoluteOrRelativeValue m_left;
149 AbsoluteOrRelativeValue m_top;
150 AbsoluteOrRelativeValue m_width;
151 AbsoluteOrRelativeValue m_height;
Class to store the a value that is either a constant or a ratio.
Definition AbsoluteOrRelativeValue.hpp:43
TGUI_CONSTEXPR float getValue() const
Returns the value.
Definition AbsoluteOrRelativeValue.hpp:104
T y
Y coordinate of the vector.
Definition Vector2.hpp:142
T x
X coordinate of the vector.
Definition Vector2.hpp:141
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36
FloatRect that can contain absolute values or values relative to the parent size.
Definition RelFloatRect.hpp:41
TGUI_CONSTEXPR float getTop() const
Returns the top position of the rect as an absolute value.
Definition RelFloatRect.hpp:81
TGUI_CONSTEXPR Vector2f getPosition() const
Returns the size of the rect as an absolute value.
Definition RelFloatRect.hpp:107
TGUI_CONSTEXPR RelFloatRect()
Default constructor.
Definition RelFloatRect.hpp:45
TGUI_CONSTEXPR FloatRect getRect() const
Returns the the rectangle as an absolute value.
Definition RelFloatRect.hpp:125
TGUI_CONSTEXPR float getLeft() const
Returns the left position of the rect as an absolute value.
Definition RelFloatRect.hpp:72
TGUI_CONSTEXPR float getWidth() const
Returns the width of the rect as an absolute value.
Definition RelFloatRect.hpp:90
TGUI_CONSTEXPR float getHeight() const
Returns the height of the rect as an absolute value.
Definition RelFloatRect.hpp:99
TGUI_CONSTEXPR Vector2f getSize() const
Returns the size of the rect as an absolute value.
Definition RelFloatRect.hpp:116
TGUI_CONSTEXPR RelFloatRect(AbsoluteOrRelativeValue left, AbsoluteOrRelativeValue top, AbsoluteOrRelativeValue width, AbsoluteOrRelativeValue height)
Constructs the rectangle from its position and size.
Definition RelFloatRect.hpp:59