#include <wx/appprogress.h>
A helper class that can be used to update the progress bar in the taskbar button on Windows and the dock icon on macOS.
Public Member Functions | |
wxAppProgressIndicator (wxWindow *parent=NULL, int maxValue=100) | |
Constructs the wxAppProgressIndicator. More... | |
virtual | ~wxAppProgressIndicator () |
Destructor, stops displaying progress and returns the indicator to its normal state. More... | |
bool | IsAvailable () const |
Check if the application progress display is available. More... | |
void | SetValue (int value) |
Set the progress value in taskbar button of parent window. More... | |
void | SetRange (int range) |
Set the progress range in taskbar button of parent window. More... | |
bool | Pulse () |
Makes the progress bar run in indeterminate mode. More... | |
wxAppProgressIndicator::wxAppProgressIndicator | ( | wxWindow * | parent = NULL , |
int | maxValue = 100 |
||
) |
Constructs the wxAppProgressIndicator.
parent | The parent window of wxAppProgressIndicator. Note that the window should has taskbar button showing. If parent is NULL, the progress will reflect on the taskbar buttons of all the top level windows. |
maxValue | Integer range (maximum value) of the progress indicator. |
|
virtual |
Destructor, stops displaying progress and returns the indicator to its normal state.
bool wxAppProgressIndicator::IsAvailable | ( | ) | const |
Check if the application progress display is available.
Currently this only returns true when using wxMSW and running under Windows 7 or later systems (which provide task bar button API) or when using wxOSX.
If this method returns false, no other methods of this class do anything, but they may still be called without any ill effects.
bool wxAppProgressIndicator::Pulse | ( | ) |
Makes the progress bar run in indeterminate mode.
void wxAppProgressIndicator::SetRange | ( | int | range | ) |
Set the progress range in taskbar button of parent window.
void wxAppProgressIndicator::SetValue | ( | int | value | ) |
Set the progress value in taskbar button of parent window.
value | The new value of the progress meter. It should be less than or equal to the range. |