26#ifndef TGUI_REL_FLOAT_RECT_HPP
27#define TGUI_REL_FLOAT_RECT_HPP
30#include <TGUI/AbsoluteOrRelativeValue.hpp>
31#include <TGUI/Rect.hpp>
35TGUI_MODULE_EXPORT
namespace tgui
69 TGUI_NODISCARD
constexpr float getLeft()
const
78 TGUI_NODISCARD
constexpr float getTop()
const
87 TGUI_NODISCARD
constexpr float getWidth()
const
134 constexpr void updateParentSize(
Vector2f newParentSize)
136 m_left.updateParentSize(newParentSize.
x);
137 m_top.updateParentSize(newParentSize.
y);
138 m_width.updateParentSize(newParentSize.
x);
139 m_height.updateParentSize(newParentSize.
y);
145 AbsoluteOrRelativeValue m_left;
146 AbsoluteOrRelativeValue m_top;
147 AbsoluteOrRelativeValue m_width;
148 AbsoluteOrRelativeValue m_height;
Class to store the a value that is either a constant or a ratio.
Definition AbsoluteOrRelativeValue.hpp:46
TGUI_NODISCARD constexpr float getValue() const
Returns the value.
Definition AbsoluteOrRelativeValue.hpp:104
T y
Y coordinate of the vector.
Definition Vector2.hpp:139
T x
X coordinate of the vector.
Definition Vector2.hpp:138
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39
FloatRect that can contain absolute values or values relative to the parent size.
Definition RelFloatRect.hpp:41
constexpr RelFloatRect()=default
Default constructor.
TGUI_NODISCARD constexpr FloatRect getRect() const
Returns the the rectangle as an absolute value.
Definition RelFloatRect.hpp:122
TGUI_NODISCARD constexpr Vector2f getPosition() const
Returns the size of the rect as an absolute value.
Definition RelFloatRect.hpp:104
TGUI_NODISCARD constexpr float getHeight() const
Returns the height of the rect as an absolute value.
Definition RelFloatRect.hpp:96
TGUI_NODISCARD constexpr float getLeft() const
Returns the left position of the rect as an absolute value.
Definition RelFloatRect.hpp:69
TGUI_NODISCARD constexpr float getWidth() const
Returns the width of the rect as an absolute value.
Definition RelFloatRect.hpp:87
constexpr RelFloatRect(AbsoluteOrRelativeValue left, AbsoluteOrRelativeValue top, AbsoluteOrRelativeValue width, AbsoluteOrRelativeValue height)
Constructs the rectangle from its position and size.
Definition RelFloatRect.hpp:56
TGUI_NODISCARD constexpr float getTop() const
Returns the top position of the rect as an absolute value.
Definition RelFloatRect.hpp:78
TGUI_NODISCARD constexpr Vector2f getSize() const
Returns the size of the rect as an absolute value.
Definition RelFloatRect.hpp:113