MyGUI 3.4.1
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
22 public Widget,
23 public MemberObsolete<ProgressBar>
24 {
26
27 public:
29
31 void setProgressRange(size_t _value);
33 size_t getProgressRange() const;
34
36 void setProgressPosition(size_t _value);
38 size_t getProgressPosition() const;
39
41 void setProgressAutoTrack(bool _value);
43 bool getProgressAutoTrack() const;
44
45 void setFlowDirection(FlowDirection _value);
46 FlowDirection getFlowDirection() const;
47
49 void setPosition(const IntPoint& _value) override;
51 void setSize(const IntSize& _value) override;
53 void setCoord(const IntCoord& _value) override;
54
56 using Widget::setSize;
57 using Widget::setCoord;
58
59 protected:
60 void initialiseOverride() override;
61 void shutdownOverride() override;
62
63 void setPropertyOverride(const std::string& _key, const std::string& _value) override;
64
65 private:
66 void frameEntered(float _time);
67 void updateTrack();
68
69 int getClientWidth() const;
70 int getClientHeight() const;
71
72 void setTrackPosition(Widget* _widget, int _left, int _top, int _width, int _height);
73
74 private:
75 std::string mTrackSkin;
76 int mTrackWidth;
77 int mTrackStep;
78 int mTrackMin;
79
80 VectorWidgetPtr mVectorTrack;
81 size_t mRange;
82 size_t mStartPosition, mEndPosition;
83 float mAutoPosition;
84 bool mAutoTrack;
85 bool mFillTrack;
86
87 FlowDirection mFlowDirection;
88
89 Widget* mTrackPlace;
90 };
91
92} // namespace MyGUI
93
94#endif // MYGUI_PROGRESS_BAR_H_
#define MYGUI_EXPORT
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:48
widget description should be here.
widget description should be here.
Definition: MyGUI_Widget.h:37
void setCoord(const IntCoord &_value) override
void setPosition(const IntPoint &_value) override
void setSize(const IntSize &_value) override
std::vector< Widget * > VectorWidgetPtr