Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site

SourceForge.net Logo



class Progress : public WithProgressLayout<TopWindow> 

Progress is simple helper dialog that can be used to show a progress of long operation and to cancel it.




Constructor Detail



Default constructor.



Progress(Ctrl *_owner)

Progress(const char *txt, int total = 0)

Progress(Ctrl *_owner, const char *txt, int total = 0)

Convenience constructor variants can set owner, text and total number of steps.



Public Member List


void SetOwner(Ctrl *_owner)

Sets the owner window of progress. _owner can be child of owner window too. Note that if owner is not specified, current active window is used as owner.



void Create()

Forces dialog to appear on the screen.



void Cancel()

Closes the dialog and sets it to canceled mode.



void Set(int pos, int total)

Sets the current progress position and total.



void SetPos(int pos)

Sets the current progress position.



void SetText(const char *s)

void SetText(const String& s)

Sets the text to be displayed in dialog.



void SetTotal(int total)

Sets the total number of progress steps.



void Step(int steps = 1)

Advances progress by steps. If total number of steps is zero, "running bar" is displayed.



int GetPos() const

Returns the current number of progress steps.



int GetTotal() const

Returns the total number of steps (as set by Set or SetTotal).



String GetText() const

Returns the text of Progress.



bool Canceled()

Shows a Cancel button if not shown yet. If this button is pressed, sets dialog to canceled mode. Returns true if dialog was canceled.



bool SetCanceled(int pos, int total)

Same as Set(pos, total), Canceled().



bool SetPosCanceled(int pos)

Same as SetPos(pos), Canceled().



bool StepCanceled(int steps = 1)

Same as Set(steps), Canceled().



void Reset()

Resets dialog to default settings.



void Granularity(int ms)

Sets how much often should dialog refresh. Default is 50ms.



void AlignText(int align)

Sets text alignment. Allowed values are ALIGN_LEFT, ALIGN_CENTER and ALIGN_RIGHT.



operator Gate2<int, int>()

Returns a callback to dialog's SetCanceled method.



void Delay(int ms)

Sets the delay before the dialog is shown for the first time (in order not to show it when operation proceeds fast). Default is 250ms.



Last edit by cxl on 12/02/2017. Do you want to contribute?. T++