2 #ifndef _YI_LAYOUT_CONFIG_H_ 3 #define _YI_LAYOUT_CONFIG_H_ 7 #include <glm/vec3.hpp> 69 return vStart.x + vEnd.x;
73 return vStart.y + vEnd.y;
77 return vStart.z + vEnd.z;
118 SizeConstraint() : fMinimum(-1.0f), fPreferred(-1.0f), fMaximum(-1.0f), bFillParent(false), bFitContent(false) {}
290 glm::vec3 m_vItemGravity;
299 return m_sizeConstraints;
309 return m_bLayoutable;
314 return m_vItemGravity;
319 return m_bBackground;
322 #endif // _YI_LAYOUT_CONFIG_H_ float GetBottom() const
Definition: YiLayoutConfig.h:92
float GetLeft() const
Definition: YiLayoutConfig.h:80
The base class for an C++ object that has RTTI information and is accesible from script source code...
Definition: YiScriptableRTTIObject.h:28
SizeConstraint height
Definition: YiLayoutConfig.h:139
float fMaximum
Definition: YiLayoutConfig.h:122
float GetTotalY() const
Definition: YiLayoutConfig.h:71
void SetMargin(const Margin &margin)
static float ParseLengthValue(const CYIString &length)
SizeConstraints()
Definition: YiLayoutConfig.h:135
const Margin & GetMargin() const
Definition: YiLayoutConfig.h:302
static glm::vec3 GetGravityVectorFor(GRAVITY eGravity)
A class used to hold a 3D 'cube offset'.
Definition: YiLayoutConfig.h:52
bool bFitContent
Definition: YiLayoutConfig.h:124
void SetItemGravity(const glm::vec3 &vItemGravity)
Container class for Unicode strings. Conceptually, a CYIString object is a sequence of Unicode charac...
Definition: YiString.h:35
CubeOffset(float fOffset)
Definition: YiLayoutConfig.h:56
bool IsBackground() const
Definition: YiLayoutConfig.h:317
SizeConstraint width
Definition: YiLayoutConfig.h:138
void SetIsBackground(bool bBackground)
static const SizeConstraints defaultInstance
Definition: YiLayoutConfig.h:136
glm::vec3 vEnd
Definition: YiLayoutConfig.h:64
float GetTop() const
Definition: YiLayoutConfig.h:88
Aligns the bottom edge of the child with the bottom edge of the container.
Definition: YiLayoutConfig.h:38
Indicates that the existing position of the child will be retained.
Definition: YiLayoutConfig.h:33
Aligns the right edge of the child with the right edge of the container.
Definition: YiLayoutConfig.h:36
Aligns the front edge of the child with the front edge of the container.
Definition: YiLayoutConfig.h:39
CubeOffset Margin
Definition: YiLayoutConfig.h:106
Centers the child in the container.
Definition: YiLayoutConfig.h:34
float GetFront() const
Definition: YiLayoutConfig.h:96
A class used to hold a size constraint for a specific dimension.
Definition: YiLayoutConfig.h:115
bool bMaintainAspectRatio
Definition: YiLayoutConfig.h:142
Aligns the top edge of the child with the top edge of the container.
Definition: YiLayoutConfig.h:37
static bool ParseBooleanValue(const CYIString &value)
CubeOffset()
Definition: YiLayoutConfig.h:55
glm::vec3 vStart
Definition: YiLayoutConfig.h:63
static uint32_t ParseTimeValue(const CYIString &value)
float GetTotalZ() const
Definition: YiLayoutConfig.h:75
SizeConstraint()
Definition: YiLayoutConfig.h:118
A class used to hold node-specific layout configuration (such as, for example, Margin).
Definition: YiLayoutConfig.h:24
virtual void ConfigureFrom(const IYIPropertiesSource *pSource)
static float ParseFloatValue(const CYIString &value)
void SetLayoutable(bool bLayoutable)
static glm::vec3 ReadGravityFrom(const CYIString &key, const IYIPropertiesSource *pSource, const glm::vec3 &vDefault)
GRAVITY
Definition: YiLayoutConfig.h:31
static void RemoveSuffixFromNumber(CYIString &inOutNumber, CYIString &outSuffix)
CubeOffset(const glm::vec3 &vOffset)
Definition: YiLayoutConfig.h:59
An interface to a class that provides key-value properties.
Definition: YiPropertiesSource.h:17
float GetTotalX() const
Definition: YiLayoutConfig.h:67
Aligns the bottom-right corner of the child with the bottom-right corner of the container.
Definition: YiLayoutConfig.h:44
float fMinimum
Definition: YiLayoutConfig.h:120
const SizeConstraints & GetSizeConstraints() const
Definition: YiLayoutConfig.h:297
float GetBack() const
Definition: YiLayoutConfig.h:100
A class used to hold the size constraint for each of the 3 dimensions. A flag that indicates if the w...
Definition: YiLayoutConfig.h:132
static CubeOffset CreateFromPropertiesOf(const IYIPropertiesSource *pSource, const CYIString &keyPrefix, const CubeOffset &defaultValue=zeroInstance)
float GetRight() const
Definition: YiLayoutConfig.h:84
static const CubeOffset zeroInstance
Definition: YiLayoutConfig.h:60
SizeConstraint depth
Definition: YiLayoutConfig.h:140
const glm::vec3 & GetItemGravity() const
Definition: YiLayoutConfig.h:312
bool bFillParent
Definition: YiLayoutConfig.h:123
void SetSizeConstraints(const SizeConstraints &sizeConstraints)
Aligns the back edge of the child with the back edge of the container.
Definition: YiLayoutConfig.h:40
virtual ~CYILayoutConfig()
glm::vec3 GetTotal() const
Definition: YiLayoutConfig.h:66
float fPreferred
Definition: YiLayoutConfig.h:121
Aligns the left edge of the child with the left edge of the container.
Definition: YiLayoutConfig.h:35
Aligns the top-right corner of the child with the top-right corner of the container.
Definition: YiLayoutConfig.h:42
Aligns the bottom-left corner of the child with the bottom-left corner of the container.
Definition: YiLayoutConfig.h:43
bool IsLayoutable() const
Definition: YiLayoutConfig.h:307
Aligns the top-left corner of the child with the top-left corner of the container.
Definition: YiLayoutConfig.h:41