MyGUI 3.4.3
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"
13
14namespace MyGUI
15{
16
20 class MYGUI_EXPORT ScrollView : public Widget, protected ScrollViewBase, public MemberObsolete<ScrollView>
21 {
23
24 public:
25 ScrollView();
26
28 void setPosition(const IntPoint& _point) override;
30 void setSize(const IntSize& _size) override;
32 void setCoord(const IntCoord& _coord) override;
33
34 using Widget::setPosition;
35 using Widget::setSize;
36 using Widget::setCoord;
37
39 void setVisibleVScroll(bool _value);
41 bool isVisibleVScroll() const;
42
44 void setVisibleHScroll(bool _value);
46 bool isVisibleHScroll() const;
47
49 void setCanvasAlign(Align _value);
51 Align getCanvasAlign() const;
52
54 void setCanvasSize(const IntSize& _value);
56 void setCanvasSize(int _width, int _height);
58 IntSize getCanvasSize() const;
59
61 IntCoord getViewCoord() const;
62
64 void setViewOffset(const IntPoint& _value);
66 IntPoint getViewOffset() const;
67
68 protected:
69 void initialiseOverride() override;
70 void shutdownOverride() override;
71
72 void notifyScrollChangePosition(ScrollBar* _sender, size_t _position);
73 void notifyMouseWheel(Widget* _sender, int _rel);
74
75 void updateView();
76
77 void setPropertyOverride(std::string_view _key, std::string_view _value) override;
78
79 ScrollBar* getVScroll() const;
80
81 private:
82 // размер данных
83 IntSize getContentSize() const override;
84 // смещение данных
85 IntPoint getContentPosition() const override;
86 // размер окна, через которые видно данные
87 IntSize getViewSize() const override;
88 void setContentPosition(const IntPoint& _point) override;
89 // размер на который прокручиваются данные при щелчке по скролу
90 size_t getVScrollPage() const override;
91 size_t getHScrollPage() const override;
92
93 Align getContentAlign() const override;
94
95 protected:
97 };
98
99} // namespace MyGUI
100
101#endif // MYGUI_SCROLL_VIEW_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
widget description should be here.
widget description should be here.
widget description should be here.