MyGUI_ScrollView.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_H_
#define MYGUI_SCROLL_VIEW_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Widget.h"
#include "MyGUI_ScrollViewBase.h"
namespace MyGUI
{
class MYGUI_EXPORT ScrollView : public Widget, protected ScrollViewBase, public MemberObsolete<ScrollView>
{
MYGUI_RTTI_DERIVED(ScrollView)
public:
ScrollView();
void setPosition(const IntPoint& _point) override;
void setSize(const IntSize& _size) override;
void setCoord(const IntCoord& _coord) override;
using Widget::setPosition;
using Widget::setSize;
using Widget::setCoord;
void setVisibleVScroll(bool _value);
bool isVisibleVScroll() const;
void setVisibleHScroll(bool _value);
bool isVisibleHScroll() const;
void setCanvasAlign(Align _value);
Align getCanvasAlign() const;
void setCanvasSize(const IntSize& _value);
void setCanvasSize(int _width, int _height);
IntSize getCanvasSize() const;
IntCoord getViewCoord() const;
void setViewOffset(const IntPoint& _value);
IntPoint getViewOffset() const;
protected:
void initialiseOverride() override;
void shutdownOverride() override;
void notifyScrollChangePosition(ScrollBar* _sender, size_t _position);
void notifyMouseWheel(Widget* _sender, int _rel);
void updateView();
void setPropertyOverride(std::string_view _key, std::string_view _value) override;
ScrollBar* getVScroll() const;
private:
// размер данных
IntSize getContentSize() const override;
// смещение данных
IntPoint getContentPosition() const override;
// размер окна, через которые видно данные
IntSize getViewSize() const override;
void setContentPosition(const IntPoint& _point) override;
// размер на который прокручиваются данные при щелчке по скролу
size_t getVScrollPage() const override;
size_t getHScrollPage() const override;
Align getContentAlign() const override;
protected:
Align mContentAlign;
};
} // namespace MyGUI
#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