Audacity  3.0.3
Classes | Functions
ErrorDialog.h File Reference
#include <wx/defs.h>
#include <wx/msgdlg.h>
#include "wxPanelWrapper.h"
#include <wx/textdlg.h>
Include dependency graph for ErrorDialog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ErrorDialog
 Gives an Error message with an option for help. More...
 
class  AudacityTextEntryDialog
 Wrap wxTextEntryDialog so that caption IS translatable. More...
 

Functions

AUDACITY_DLL_API void ShowErrorDialog (wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, const wxString &helpPage, bool Close=true, const wxString &log={})
 Displays an error dialog with a button that offers help. More...
 
AUDACITY_DLL_API void ShowExceptionDialog (wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, const wxString &helpPage, bool Close=true, const wxString &log={})
 Displays an error dialog, possibly allowing to send error report. More...
 
void ShowModelessErrorDialog (wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, const wxString &helpPage, bool Close=true, const wxString &log={})
 Displays a modeless error dialog with a button that offers help. More...
 

Function Documentation

◆ ShowErrorDialog()

AUDACITY_DLL_API void ShowErrorDialog ( wxWindow *  parent,
const TranslatableString dlogTitle,
const TranslatableString message,
const wxString &  helpPage,
bool  Close = true,
const wxString &  log = {} 
)

Displays an error dialog with a button that offers help.

Definition at line 152 of file ErrorDialog.cpp.

158 {
159  ErrorDialog dlog(parent, dlogTitle, message, helpPage, log, Close);
160  dlog.CentreOnParent();
161  dlog.ShowModal();
162 }

Referenced by AudacityProject::AudacityProject(), MessageBoxException::DelayedHandlerAction(), ProjectFileManager::DoSave(), TempDirectory::FATFilesystemDenied(), ProjectFileManager::Import(), ExportPCM::ReportTooBigError(), ProjectFileManager::SaveCopy(), ShowDiskFullExportErrorDialog(), ShowExceptionDialog(), MenuManager::TellUserWhyDisallowed(), and TempDirectory::TempDir().

Here is the caller graph for this function:

◆ ShowExceptionDialog()

AUDACITY_DLL_API void ShowExceptionDialog ( wxWindow *  parent,
const TranslatableString dlogTitle,
const TranslatableString message,
const wxString &  helpPage,
bool  Close = true,
const wxString &  log = {} 
)

Displays an error dialog, possibly allowing to send error report.

Definition at line 165 of file ErrorDialog.cpp.

169 {
170 #ifndef HAS_SENTRY_REPORTING
171  ShowErrorDialog(parent, dlogTitle, message, helpPage, Close, log);
172 #else
173  ShowErrorReportDialog(parent, dlogTitle, message, helpPage, log);
174 #endif // !HAS_SENTRY_REPORTING
175 }

References ShowErrorDialog(), and ShowErrorReportDialog().

Referenced by MessageBoxException::DelayedHandlerAction(), ProjectAudioManager::DoRecord(), ProjectFileManager::DoSave(), UpdateManager::GetUpdates(), ProjectFileManager::OpenNewProject(), ProjectAudioManager::PlayPlayRegion(), Effect::Preview(), ProjectFileIO::ShowError(), ShowExportErrorDialog(), and AudioIO::StartMonitoring().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ShowModelessErrorDialog()

void ShowModelessErrorDialog ( wxWindow *  parent,
const TranslatableString dlogTitle,
const TranslatableString message,
const wxString &  helpPage,
bool  Close = true,
const wxString &  log = {} 
)

Displays a modeless error dialog with a button that offers help.

Definition at line 178 of file ErrorDialog.cpp.

184 {
185  // ensure it has some parent.
186  if( !parent )
187  parent = wxTheApp->GetTopWindow();
188  wxASSERT(parent);
189  ErrorDialog *dlog = safenew ErrorDialog(parent, dlogTitle, message, helpPage, log, Close, false);
190  dlog->CentreOnParent();
191  dlog->Show();
192  // ANSWER-ME: Vigilant Sentry flagged this method as not deleting dlog, so
193  // is this actually a mem leak.
194  // PRL: answer is that the parent window guarantees destruction of the dialog
195  // but in practice Destroy() in OnOK does that
196 }

References safenew.

ShowErrorReportDialog
void ShowErrorReportDialog(wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, const wxString &helpPage, const wxString &log)
Displays an error dialog that allows to send the error report.
Definition: ErrorReportDialog.cpp:212
ShowErrorDialog
void ShowErrorDialog(wxWindow *parent, const TranslatableString &dlogTitle, const TranslatableString &message, const wxString &helpPage, const bool Close, const wxString &log)
Displays an error dialog with a button that offers help.
Definition: ErrorDialog.cpp:152
ErrorDialog
Gives an Error message with an option for help.
Definition: ErrorDialog.h:25
safenew
#define safenew
Definition: MemoryX.h:10