MyGUI_ScrollViewBase.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_SCROLL_VIEW_BASE_H_
#define MYGUI_SCROLL_VIEW_BASE_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Types.h"
namespace MyGUI
{
class MYGUI_EXPORT ScrollViewBase
{
protected:
virtual ~ScrollViewBase() = default;
void updateScrollSize();
void updateScrollPosition();
// размер данных
virtual IntSize getContentSize() const;
// смещение данных
virtual IntPoint getContentPosition() const;
virtual void setContentPosition(const IntPoint& _value);
// размер окна, через которые видно данные
virtual IntSize getViewSize() const;
// размер на который прокручиваются данные при щелчке по скролу
virtual size_t getHScrollPage() const;
virtual size_t getVScrollPage() const;
virtual Align getContentAlign() const;
virtual void eraseContent();
protected:
ScrollBar* mVScroll{nullptr};
ScrollBar* mHScroll{nullptr};
Widget* mScrollViewClient{nullptr};
bool mVisibleHScroll{true};
bool mVisibleVScroll{true};
size_t mVRange{0};
size_t mHRange{0};
// изменяется ли содержимое при ресайзе
bool mChangeContentByResize{false};
};
} // namespace MyGUI
#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