MyGUI: MyGUI_ProgressBar.h Source File

MyGUI 3.4.3

MyGUI_ProgressBar.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_PROGRESS_BAR_H_
8#define MYGUI_PROGRESS_BAR_H_
9
10#include "MyGUI_Prerequest.h"
11#include "MyGUI_Align.h"
12#include "MyGUI_FlowDirection.h"
13#include "MyGUI_Widget.h"
14
15namespace MyGUI
16{
17
21 class MYGUI_EXPORT ProgressBar : public Widget, public MemberObsolete<ProgressBar>
22 {
23 MYGUI_RTTI_DERIVED(ProgressBar)
24
25 public:
27 void setProgressRange(size_t _range);
29 size_t getProgressRange() const;
30
32 void setProgressPosition(size_t _pos);
34 size_t getProgressPosition() const;
35
37 void setProgressAutoTrack(bool _auto);
39 bool getProgressAutoTrack() const;
40
41 void setFlowDirection(FlowDirection _value);
42 FlowDirection getFlowDirection() const;
43
45 void setPosition(const IntPoint& _point) override;
47 void setSize(const IntSize& _size) override;
49 void setCoord(const IntCoord& _coord) override;
50
51 using Widget::setPosition;
52 using Widget::setSize;
53 using Widget::setCoord;
54
55 protected:
56 void initialiseOverride() override;
57 void shutdownOverride() override;
58
59 void setPropertyOverride(std::string_view _key, std::string_view _value) override;
60
61 private:
62 void frameEntered(float _time);
63 void updateTrack();
64
65 int getClientWidth() const;
66 int getClientHeight() const;
67
68 void setTrackPosition(Widget* _widget, int _left, int _top, int _width, int _height);
69
70 private:
71 std::string mTrackSkin;
72 int mTrackWidth{1};
73 int mTrackStep{0};
74 int mTrackMin{0};
75
76 VectorWidgetPtr mVectorTrack;
77 size_t mRange{0};
78 size_t mStartPosition{0}, mEndPosition{0};
79 float mAutoPosition{0.0f};
80 bool mAutoTrack{false};
81 bool mFillTrack{false};
82
83 FlowDirection mFlowDirection;
84
85 Widget* mTrackPlace{nullptr};
86 };
87
88} // namespace MyGUI
89
90#endif // MYGUI_PROGRESS_BAR_H_
MyGUI_Align.h
MyGUI_FlowDirection.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_Widget.h
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::ProgressBar
widget description should be here.
Definition MyGUI_ProgressBar.h:22
MyGUI::ProgressBar::shutdownOverride
void shutdownOverride() override
Definition MyGUI_ProgressBar.cpp:63
MyGUI::ProgressBar::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_ProgressBar.cpp:141
MyGUI::ProgressBar::getProgressRange
size_t getProgressRange() const
Definition MyGUI_ProgressBar.cpp:349
MyGUI::ProgressBar::getFlowDirection
FlowDirection getFlowDirection() const
Definition MyGUI_ProgressBar.cpp:364
MyGUI::ProgressBar::setFlowDirection
void setFlowDirection(FlowDirection _value)
Definition MyGUI_ProgressBar.cpp:316
MyGUI::ProgressBar::setCoord
void setCoord(const IntCoord &_coord) override
Definition MyGUI_ProgressBar.cpp:148
MyGUI::ProgressBar::setProgressRange
void setProgressRange(size_t _range)
Definition MyGUI_ProgressBar.cpp:70
MyGUI::ProgressBar::initialiseOverride
void initialiseOverride() override
Definition MyGUI_ProgressBar.cpp:21
MyGUI::ProgressBar::getProgressAutoTrack
bool getProgressAutoTrack() const
Definition MyGUI_ProgressBar.cpp:359
MyGUI::ProgressBar::setPropertyOverride
void setPropertyOverride(std::string_view _key, std::string_view _value) override
Definition MyGUI_ProgressBar.cpp:322
MyGUI::ProgressBar::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_ProgressBar.cpp:136
MyGUI::ProgressBar::setProgressPosition
void setProgressPosition(size_t _pos)
Definition MyGUI_ProgressBar.cpp:82
MyGUI::ProgressBar::setProgressAutoTrack
void setProgressAutoTrack(bool _auto)
Definition MyGUI_ProgressBar.cpp:92
MyGUI::ProgressBar::getProgressPosition
size_t getProgressPosition() const
Definition MyGUI_ProgressBar.cpp:354
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::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition MyGUI_WidgetDefines.h:20
MyGUI::FlowDirection
Definition MyGUI_FlowDirection.h:19