MyGUI_ProgressBar.h
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#ifndef MYGUI_PROGRESS_BAR_H_
#define MYGUI_PROGRESS_BAR_H_
#include "MyGUI_Prerequest.h"
#include "MyGUI_Align.h"
#include "MyGUI_FlowDirection.h"
#include "MyGUI_Widget.h"
namespace MyGUI
{
class MYGUI_EXPORT ProgressBar : public Widget, public MemberObsolete<ProgressBar>
{
MYGUI_RTTI_DERIVED(ProgressBar)
public:
void setProgressRange(size_t _range);
size_t getProgressRange() const;
void setProgressPosition(size_t _pos);
size_t getProgressPosition() const;
void setProgressAutoTrack(bool _auto);
bool getProgressAutoTrack() const;
void setFlowDirection(FlowDirection _value);
FlowDirection getFlowDirection() const;
void setPosition(const IntPoint& _point) override;
void setSize(const IntSize& _size) override;
void setCoord(const IntCoord& _coord) override;
using Widget::setPosition;
using Widget::setSize;
using Widget::setCoord;
protected:
void initialiseOverride() override;
void shutdownOverride() override;
void setPropertyOverride(std::string_view _key, std::string_view _value) override;
private:
void frameEntered(float _time);
void updateTrack();
int getClientWidth() const;
int getClientHeight() const;
void setTrackPosition(Widget* _widget, int _left, int _top, int _width, int _height);
private:
std::string mTrackSkin;
int mTrackWidth{1};
int mTrackStep{0};
int mTrackMin{0};
VectorWidgetPtr mVectorTrack;
size_t mRange{0};
size_t mStartPosition{0}, mEndPosition{0};
float mAutoPosition{0.0f};
bool mAutoTrack{false};
bool mFillTrack{false};
FlowDirection mFlowDirection;
Widget* mTrackPlace{nullptr};
};
} // namespace MyGUI
#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:69
MyGUI_Widget.h
MyGUI::MemberObsolete
Definition MyGUI_DeprecatedTypes.h:14
MyGUI::ProgressBar
widget description should be here.
Definition MyGUI_ProgressBar.h:22
MyGUI::ProgressBar::shutdownOverride
void shutdownOverride() override
Definition MyGUI_ProgressBar.cpp:63
MyGUI::ProgressBar::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_ProgressBar.cpp:141
MyGUI::ProgressBar::getProgressRange
size_t getProgressRange() const
Definition MyGUI_ProgressBar.cpp:349
MyGUI::ProgressBar::getFlowDirection
FlowDirection getFlowDirection() const
Definition MyGUI_ProgressBar.cpp:364
MyGUI::ProgressBar::setFlowDirection
void setFlowDirection(FlowDirection _value)
Definition MyGUI_ProgressBar.cpp:316
MyGUI::ProgressBar::setCoord
void setCoord(const IntCoord &_coord) override
Definition MyGUI_ProgressBar.cpp:148
MyGUI::ProgressBar::setProgressRange
void setProgressRange(size_t _range)
Definition MyGUI_ProgressBar.cpp:70
MyGUI::ProgressBar::initialiseOverride
void initialiseOverride() override
Definition MyGUI_ProgressBar.cpp:21
MyGUI::ProgressBar::getProgressAutoTrack
bool getProgressAutoTrack() const
Definition MyGUI_ProgressBar.cpp:359
MyGUI::ProgressBar::setPropertyOverride
void setPropertyOverride(std::string_view _key, std::string_view _value) override
Definition MyGUI_ProgressBar.cpp:322
MyGUI::ProgressBar::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_ProgressBar.cpp:136
MyGUI::ProgressBar::setProgressPosition
void setProgressPosition(size_t _pos)
Definition MyGUI_ProgressBar.cpp:82
MyGUI::ProgressBar::setProgressAutoTrack
void setProgressAutoTrack(bool _auto)
Definition MyGUI_ProgressBar.cpp:92
MyGUI::ProgressBar::getProgressPosition
size_t getProgressPosition() const
Definition MyGUI_ProgressBar.cpp:354
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI::Widget::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_Widget.cpp:693
MyGUI::Widget::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_Widget.cpp:676
MyGUI::Widget::setCoord
void setCoord(const IntCoord &_coord) override
Definition MyGUI_Widget.cpp:730
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntPoint
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
MyGUI::IntCoord
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition MyGUI_WidgetDefines.h:20
MyGUI::FlowDirection
Definition MyGUI_FlowDirection.h:19