14#ifdef HAS_SENTRY_REPORTING
21#include <wx/progdlg.h>
22#include <wx/windowptr.h>
30 wxTheApp->CallAfter(action);
48 switch (options.
type) {
49 case ErrorDialogType::ModalErrorReport: {
50#ifdef HAS_SENTRY_REPORTING
54 dlog.CentreOnParent();
61 case ErrorDialogType::ModelessError: {
63 parent = wxTheApp->GetTopWindow();
75 dlogTitle, message, helpPage, options.
log,
77 pDlog->CentreOnParent();
95 style = wxICON_WARNING;
100 case Icon::Question :
101 style = wxICON_QUESTION;
103 case Icon::Information :
104 style = wxICON_INFORMATION;
120 style |= wxNO_DEFAULT;
129 style = wxOK | wxCENTRE;
142 return MessageBoxResult::Yes;
144 return MessageBoxResult::No;
146 return MessageBoxResult::Ok;
148 return MessageBoxResult::Cancel;
153 return MessageBoxResult::None;
159 using ::ProgressDialog::ProgressDialog;
162 unsigned long long numerator,
163 unsigned long long denominator,
166 return Update(numerator, denominator, message);
175std::unique_ptr<BasicUI::ProgressDialog>
181 unsigned options = 0;
194 return std::make_unique<MyProgressDialog>(
195 title, message, options, remainingLabelText);
202 wxWindow *parent =
nullptr)
203 : wxGenericProgressDialog{
204 title.Translation(), message.Translation(),
207 wxPD_APP_MODAL | wxPD_ELAPSED_TIME | wxPD_SMOOTH
211 void Pulse()
override { wxGenericProgressDialog::Pulse(); }
215std::unique_ptr<GenericProgressDialog>
221 return std::make_unique<MyGenericProgress>(
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
std::unique_ptr< T, Destroyer< T > > Destroy_ptr
a convenience for using Destroyer
int ShowMultiDialog(const TranslatableString &message, const TranslatableString &title, const TranslatableStrings &buttons, const ManualPageID &helpPage, const TranslatableString &boxMsg, bool log)
std::vector< TranslatableString > TranslatableStrings
Abstraction of a progress dialog with undefined time-to-completion estimate.
Abstraction of a progress dialog with well defined time-to-completion estimate.
Subclasses may hold information such as a parent window pointer for a dialog.
Gives an Error message with an option for help.
A dialog, that has "Send", "Don't send" and help buttons.
void SetMessage(const TranslatableString &message)
Holds a msgid for the translation catalog; may also bind format arguments.
@ ProgressConfirmStopOrCancel
std::function< void()> Action
Options for variations of error dialogs; the default is for modal dialogs.
ErrorDialogType type
Type of help dialog.
std::wstring log
Optional extra logging information to be shown.
bool modalHelp
Whether the secondary help dialog with more information should be modal.
TranslatableString caption
bool yesOrOkDefaultButton