You.i Engine
YiAutoLayout.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_AUTO_LAYOUT_H_
3 #define _YI_AUTO_LAYOUT_H_
4 
5 #include "layout/YiStackLayout.h"
6 
62 {
63 public:
64  CYIAutoLayout();
65  virtual ~CYIAutoLayout();
66 
74  void SetDetectFillParent(bool detectFillParent);
75 
76  bool IsDetectingFillParent() const;
77 
78 protected:
79  virtual void Configure() override;
80 
81  virtual void ChildAdded(CYISceneNode *pChild) override;
82 
83  virtual void ApplyPosition(CYISceneNode *pNode, const glm::vec3 &position) override;
84 
85 private:
86  void SetupStaticMargins(CYISceneNode *pNode, const glm::vec3 &containerSize) const;
87 
88  bool m_detectFillParent;
89 
91 };
92 
95 #endif // _YI_AUTO_LAYOUT_H_
virtual void ChildAdded(CYISceneNode *pChild) override
virtual void Configure() override
void SetDetectFillParent(bool detectFillParent)
A layout that assigns margins to children based on their initial position and size.
Definition: YiAutoLayout.h:61
A scene node is the base type for all nodes which are used by the scene manager; it is an integral pa...
Definition: YiSceneNode.h:99
virtual void ApplyPosition(CYISceneNode *pNode, const glm::vec3 &position) override
A layout that positions all of its children in a 'stack'.
Definition: YiStackLayout.h:29
#define YI_TYPE_BASES(CLASS, BASES...)
Definition: YiRtti.h:257
bool IsDetectingFillParent() const
virtual ~CYIAutoLayout()