You.i Engine
YiPageIndicatorView.h
Go to the documentation of this file.
1 // © You i Labs Inc. 2000-2020. All rights reserved.
2 #ifndef _YI_PAGE_INDICATOR_VIEW_H_
3 #define _YI_PAGE_INDICATOR_VIEW_H_
4 
6 #include "view/YiListView.h"
7 
40 {
41 public:
43  virtual ~CYIPageIndicatorView();
44 
48  virtual bool Init() override;
49 
53  void SetPageCount(size_t pageCount);
54 
58  void SetCurrentPage(size_t currentPage);
59 
63  void SetPageItemTemplate(std::shared_ptr<CYIAssetViewTemplate> pPageItemTemplate);
64 
65 protected:
66  virtual std::unique_ptr<CYILayout> CreateDefaultLayoutInstance() const override;
67 
68 private:
69  class CYIPageIndicatorViewAdapter;
70 
71  void SetItemHighlighted(size_t index, bool highlight);
72  virtual void StreamedIn(size_t index, CYISceneNode *pStreamedItem) override;
73  virtual void StreamedOut(size_t index, CYISceneNode *pStreamedItem) override;
74 
75  std::vector<CYIAnimationToggleController> m_pageItemToggleControllers;
76 
77  std::shared_ptr<CYIAssetViewTemplate> m_pPageItemTemplate;
78 
79  size_t m_pageCount;
80  size_t m_currentPage;
81 
83 };
84 
87 #endif // _YI_PAGE_INDICATOR_VIEW_H_
virtual ~CYIPageIndicatorView()
virtual std::unique_ptr< CYILayout > CreateDefaultLayoutInstance() const override
A class that provides streaming functionality in a scrolling view.
Definition: YiListView.h:35
virtual bool Init() override
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
void SetCurrentPage(size_t currentPage)
#define YI_TYPE_BASES(CLASS, BASES...)
Definition: YiRtti.h:257
Page indicator control.
Definition: YiPageIndicatorView.h:39
void SetPageItemTemplate(std::shared_ptr< CYIAssetViewTemplate > pPageItemTemplate)
void SetPageCount(size_t pageCount)