27 #include <wx/evtloop.h> 33 int aNumPhases,
bool aCanAbort,
34 bool aReserveSpaceForMessage ) :
36 wxProgressDialog( aTitle, ( aReserveSpaceForMessage ? wxT(
" " ) : wxEmptyString ), 1, aParent,
42 ( aCanAbort ? wxPD_CAN_ABORT : 0 ) |
44 #if wxCHECK_VERSION( 3, 1, 0 )
46 m_appProgressIndicator( aParent )
49 #if wxCHECK_VERSION( 3, 1, 0 ) 53 m_appProgressIndicator.Pulse();
67 if( cur < 0 || cur > 1000 )
70 bool msgChanged =
false;
74 std::lock_guard<std::mutex> guard(
m_mutex );
81 bool diag = wxProgressDialog::Update( cur, message );
92 wxGauge( aParent, wxID_ANY, 1000, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL,
93 wxDefaultValidator, wxGaugeNameStr )
102 if( cur < 0 || cur > 1000 )
105 wxGauge::SetValue( cur );
106 wxEventLoopBase::GetActive()->YieldFor( wxEVT_CATEGORY_UI );
WX_PROGRESS_REPORTER(wxWindow *aParent, const wxString &aTitle, int aNumPhases, bool aCanAbort=true, bool aReserveSpaceForMessage=true)
The PROGRESS_REPORTER will stay on top of aParent.
int currentProgress() const
GAUGE_PROGRESS_REPORTER(wxWindow *aParent, int aNumPhases)
This implements all the tricky bits for thread safety, but the GUI is left to derived classes.