23#ifndef WX_PROGRESS_REPORTERS_H
24#define WX_PROGRESS_REPORTERS_H
26#include <wx/progdlg.h>
28#include <wx/appprogress.h>
34#define PR_CAN_ABORT wxPD_CAN_ABORT
37#if defined( _WIN32 ) && wxCHECK_VERSION( 3, 3, 0 )
39#define WX_PROGRESS_REPORTER_BASE wxGenericProgressDialog
41#define WX_PROGRESS_REPORTER_BASE wxProgressDialog
69 bool aReserveSpaceForMessage =
true );
75 void SetTitle(
const wxString& aTitle )
override
77 WX_PROGRESS_REPORTER_BASE::SetTitle( aTitle );
81 static bool shouldRefresh(
int aProgress,
int aMaxProgress,
int aPhase,
int aNumPhases,
84 bool finalTick = aMaxProgress > 0 && aProgress >= aMaxProgress && aPhase + 1 >= aNumPhases;
86 return finalTick || aThrottle.
Ready();
GAUGE_PROGRESS_REPORTER(wxWindow *aParent, int aNumPhases)
PROGRESS_REPORTER_BASE(int aNumPhases)
Rate-limiter that fires at most once per interval.
std::atomic_bool m_lastUpdateResult
void SetTitle(const wxString &aTitle) override
Change the title displayed on the window caption.
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
#define WX_PROGRESS_REPORTER_BASE