MyGUI 3.2.0

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

- File List
- Globals

MyGUI_ScrollView.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_SCROLL_VIEW_H__
23 #define __MYGUI_SCROLL_VIEW_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Widget.h"
27 #include "MyGUI_ScrollViewBase.h"
28
29 namespace MyGUI
30 {
31
32 class MYGUI_EXPORT ScrollView :
33 public Widget,
34 protected ScrollViewBase,
35 public MemberObsolete<ScrollView>
36 {
37 MYGUI_RTTI_DERIVED( ScrollView )
38
39 public:
40 ScrollView();
41
43 virtual void setPosition(const IntPoint& _value);
45 virtual void setSize(const IntSize& _value);
47 virtual void setCoord(const IntCoord& _value);
48
50 void setPosition(int _left, int _top);
52 void setSize(int _width, int _height);
54 void setCoord(int _left, int _top, int _width, int _height);
55
57 void setVisibleVScroll(bool _value);
59 bool isVisibleVScroll() const;
60
62 void setVisibleHScroll(bool _value);
64 bool isVisibleHScroll() const;
65
67 void setCanvasAlign(Align _value);
69 Align getCanvasAlign() const;
70
72 void setCanvasSize(const IntSize& _value);
74 void setCanvasSize(int _width, int _height);
76 IntSize getCanvasSize();
77
79 IntCoord getViewCoord() const;
80
82 void setViewOffset(const IntPoint& _value);
84 IntPoint getViewOffset() const;
85
86 protected:
87 virtual void initialiseOverride();
88 virtual void shutdownOverride();
89
90 void notifyMousePressed(Widget* _sender, int _left, int _top, MouseButton _id);
91 void notifyMouseReleased(Widget* _sender, int _left, int _top, MouseButton _id);
92
93 void notifyScrollChangePosition(ScrollBar* _sender, size_t _position);
94 void notifyMouseWheel(Widget* _sender, int _rel);
95
96 void updateView();
97
98 virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
99
100 ScrollBar* getVScroll();
101
102 private:
103 // размер данных
104 virtual IntSize getContentSize();
105 // смещение данных
106 virtual IntPoint getContentPosition();
107 // размер окна, через которые видно данные
108 virtual IntSize getViewSize();
109 virtual void setContentPosition(const IntPoint& _point);
110 // размер на который прокручиваются данные при щелчке по скролу
111 virtual size_t getVScrollPage();
112 virtual size_t getHScrollPage();
113
114 virtual Align getContentAlign();
115
116 protected:
117 Align mContentAlign;
118 Widget* mRealClient;
119 };
120
121 } // namespace MyGUI
122
123 #endif // __MYGUI_SCROLL_VIEW_H__
MyGUI::types::TCoord< int >
MyGUI::Widget
Definition: MyGUI_Widget.h:41
MyGUI::types::TPoint< int >
MyGUI_Prerequest.h
MyGUI::types::TSize< int >
MyGUI_ScrollViewBase.h
MyGUI::MouseButton
Definition: MyGUI_MouseButton.h:30
MyGUI::ScrollViewBase
Definition: MyGUI_ScrollViewBase.h:31
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:88
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::ScrollView
Definition: MyGUI_ScrollView.h:32
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:28
MyGUI::Align
Definition: MyGUI_Align.h:34
MyGUI::ScrollBar
Definition: MyGUI_ScrollBar.h:33