MyGUI
3.2.1
|
00001 /* 00002 * This source file is part of MyGUI. For the latest info, see http://mygui.info/ 00003 * Distributed under the MIT License 00004 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT) 00005 */ 00006 00007 #ifndef __MYGUI_PROGRESS_BAR_H__ 00008 #define __MYGUI_PROGRESS_BAR_H__ 00009 00010 #include "MyGUI_Prerequest.h" 00011 #include "MyGUI_Align.h" 00012 #include "MyGUI_FlowDirection.h" 00013 #include "MyGUI_Widget.h" 00014 00015 namespace MyGUI 00016 { 00017 00021 class MYGUI_EXPORT ProgressBar : 00022 public Widget, 00023 public MemberObsolete<ProgressBar> 00024 { 00025 MYGUI_RTTI_DERIVED( ProgressBar ) 00026 00027 public: 00028 ProgressBar(); 00029 00031 void setProgressRange(size_t _value); 00033 size_t getProgressRange() const; 00034 00036 void setProgressPosition(size_t _value); 00038 size_t getProgressPosition() const; 00039 00041 void setProgressAutoTrack(bool _value); 00043 bool getProgressAutoTrack() const; 00044 00045 void setFlowDirection(FlowDirection _value); 00046 FlowDirection getFlowDirection() const; 00047 00049 virtual void setPosition(const IntPoint& _value); 00051 virtual void setSize(const IntSize& _value); 00053 virtual void setCoord(const IntCoord& _value); 00054 00056 void setPosition(int _left, int _top); 00058 void setSize(int _width, int _height); 00060 void setCoord(int _left, int _top, int _width, int _height); 00061 00062 protected: 00063 virtual void initialiseOverride(); 00064 virtual void shutdownOverride(); 00065 00066 virtual void setPropertyOverride(const std::string& _key, const std::string& _value); 00067 00068 private: 00069 void frameEntered(float _time); 00070 void updateTrack(); 00071 00072 int getClientWidth(); 00073 int getClientHeight(); 00074 00075 void setTrackPosition(Widget* _widget, int _left, int _top, int _width, int _height); 00076 00077 private: 00078 std::string mTrackSkin; 00079 int mTrackWidth; 00080 int mTrackStep; 00081 int mTrackMin; 00082 00083 VectorWidgetPtr mVectorTrack; 00084 size_t mRange; 00085 size_t mStartPosition, mEndPosition; 00086 float mAutoPosition; 00087 bool mAutoTrack; 00088 bool mFillTrack; 00089 00090 FlowDirection mFlowDirection; 00091 00092 Widget* mClient; 00093 }; 00094 00095 } // namespace MyGUI 00096 00097 #endif // __MYGUI_PROGRESS_BAR_H__