18#ifndef __AUDACITY_WIDGETS_PROGRESSDIALOG__
19#define __AUDACITY_WIDGETS_PROGRESSDIALOG__
25#include <wx/evtloop.h>
91 const MessageTable & columns,
105 unsigned long long numerator,
unsigned long long denominator,
120 wxLongLong_t mElapsedTime {};
129 bool m_bShowElapsedTime =
true;
130 bool m_bConfirmAction =
false;
134 bool SearchForWindow(
const wxWindowList & list,
const wxWindow *searchfor)
const;
135 void OnCancel(wxCommandEvent & e);
136 void OnStop(wxCommandEvent & e);
144 void AddMessageAsColumn(wxBoxSizer * pSizer,
153 wxStaticText *mMessage{} ;
157 std::chrono::nanoseconds mTotalPollTime {};
158 unsigned mPollsCount { 0 };
159 std::chrono::nanoseconds mTotalYieldTime {};
160 unsigned mYieldsCount { 0 };
162 DECLARE_EVENT_TABLE()
Toolkit-neutral facade for basic user interface services.
Abstraction of a progress dialog with well defined time-to-completion estimate.
virtual ProgressResult Poll(unsigned long long numerator, unsigned long long denominator, const TranslatableString &message={})=0
Update the bar and poll for clicks. Call only on the main thread.
virtual ~ProgressDialog()
virtual void SetMessage(const TranslatableString &message)=0
Change an existing dialog's message.
virtual void SetDialogTitle(const TranslatableString &title)=0
Change the dialog's title.
virtual void Reinit()=0
Reset the dialog state.
std::unique_ptr< wxWindowDisabler > mDisable
wxStaticText * mRemaining
std::vector< MessageColumn > MessageTable
std::vector< TranslatableString > MessageColumn
wxEventLoopGuarantor mLoop
ProgressResult Update(int value, const TranslatableString &message={})
Holds a msgid for the translation catalog; may also bind format arguments.
bool Create(wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
void OnCloseWindow(wxCloseEvent &e)