29 int aNumPhases,
int aCanAbort,
30 bool aReserveSpaceForMessage ) :
33 ( aReserveSpaceForMessage ? wxString(
' ', 80 ) : wxString( wxT(
"" ) ) ),
40 aCanAbort | wxPD_ELAPSED_TIME ),
68 if( cur < 0 || cur > 1000 )
77 std::lock_guard<std::mutex> guard(
m_mutex );
88 int newWidth = GetTextExtent( message ).x;
98 wxWindowDisabler ed(
this );
101 bool diag = WX_PROGRESS_REPORTER_BASE::Update( cur, message );
113 wxGauge( aParent, wxID_ANY, 1000, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL,
114 wxDefaultValidator, wxGaugeNameStr )
123 if( cur < 0 || cur > 1000 )
126 wxGauge::SetValue( cur );
GAUGE_PROGRESS_REPORTER(wxWindow *aParent, int aNumPhases)
std::atomic_bool m_messageChanged
PROGRESS_REPORTER_BASE(int aNumPhases)
std::atomic_int m_numPhases
int CurrentProgress() const
std::atomic_bool m_cancelled
std::atomic_int m_progress
std::atomic_int m_maxProgress
std::atomic_bool m_lastUpdateResult
wxAppProgressIndicator m_appProgressIndicator
WX_PROGRESS_REPORTER(wxWindow *aParent, const wxString &aTitle, int aNumPhases, int aCanAbort, bool aReserveSpaceForMessage=true)
The PROGRESS_REPORTER will stay on top of aParent.
static bool shouldRefresh(int aProgress, int aMaxProgress, int aPhase, int aNumPhases, THROTTLE &aThrottle)
THROTTLE m_updateThrottle
void DrainPendingEvents(long aCategories=wxEVT_CATEGORY_TIMER)
Drain pending events of the given categories from the active event loop.
#define WX_PROGRESS_REPORTER_BASE