ProgressBar class reference
Interactive widget, based on CustomWidget. Displays the progress bar.
Functions
Functions documentation
ProgressBar
(
Window
* window,
Widget2DProps
props,
ProgressBarTheme
theme, std::wstring defText, float maxValue);
Default constructor (to refactor).
ProgressBar
(
Window
* window,
Widget2DProps
props,
Theme
theme, std::wstring defText, float maxValue);
Delegating constructor with theme application.
ProgressBar
(const
ProgressBar
& copy);
Copy constructor.
ProgressBar
& operator=(
ProgressBar
rhs);
Assignment operator.
friend void swap(
ProgressBar
& first,
ProgressBar
& second) noexcept;
Swap function.
ProgressBar
* Clone() const override;
Clone funciton.
void SetToObserve(float* toObserve);
Sets the variable that is listened to and upon which the progress bar is updated.
void SetValue(float newValue);
Sets a new value for the observed variable.
void Update();
Updates the widget.
void SetCallback(Callback cbFunc);
Sets a callback that is executed every time an event is processed (inside ProgressBar object).
void ResetCallback();
Resets the callback to nullptr.
void ChangeFillColor(
Color
newColor);
Changes the fill color of the progress bar.
void EnableWidget() override;
Override adds an additional binding - to OnTick event.
bool OnWindowTick(
Event
* ev);
Handles 'AutoUpdate' flag (calls Update() every tick).
Variables documentation
Callback m_Callback;
Stores handle to callback function.
std::wstring m_wsBaseText;
Defines the text displayed on the progress bar.
float* m_fObservedValue;
Pointer on the observed variable.
float m_fMaxValue;
A variable that specifies the upper limit of the observed variable.