MyGUI: MyGUI_ScrollView.h Source File

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"
12#include "MyGUI_ScrollViewBase.h"
13
14namespace MyGUI
15{
16
20 class MYGUI_EXPORT ScrollView : public Widget, protected ScrollViewBase, public MemberObsolete<ScrollView>
21 {
22 MYGUI_RTTI_DERIVED(ScrollView)
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:
96 Align mContentAlign;
97 };
98
99} // namespace MyGUI
100
101#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:69
MyGUI_ScrollViewBase.h
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::ScrollBar
widget description should be here.
Definition MyGUI_ScrollBar.h:24
MyGUI::ScrollViewBase
Definition MyGUI_ScrollViewBase.h:17
MyGUI::ScrollView::setVisibleHScroll
void setVisibleHScroll(bool _value)
Definition MyGUI_ScrollView.cpp:198
MyGUI::ScrollView::getViewCoord
IntCoord getViewCoord() const
Definition MyGUI_ScrollView.cpp:316
MyGUI::ScrollView::getCanvasSize
IntSize getCanvasSize() const
Definition MyGUI_ScrollView.cpp:216
MyGUI::ScrollView::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_ScrollView.cpp:69
MyGUI::ScrollView::setVisibleVScroll
void setVisibleVScroll(bool _value)
Definition MyGUI_ScrollView.cpp:192
MyGUI::ScrollView::initialiseOverride
void initialiseOverride() override
Definition MyGUI_ScrollView.cpp:25
MyGUI::ScrollView::setViewOffset
void setViewOffset(const IntPoint &_value)
Definition MyGUI_ScrollView.cpp:273
MyGUI::ScrollView::isVisibleHScroll
bool isVisibleHScroll() const
Definition MyGUI_ScrollView.cpp:253
MyGUI::ScrollView::setPropertyOverride
void setPropertyOverride(std::string_view _key, std::string_view _value) override
Definition MyGUI_ScrollView.cpp:221
MyGUI::ScrollView::getVScroll
ScrollBar * getVScroll() const
Definition MyGUI_ScrollView.cpp:321
MyGUI::ScrollView::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_ScrollView.cpp:74
MyGUI::ScrollView::isVisibleVScroll
bool isVisibleVScroll() const
Definition MyGUI_ScrollView.cpp:248
MyGUI::ScrollView::shutdownOverride
void shutdownOverride() override
Definition MyGUI_ScrollView.cpp:60
MyGUI::ScrollView::ScrollView
ScrollView()
Definition MyGUI_ScrollView.cpp:19
MyGUI::ScrollView::setCanvasAlign
void setCanvasAlign(Align _value)
Definition MyGUI_ScrollView.cpp:204
MyGUI::ScrollView::getCanvasAlign
Align getCanvasAlign() const
Definition MyGUI_ScrollView.cpp:258
MyGUI::ScrollView::updateView
void updateView()
Definition MyGUI_ScrollView.cpp:186
MyGUI::ScrollView::mContentAlign
Align mContentAlign
Definition MyGUI_ScrollView.h:96
MyGUI::ScrollView::setCanvasSize
void setCanvasSize(const IntSize &_value)
Definition MyGUI_ScrollView.cpp:210
MyGUI::ScrollView::getViewOffset
IntPoint getViewOffset() const
Definition MyGUI_ScrollView.cpp:311
MyGUI::ScrollView::notifyMouseWheel
void notifyMouseWheel(Widget *_sender, int _rel)
Definition MyGUI_ScrollView.cpp:104
MyGUI::ScrollView::notifyScrollChangePosition
void notifyScrollChangePosition(ScrollBar *_sender, size_t _position)
Definition MyGUI_ScrollView.cpp:88
MyGUI::ScrollView::setCoord
void setCoord(const IntCoord &_coord) override
Definition MyGUI_ScrollView.cpp:81
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI::Widget::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_Widget.cpp:693
MyGUI::Widget::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_Widget.cpp:676
MyGUI::Widget::setCoord
void setCoord(const IntCoord &_coord) override
Definition MyGUI_Widget.cpp:730
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntPoint
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
MyGUI::IntCoord
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::Align
Definition MyGUI_Align.h:20