MyGUI: MyGUI_ScrollViewBase.h Source File

MyGUI 3.4.3

MyGUI_ScrollViewBase.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_BASE_H_
8#define MYGUI_SCROLL_VIEW_BASE_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Types.h"
12
13namespace MyGUI
14{
15
16 class MYGUI_EXPORT ScrollViewBase
17 {
18 protected:
19 virtual ~ScrollViewBase() = default;
20
21 void updateScrollSize();
22 void updateScrollPosition();
23
24 // размер данных
25 virtual IntSize getContentSize() const;
26
27 // смещение данных
28 virtual IntPoint getContentPosition() const;
29 virtual void setContentPosition(const IntPoint& _value);
30
31 // размер окна, через которые видно данные
32 virtual IntSize getViewSize() const;
33
34 // размер на который прокручиваются данные при щелчке по скролу
35 virtual size_t getHScrollPage() const;
36 virtual size_t getVScrollPage() const;
37
38 virtual Align getContentAlign() const;
39
40 virtual void eraseContent();
41
42 protected:
43 ScrollBar* mVScroll{nullptr};
44 ScrollBar* mHScroll{nullptr};
45 Widget* mScrollViewClient{nullptr};
46
47 bool mVisibleHScroll{true};
48 bool mVisibleVScroll{true};
49
50 size_t mVRange{0};
51 size_t mHRange{0};
52
53 // изменяется ли содержимое при ресайзе
54 bool mChangeContentByResize{false};
55 };
56
57} // namespace MyGUI
58
59#endif // MYGUI_SCROLL_VIEW_BASE_H_
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition MyGUI_Platform.h:77
MyGUI_Prerequest.h
MyGUI_Types.h
MyGUI::ScrollBar
widget description should be here.
Definition MyGUI_ScrollBar.h:24
MyGUI::ScrollViewBase
Definition MyGUI_ScrollViewBase.h:17
MyGUI::ScrollViewBase::getViewSize
virtual IntSize getViewSize() const
Definition MyGUI_ScrollViewBase.cpp:329
MyGUI::ScrollViewBase::mHScroll
ScrollBar * mHScroll
Definition MyGUI_ScrollViewBase.h:44
MyGUI::ScrollViewBase::mVRange
size_t mVRange
Definition MyGUI_ScrollViewBase.h:50
MyGUI::ScrollViewBase::getHScrollPage
virtual size_t getHScrollPage() const
Definition MyGUI_ScrollViewBase.cpp:334
MyGUI::ScrollViewBase::updateScrollPosition
void updateScrollPosition()
Definition MyGUI_ScrollViewBase.cpp:234
MyGUI::ScrollViewBase::setContentPosition
virtual void setContentPosition(const IntPoint &_value)
Definition MyGUI_ScrollViewBase.cpp:325
MyGUI::ScrollViewBase::mHRange
size_t mHRange
Definition MyGUI_ScrollViewBase.h:51
MyGUI::ScrollViewBase::~ScrollViewBase
virtual ~ScrollViewBase()=default
MyGUI::ScrollViewBase::mScrollViewClient
Widget * mScrollViewClient
Definition MyGUI_ScrollViewBase.h:45
MyGUI::ScrollViewBase::mVisibleVScroll
bool mVisibleVScroll
Definition MyGUI_ScrollViewBase.h:48
MyGUI::ScrollViewBase::getContentPosition
virtual IntPoint getContentPosition() const
Definition MyGUI_ScrollViewBase.cpp:320
MyGUI::ScrollViewBase::mChangeContentByResize
bool mChangeContentByResize
Definition MyGUI_ScrollViewBase.h:54
MyGUI::ScrollViewBase::mVisibleHScroll
bool mVisibleHScroll
Definition MyGUI_ScrollViewBase.h:47
MyGUI::ScrollViewBase::getContentAlign
virtual Align getContentAlign() const
Definition MyGUI_ScrollViewBase.cpp:344
MyGUI::ScrollViewBase::getContentSize
virtual IntSize getContentSize() const
Definition MyGUI_ScrollViewBase.cpp:315
MyGUI::ScrollViewBase::updateScrollSize
void updateScrollSize()
Definition MyGUI_ScrollViewBase.cpp:14
MyGUI::ScrollViewBase::mVScroll
ScrollBar * mVScroll
Definition MyGUI_ScrollViewBase.h:43
MyGUI::ScrollViewBase::eraseContent
virtual void eraseContent()
Definition MyGUI_ScrollViewBase.cpp:349
MyGUI::ScrollViewBase::getVScrollPage
virtual size_t getVScrollPage() const
Definition MyGUI_ScrollViewBase.cpp:339
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntPoint
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::Align
Definition MyGUI_Align.h:20