namespace uprogress
Overview
namespace uprogress { // global functions UTILS_API void Reset(bool percentage_enabled = true); UTILS_API bool IsEnabled(); UTILS_API void Set(float percentage_value); UTILS_API float Get(); UTILS_API void Add(float percentage_increment); UTILS_API void Subscribe(std::function<void()> subscriber, const std::string& id = "default"); UTILS_API void UnSubscribe(const std::string& id); UTILS_API void UnSubscribeAll(); } // namespace uprogress
Detailed Documentation
Global Functions
UTILS_API void Reset(bool percentage_enabled = true)
Reset percentage value and enable/disable it.
UTILS_API bool IsEnabled()
Check whether percentage is enabled at this time.
UTILS_API void Set(float percentage_value)
Set amount of percentage to defined value. Clamped to range <0,1>.
UTILS_API float Get()
Returns current percentage value of progress.
UTILS_API void Add(float percentage_increment)
Increment progress value by an amount of percentage. Clamped to range <0,1>.
UTILS_API void Subscribe(std::function<void()> subscriber, const std::string& id = "default")
Subscribes a function that will be called whenever a percentage has changed. For later unsubscription, you can set an id.
UTILS_API void UnSubscribe(const std::string& id)
Unsubscribe all functions with the input id.
UTILS_API void UnSubscribeAll()
Unsubscribe all functions.