MyGUI  3.4.0
MyGUI_ScrollView.h
Go to the documentation of this file.
1 /*
2  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3  * Distributed under the MIT License
4  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5  */
6 
7 #ifndef MYGUI_SCROLL_VIEW_H_
8 #define MYGUI_SCROLL_VIEW_H_
9 
10 #include "MyGUI_Prerequest.h"
11 #include "MyGUI_Widget.h"
12 #include "MyGUI_ScrollViewBase.h"
13 
14 namespace MyGUI
15 {
16 
21  public Widget,
22  protected ScrollViewBase,
23  public MemberObsolete<ScrollView>
24  {
26 
27  public:
28  ScrollView();
29 
31  void setPosition(const IntPoint& _value) override;
33  void setSize(const IntSize& _value) override;
35  void setCoord(const IntCoord& _value) override;
36 
37  using Widget::setPosition;
38  using Widget::setSize;
39  using Widget::setCoord;
40 
42  void setVisibleVScroll(bool _value);
44  bool isVisibleVScroll() const;
45 
47  void setVisibleHScroll(bool _value);
49  bool isVisibleHScroll() const;
50 
52  void setCanvasAlign(Align _value);
54  Align getCanvasAlign() const;
55 
57  void setCanvasSize(const IntSize& _value);
59  void setCanvasSize(int _width, int _height);
61  IntSize getCanvasSize();
62 
64  IntCoord getViewCoord() const;
65 
67  void setViewOffset(const IntPoint& _value);
69  IntPoint getViewOffset() const;
70 
71  protected:
72  void initialiseOverride() override;
73  void shutdownOverride() override;
74 
75  void notifyScrollChangePosition(ScrollBar* _sender, size_t _position);
76  void notifyMouseWheel(Widget* _sender, int _rel);
77 
78  void updateView();
79 
80  void setPropertyOverride(const std::string& _key, const std::string& _value) override;
81 
82  ScrollBar* getVScroll();
83 
84  private:
85  // размер данных
86  IntSize getContentSize() override;
87  // смещение данных
88  IntPoint getContentPosition() override;
89  // размер окна, через которые видно данные
90  IntSize getViewSize() override;
91  void setContentPosition(const IntPoint& _point) override;
92  // размер на который прокручиваются данные при щелчке по скролу
93  size_t getVScrollPage() override;
94  size_t getHScrollPage() override;
95 
96  Align getContentAlign() override;
97 
98  protected:
100  };
101 
102 } // namespace MyGUI
103 
104 #endif // MYGUI_SCROLL_VIEW_H_
MyGUI::Widget::setPosition
void setPosition(const IntPoint &_value) override
Definition: MyGUI_Widget.cpp:630
MyGUI_Widget.h
MyGUI::ScrollBar
ScrollBar properties. Skin childs. ScrollBar widget description should be here.
Definition: MyGUI_ScrollBar.h:26
MyGUI::Widget
Widget properties. Skin childs. Widget widget description should be here.
Definition: MyGUI_Widget.h:37
MyGUI::types::TPoint< int >
MyGUI::Align
Definition: MyGUI_Align.h:20
MyGUI::ScrollViewBase
Definition: MyGUI_ScrollViewBase.h:17
MyGUI_ScrollViewBase.h
MyGUI_Prerequest.h
MyGUI::Widget::setSize
void setSize(const IntSize &_value) override
Definition: MyGUI_Widget.cpp:647
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:48
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:14
MyGUI::types::TSize< int >
MyGUI::Widget::setCoord
void setCoord(const IntCoord &_value) override
Definition: MyGUI_Widget.cpp:684
MyGUI::ScrollView::mContentAlign
Align mContentAlign
Definition: MyGUI_ScrollView.h:99
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:89
MyGUI::types::TCoord< int >
MyGUI::ScrollView
ScrollView properties. Skin childs. ScrollView widget description should be here.
Definition: MyGUI_ScrollView.h:24
MyGUI
Definition: MyGUI_ActionController.h:15