You.i Engine
YiListLayoutGrid.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2017. All rights reserved.
2 #ifndef _YI_LIST_LAYOUT_GRID_H_
3 #define _YI_LIST_LAYOUT_GRID_H_
4 
5 #include "YiListLayout.h"
6 
7 namespace yi
8 {
9 
15 namespace deprecated
16 {
17 
28 {
29 public:
35  CYIListLayoutGrid(CYIListView *pList, uint32_t nGridSliceCount, float fCellSizeInScrollDir, uint32_t nCellsPerPage);
36 
37  virtual void Layout(bool bAnimate, float &fStart, float &fEnd) override;
38  virtual int32_t GetItemPage(int32_t nItemIndex) const override;
39  virtual int32_t FindNextHighlightedListItem(CYIListView::SELECTION_DIRECTION eDir) const override;
40  virtual void Cells2SizeAndPos(const YI_RECT_REL *pCellsRect, YI_POINT2D *pSize, YI_POINT2D *pPos) const override;
41  virtual int32_t GetCellsInScrollDirection() const override;
42  virtual void ListTypeChanged() override;
43  virtual void ListSizeChanged() override;
44 
50  uint32_t GetGridSliceCount();
51 
57  uint32_t GetGridCellsPerPage();
58 
66  void GetCellSize(float *pWidth, float *pHeight);
67 
74 
86  void EnableAutoLayout(bool bEnableAutoLayout);
87 
88 
94  bool IsAutoLayoutEnabled() const;
95 
96 protected:
100  int32_t FindItemAtCell(int32_t nX, int32_t nY) const;
101 
102 protected:
108 
109  float m_fStart;
110  float m_fEnd;
111 
113 
114 private:
116 };
117 
118 } // namespace deprecated
119 
122 } // namespace yi
123 
124 #endif // _YI_LIST_LAYOUT_GRID_H_
Definition: YiAbstractSignalTransition.h:7
A yi::deprecated::CYIListLayout which arranges items in a grid, which is a rectangular collection of ...
Definition: YiListLayoutGrid.h:27
float m_fGridCellHigh
Definition: YiListLayoutGrid.h:106
Definition: YiPredef.h:234
uint32_t m_uGridCellsPerPage
Definition: YiListLayoutGrid.h:104
float m_fGridCellWide
Definition: YiListLayoutGrid.h:105
virtual void Layout(bool bAnimate, float &fStart, float &fEnd) override
bool m_bAutoLayout
Definition: YiListLayoutGrid.h:112
#define YI_TYPE_BASES(...)
Definition: YiRtti.h:350
yi::deprecated::CYIListView is a view that lays out its elements programatically using a CYIListLayou...
Definition: YiListView.h:52
virtual int32_t FindNextHighlightedListItem(CYIListView::SELECTION_DIRECTION eDir) const override
virtual void ListSizeChanged() override
virtual void Cells2SizeAndPos(const YI_RECT_REL *pCellsRect, YI_POINT2D *pSize, YI_POINT2D *pPos) const override
virtual int32_t GetCellsInScrollDirection() const override
CYIListLayoutGrid(CYIListView *pList, uint32_t nGridSliceCount, float fCellSizeInScrollDir, uint32_t nCellsPerPage)
uint32_t m_uGridSliceCount
Definition: YiListLayoutGrid.h:103
float m_fStart
Definition: YiListLayoutGrid.h:109
int32_t FindItemAtCell(int32_t nX, int32_t nY) const
virtual int32_t GetItemPage(int32_t nItemIndex) const override
virtual void ListTypeChanged() override
void GetCellSize(float *pWidth, float *pHeight)
float m_fCellSizeInScrollDir
Definition: YiListLayoutGrid.h:107
Definition: YiPredef.h:177
SELECTION_DIRECTION
Definition: YiListView.h:67
float m_fEnd
Definition: YiListLayoutGrid.h:110
The abstract base class for list layouts.
Definition: YiListLayout.h:31
void EnableAutoLayout(bool bEnableAutoLayout)