You.i Engine
YiLinearLayout.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_LINEAR_LAYOUT_H_
3 #define _YI_LINEAR_LAYOUT_H_
4 
6 
91 {
92 public:
94  {
98  };
99 
101  {
106  };
107 
109  {
115  };
116 
117  CYILinearLayout();
118  virtual ~CYILinearLayout();
119 
127  void SetSpacing(float fSpacing);
128 
129  float GetSpacing() const;
130 
136  void SetJustify(bool bJustify);
137 
138  bool IsUsingJustify() const;
139 
147  void SetOrientation(ORIENTATION eOrientation);
148 
149  ORIENTATION GetOrientation() const;
150 
156  void SetOverflowMode(OVERFLOW_MODE eMode);
157 
159 
167  void SetLineGravity(LINE_GRAVITY eLineGravity);
168 
169  LINE_GRAVITY GetLineGravity() const;
170 
171 protected:
172  virtual void Configure() override;
173  virtual void OnMeasure(const CYISceneNode::MeasureSpec &widthSpec, const CYISceneNode::MeasureSpec &heightSpec, const CYISceneNode::MeasureSpec &depthSpec) override;
174  virtual void OnApplyMeasurements() override;
175 
176  float m_fSpacing;
181 
182 private:
183  class CYILinearLayoutPriv;
184 
185  CYILinearLayoutPriv *m_pPriv;
186 
188 };
189 
192 #endif // _YI_LINEAR_LAYOUT_H_
Items are laid out in one or more lines. Items that overflow the view in the layout direction are wra...
Definition: YiLinearLayout.h:105
virtual void Configure() override
Definition: YiSceneNode.h:356
Lines are aligned at the centre of the view.
Definition: YiLinearLayout.h:112
LINE_GRAVITY GetLineGravity() const
Lines are aligned as indicated in the view's gravity value (in the non-layout direction) ...
Definition: YiLinearLayout.h:110
A layout that positions all of its children in a row, a column, or a 'shaft'.
Definition: YiLinearLayout.h:90
virtual ~CYILinearLayout()
ORIENTATION
Definition: YiLinearLayout.h:93
float m_fSpacing
Definition: YiLinearLayout.h:176
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
OVERFLOW_MODE
Definition: YiLinearLayout.h:100
void SetOverflowMode(OVERFLOW_MODE eMode)
ORIENTATION GetOrientation() const
void SetSpacing(float fSpacing)
virtual void OnApplyMeasurements() override
bool IsUsingJustify() const
Items are laid out in a single line. No consideration is made for items that overflow the view in the...
Definition: YiLinearLayout.h:102
Lines are aligned at the 'start' of the view (e.g. top for horizontal orientations and left for verti...
Definition: YiLinearLayout.h:111
Lines are aligned at the 'end' of the view (e.g. bottom for horizontal orientations and right for ver...
Definition: YiLinearLayout.h:113
LINE_GRAVITY
Definition: YiLinearLayout.h:108
Lines are justified within the view (in the non-layout direction)
Definition: YiLinearLayout.h:114
Items are laid out in a single line. Items that overflow the view in the layout direction are moved o...
Definition: YiLinearLayout.h:103
float GetSpacing() const
Items are laid out in one or more lines. Items that overflow the view in the layout direction are wra...
Definition: YiLinearLayout.h:104
void SetOrientation(ORIENTATION eOrientation)
OVERFLOW_MODE m_eOverflowMode
Definition: YiLinearLayout.h:179
virtual void OnMeasure(const CYISceneNode::MeasureSpec &widthSpec, const CYISceneNode::MeasureSpec &heightSpec, const CYISceneNode::MeasureSpec &depthSpec) override
void SetJustify(bool bJustify)
A layout that can animate its children's position and size.
Definition: YiAnimatingLayout.h:67
LINE_GRAVITY m_eLineGravity
Definition: YiLinearLayout.h:180
void SetLineGravity(LINE_GRAVITY eLineGravity)
bool m_bJustify
Definition: YiLinearLayout.h:177
Align children side-by-side along the x axis.
Definition: YiLinearLayout.h:95
ORIENTATION m_eOrientation
Definition: YiLinearLayout.h:178
Align children on top of one another along the z axis.
Definition: YiLinearLayout.h:97
OVERFLOW_MODE GetOverflowMode() const
Align children along the y axis.
Definition: YiLinearLayout.h:96