MyGUI 3.2.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

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
20 class MYGUI_EXPORT ScrollView :
21 public Widget,
22 protected ScrollViewBase,
23 public MemberObsolete<ScrollView>
24 {
25 MYGUI_RTTI_DERIVED( ScrollView )
26
27 public:
28 ScrollView();
29
31 virtual void setPosition(const IntPoint& _value);
33 virtual void setSize(const IntSize& _value);
35 virtual void setCoord(const IntCoord& _value);
36
38 void setPosition(int _left, int _top);
40 void setSize(int _width, int _height);
42 void setCoord(int _left, int _top, int _width, int _height);
43
45 void setVisibleVScroll(bool _value);
47 bool isVisibleVScroll() const;
48
50 void setVisibleHScroll(bool _value);
52 bool isVisibleHScroll() const;
53
55 void setCanvasAlign(Align _value);
57 Align getCanvasAlign() const;
58
60 void setCanvasSize(const IntSize& _value);
62 void setCanvasSize(int _width, int _height);
64 IntSize getCanvasSize();
65
67 IntCoord getViewCoord() const;
68
70 void setViewOffset(const IntPoint& _value);
72 IntPoint getViewOffset() const;
73
74 protected:
75 virtual void initialiseOverride();
76 virtual void shutdownOverride();
77
78 void notifyMousePressed(Widget* _sender, int _left, int _top, MouseButton _id);
79 void notifyMouseReleased(Widget* _sender, int _left, int _top, MouseButton _id);
80
81 void notifyScrollChangePosition(ScrollBar* _sender, size_t _position);
82 void notifyMouseWheel(Widget* _sender, int _rel);
83
84 void updateView();
85
86 virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
87
88 ScrollBar* getVScroll();
89
90 private:
91 // размер данных
92 virtual IntSize getContentSize();
93 // смещение данных
94 virtual IntPoint getContentPosition();
95 // размер окна, через которые видно данные
96 virtual IntSize getViewSize();
97 virtual void setContentPosition(const IntPoint& _point);
98 // размер на который прокручиваются данные при щелчке по скролу
99 virtual size_t getVScrollPage();
100 virtual size_t getHScrollPage();
101
102 virtual Align getContentAlign();
103
104 protected:
105 Align mContentAlign;
106 Widget* mRealClient;
107 };
108
109 } // namespace MyGUI
110
111 #endif // MYGUI_SCROLL_VIEW_H_
MyGUI::types::TCoord< int >
MyGUI::Widget
Widget properties. Widget_skin_childs Skin childs. Widget widget description should be here...
Definition: MyGUI_Widget.h:29
MyGUI::types::TPoint< int >
MyGUI_Prerequest.h
MyGUI::types::TSize< int >
MyGUI_ScrollViewBase.h
MyGUI::MouseButton
Definition: MyGUI_MouseButton.h:15
MyGUI::ScrollViewBase
Definition: MyGUI_ScrollViewBase.h:16
MyGUI
Definition: MyGUI_ActionController.h:14
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:65
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:103
MyGUI::ScrollView
ScrollView properties. ScrollView_skin_childs Skin childs. ScrollView widget description should be h...
Definition: MyGUI_ScrollView.h:20
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:13
MyGUI::Align
Definition: MyGUI_Align.h:19
MyGUI::ScrollBar
ScrollBar properties. ScrollBar_skin_childs Skin childs. ScrollBar widget description should be here...
Definition: MyGUI_ScrollBar.h:23