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 {
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_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition MyGUI_RTTI.h:69
widget description should be here.
widget description should be here.
std::vector< Widget * > VectorWidgetPtr