MyGUI 3.2.0

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_ProgressBar.h
Go to the documentation of this file.
1
6 /*
7 This file is part of MyGUI.
8
9 MyGUI is free software: you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 MyGUI is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_PROGRESS_BAR_H__
23 #define __MYGUI_PROGRESS_BAR_H__
24
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Align.h"
27 #include "MyGUI_FlowDirection.h"
28 #include "MyGUI_Widget.h"
29
30 namespace MyGUI
31 {
32
33 class MYGUI_EXPORT ProgressBar :
34 public Widget,
35 public MemberObsolete<ProgressBar>
36 {
37 MYGUI_RTTI_DERIVED( ProgressBar )
38
39 public:
40 ProgressBar();
41
43 void setProgressRange(size_t _value);
45 size_t getProgressRange() const;
46
48 void setProgressPosition(size_t _value);
50 size_t getProgressPosition() const;
51
53 void setProgressAutoTrack(bool _value);
55 bool getProgressAutoTrack() const;
56
57 void setFlowDirection(FlowDirection _value);
58 FlowDirection getFlowDirection() const;
59
61 virtual void setPosition(const IntPoint& _value);
63 virtual void setSize(const IntSize& _value);
65 virtual void setCoord(const IntCoord& _value);
66
68 void setPosition(int _left, int _top);
70 void setSize(int _width, int _height);
72 void setCoord(int _left, int _top, int _width, int _height);
73
74 protected:
75 virtual void initialiseOverride();
76 virtual void shutdownOverride();
77
78 virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
79
80 private:
81 void frameEntered(float _time);
82 void updateTrack();
83
84 int getClientWidth();
85 int getClientHeight();
86
87 void setTrackPosition(Widget* _widget, int _left, int _top, int _width, int _height);
88
89 private:
90 std::string mTrackSkin;
91 int mTrackWidth;
92 int mTrackStep;
93 int mTrackMin;
94
95 VectorWidgetPtr mVectorTrack;
96 size_t mRange;
97 size_t mStartPosition, mEndPosition;
98 float mAutoPosition;
99 bool mAutoTrack;
100 bool mFillTrack;
101
102 FlowDirection mFlowDirection;
103
104 Widget* mClient;
105 };
106
107 } // namespace MyGUI
108
109 #endif // __MYGUI_PROGRESS_BAR_H__
MyGUI::types::TCoord< int >
MyGUI::Widget
Definition: MyGUI_Widget.h:41
MyGUI::types::TPoint< int >
MyGUI_Prerequest.h
MyGUI::types::TSize< int >
MyGUI_FlowDirection.h
MyGUI::FlowDirection
Definition: MyGUI_FlowDirection.h:31
MYGUI_RTTI_DERIVED
#define MYGUI_RTTI_DERIVED(DerivedType)
Definition: MyGUI_RTTI.h:88
MYGUI_EXPORT
#define MYGUI_EXPORT
Definition: MyGUI_Platform.h:120
MyGUI::ProgressBar
Definition: MyGUI_ProgressBar.h:33
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition: MyGUI_WidgetDefines.h:33
MyGUI_Align.h
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition: MyGUI_DeprecatedTypes.h:28