14#ifdef HAS_SENTRY_REPORTING
21#include <wx/progdlg.h>
22#include <wx/windowptr.h>
31 wxTheApp->CallAfter(action);
49 switch (options.
type) {
50 case ErrorDialogType::ModalErrorReport: {
51#ifdef HAS_SENTRY_REPORTING
55 dlog.CentreOnParent();
62 case ErrorDialogType::ModelessError: {
64 parent = wxTheApp->GetTopWindow();
76 dlogTitle, message, helpPage, options.
log,
78 pDlog->CentreOnParent();
96 style = wxICON_WARNING;
101 case Icon::Question :
102 style = wxICON_QUESTION;
104 case Icon::Information :
105 style = wxICON_INFORMATION;
121 style |= wxNO_DEFAULT;
130 style = wxOK | wxCENTRE;
143 return MessageBoxResult::Yes;
145 return MessageBoxResult::No;
147 return MessageBoxResult::Ok;
149 return MessageBoxResult::Cancel;
154 return MessageBoxResult::None;
158std::unique_ptr<BasicUI::ProgressDialog>
164 unsigned options = 0;
177 return std::make_unique<::ProgressDialog>(
178 title, message, options, remainingLabelText);
185 wxWindow *parent =
nullptr,
187 : wxGenericProgressDialog{
188 title.Translation(), message.Translation(),
197 if (wxGenericProgressDialog::Pulse())
199 else if (WasCancelled())
207std::unique_ptr<GenericProgressDialog>
217 flags |= wxPD_CAN_ABORT;
219 flags |= wxPD_APP_MODAL;
221 flags |= wxPD_ELAPSED_TIME;
223 flags |= wxPD_SMOOTH;
225 return std::make_unique<MyGenericProgress>(
240 return wxLaunchDefaultBrowser(url);
256 return wxLayout_RightToLeft == wxTheApp->GetLayoutDirection();
261 return wxIsMainThread();
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
std::vector< TranslatableString > TranslatableStrings
Abstraction of a progress dialog with undefined 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.
Holds a msgid for the translation catalog; may also bind format arguments.
@ ProgressConfirmStopOrCancel
int ShowMultiDialog(const TranslatableString &message, const TranslatableString &title, const TranslatableStrings &buttons, const ManualPageID &helpPage, const TranslatableString &boxMsg, bool log)
Display a dialog with radio buttons.
std::function< void()> Action
@ ProgressShowElapsedTime
std::unique_ptr< WindowPlacement > FindFocus()
Find the window that is accepting keyboard input, if any.
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