You.i Engine
YiGridLayoutView.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_GRID_LAYOUT_VIEW_H_
3 #define _YI_GRID_LAYOUT_VIEW_H_
4 
6 #include "view/YiSceneView.h"
7 
8 namespace yi
9 {
10 
17 namespace deprecated
18 {
37 class GridLayoutItem;
38 
40 {
41 public:
42  enum TYPE
43  {
46  };
47 
49  virtual ~CYIGridLayoutView();
50 
54  virtual bool Init() override;
55 
65  void SetGridSize(uint32_t nRows, uint32_t nCols, CYIGridLayoutView::TYPE eDir);
66 
77  void AddItem(std::unique_ptr<CYISceneView> pView, int32_t nCellsWide, int32_t nCellsHigh, int32_t nCellsX = -1, int32_t nCellsY = -1);
78 
82  void ClearItems();
83 
84 protected:
85  void Cells2SizeAndPos(GridLayoutItem *pItem, YI_POINT2D *pSize, YI_POINT2D *pPos) const;
86 
87  std::vector<GridLayoutItem*> m_vItems;
92 
94 };
95 
96 } // namespace deprecated
97 
100 } // namespace yi
101 
102 
103 #endif // _YI_GRID_LAYOUT_VIEW_H_
Definition: YiAbstractSignalTransition.h:7
Definition: YiGridLayoutView.h:44
void AddItem(std::unique_ptr< CYISceneView > pView, int32_t nCellsWide, int32_t nCellsHigh, int32_t nCellsX=-1, int32_t nCellsY=-1)
Inserts the specified view in the specified cells block.
The base class for all view types. Views are containers of renderable elements that often define inte...
Definition: YiSceneView.h:47
std::vector< GridLayoutItem * > m_vItems
Definition: YiGridLayoutView.h:87
float m_fGridCellWide
Definition: YiGridLayoutView.h:90
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
TYPE m_eDir
Definition: YiGridLayoutView.h:89
Definition: YiGridLayoutView.h:39
float m_fGridCellHigh
Definition: YiGridLayoutView.h:91
void ClearItems()
Clears the items, don&#39;t hold raw pointers to these views.
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
void Cells2SizeAndPos(GridLayoutItem *pItem, YI_POINT2D *pSize, YI_POINT2D *pPos) const
CYISceneNode * m_pRoot
Definition: YiGridLayoutView.h:88
void SetGridSize(uint32_t nRows, uint32_t nCols, CYIGridLayoutView::TYPE eDir)
Specifies the direction in which the grid increases when items are being added.
virtual bool Init() override
Called by the framework when this class is being instanciated. Not called during normal usage of the ...
Definition: YiPredef.h:177
Definition: YiGridLayoutView.h:45
TYPE
Definition: YiGridLayoutView.h:42