MyGUI: MyGUI_ProgressBar.h Source File

MyGUI 3.4.2

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

- File List
- Globals

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 :
22 public Widget,
23 public MemberObsolete<ProgressBar>
24 {
25 MYGUI_RTTI_DERIVED( ProgressBar )
26
27 public:
28 ProgressBar();
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
55 using Widget::setPosition;
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_
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:48
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::ProgressBar
widget description should be here.
Definition MyGUI_ProgressBar.h:24
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:37
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition MyGUI_WidgetDefines.h:20
MyGUI::FlowDirection
Definition MyGUI_FlowDirection.h:19
MyGUI::types::TCoord< int >
MyGUI::types::TPoint< int >
MyGUI::types::TSize< int >