MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::ProgressBar Namespace Reference

Utilities to show application progress bar for long operations. More...

Typedefs

using TaskWithMainThreadPostProcessing = std::function< std::function<void()>() >
 function that returns post-processing function to be called in main UI thread

Functions

void setup ()
 this function should be called only once for each frame (it is called in MR::Menu (MR::RibbonMenu))
void onFrameEnd ()
 call this function on frame end
void order (const char *name, const std::function< void()> &task, int taskCount=1)
void orderWithMainThreadPostProcessing (const char *name, TaskWithMainThreadPostProcessing task, int taskCount=1)
void orderWithManualFinish (const char *name, std::function< void()> task, int taskCount=1)
bool isCanceled ()
bool isFinished ()
float getProgress ()
float getLastOperationTime ()
 returns time of last operation in seconds, returns -1.0f if no operation was performed
const std::string & getLastOperationTitle ()
 returns title of the last operation
void nextTask ()
void nextTask (const char *s)
void setTaskCount (int n)
void forceSetTaskName (std::string taskName)
 set the current task's name without auto-updating progress value
void resetTaskName ()
void finish ()
bool isOrdered ()
 returns true if progress bar was ordered and not finished
bool setProgress (float p)
bool callBackSetProgress (float p)
bool simpleCallBackSetProgress (float p)
void printTimingTree (double minTimeSec=0.1)

Detailed Description

Utilities to show application progress bar for long operations.