You.i Engine
YiScalingLayout.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_SCALING_LAYOUT_H_
3 #define _YI_SCALING_LAYOUT_H_
4 
5 #include "layout/YiStackLayout.h"
6 
42 {
43 public:
45  virtual ~CYIScalingLayout();
46 
51  {
56  };
57 
61  void SetScalingMode(SCALE_MODE eMode);
62  SCALE_MODE GetScalingMode() const;
63 
64 protected:
65  virtual void Configure() override;
66 
67  virtual void OnMeasure(const CYISceneNode::MeasureSpec &widthSpec, const CYISceneNode::MeasureSpec &heightSpec, const CYISceneNode::MeasureSpec &depthSpec) override;
68 
69  virtual void OnApplyMeasurements() override;
70 
74  virtual void ApplyScale(CYISceneNode *pChild, const glm::vec3 &vScale);
75 
76 private:
77  SCALE_MODE m_eScaleMode;
78 
80 };
81 
84 #endif // _YI_SCALING_LAYOUT_H_
virtual ~CYIScalingLayout()
virtual void OnMeasure(const CYISceneNode::MeasureSpec &widthSpec, const CYISceneNode::MeasureSpec &heightSpec, const CYISceneNode::MeasureSpec &depthSpec) override
Definition: YiSceneNode.h:356
virtual void OnApplyMeasurements() override
SCALE_MODE
Definition: YiScalingLayout.h:50
void SetScalingMode(SCALE_MODE eMode)
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
Causes the children to be given a scale of 1.0.
Definition: YiScalingLayout.h:55
SCALE_MODE GetScalingMode() const
virtual void ApplyScale(CYISceneNode *pChild, const glm::vec3 &vScale)
Causes the children to proportionally scale to fit the container. The aspect ratio of the children is...
Definition: YiScalingLayout.h:53
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:114
A layout that scales its children to fill their container.
Definition: YiScalingLayout.h:41
Causes the children to stretch to fill the container.
Definition: YiScalingLayout.h:52
virtual void Configure() override
Causes the children to proportionally scale to fill the container. The children may overflow out of t...
Definition: YiScalingLayout.h:54
A layout that positions all of its children in a 'stack'.
Definition: YiStackLayout.h:29