MyGUI: MyGUI_ScrollView.h Source File

MyGUI 3.4.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
14namespace 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 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() const;
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() const;
83
84 private:
85 // размер данных
86 IntSize getContentSize() const override;
87 // смещение данных
88 IntPoint getContentPosition() const override;
89 // размер окна, через которые видно данные
90 IntSize getViewSize() const override;
91 void setContentPosition(const IntPoint& _point) override;
92 // размер на который прокручиваются данные при щелчке по скролу
93 size_t getVScrollPage() const override;
94 size_t getHScrollPage() const override;
95
96 Align getContentAlign() const override;
97
98 protected:
99 Align mContentAlign;
100 };
101
102} // namespace MyGUI
103
104#endif // MYGUI_SCROLL_VIEW_H_
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:48
MyGUI_ScrollViewBase.h
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::ScrollBar
widget description should be here.
Definition MyGUI_ScrollBar.h:26
MyGUI::ScrollViewBase
Definition MyGUI_ScrollViewBase.h:17
MyGUI::ScrollView
widget description should be here.
Definition MyGUI_ScrollView.h:24
MyGUI::ScrollView::mContentAlign
Align mContentAlign
Definition MyGUI_ScrollView.h:99
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:37
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::Align
Definition MyGUI_Align.h:20
MyGUI::types::TCoord< int >
MyGUI::types::TPoint< int >
MyGUI::types::TSize< int >