2010-01-23 19:44:49 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
|
|
|
|
ErrorDialog.h
|
|
|
|
|
|
|
|
Jimmy Johnson
|
2010-02-13 18:24:57 +00:00
|
|
|
James Crook
|
2010-01-23 19:44:49 +00:00
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef __AUDACITY_ERRORDIALOG__
|
|
|
|
#define __AUDACITY_ERRORDIALOG__
|
|
|
|
|
|
|
|
#include "../Audacity.h"
|
2018-11-11 02:40:37 +00:00
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
#include <wx/defs.h>
|
2018-11-14 16:48:46 +00:00
|
|
|
#include <wx/msgdlg.h> // to inherit
|
2019-03-30 19:06:57 +00:00
|
|
|
#include "wxPanelWrapper.h" // to inherit
|
2010-01-23 19:44:49 +00:00
|
|
|
|
2011-04-02 13:03:02 +00:00
|
|
|
class AudacityProject;
|
|
|
|
|
2016-07-10 21:10:50 +00:00
|
|
|
class ErrorDialog /* not final */ : public wxDialogWrapper
|
2014-06-06 21:34:36 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// constructors and destructors
|
|
|
|
ErrorDialog(wxWindow *parent,
|
|
|
|
const wxString & dlogTitle,
|
|
|
|
const wxString & message,
|
2017-08-25 12:54:37 +00:00
|
|
|
const wxString & helpPage,
|
2014-06-06 21:34:36 +00:00
|
|
|
const bool Close = true, const bool modal = true);
|
|
|
|
|
|
|
|
virtual ~ErrorDialog(){}
|
|
|
|
|
|
|
|
private:
|
2017-08-25 12:54:37 +00:00
|
|
|
wxString dhelpPage;
|
2014-06-06 21:34:36 +00:00
|
|
|
bool dClose;
|
|
|
|
bool dModal;
|
|
|
|
|
|
|
|
void OnOk( wxCommandEvent &event );
|
|
|
|
void OnHelp( wxCommandEvent &event );
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
/// Displays an error dialog with a button that offers help
|
|
|
|
void ShowErrorDialog(wxWindow *parent,
|
|
|
|
const wxString &dlogTitle,
|
2014-06-03 20:30:19 +00:00
|
|
|
const wxString &message,
|
2017-08-25 12:54:37 +00:00
|
|
|
const wxString &helpPage,
|
2010-12-11 22:32:07 +00:00
|
|
|
bool Close = true);
|
2010-02-13 18:24:57 +00:00
|
|
|
|
2011-03-01 01:29:03 +00:00
|
|
|
/// Displays a modeless error dialog with a button that offers help
|
|
|
|
void ShowModelessErrorDialog(wxWindow *parent,
|
|
|
|
const wxString &dlogTitle,
|
2014-06-03 20:30:19 +00:00
|
|
|
const wxString &message,
|
2017-08-25 12:54:37 +00:00
|
|
|
const wxString &helpPage,
|
2011-03-01 01:29:03 +00:00
|
|
|
bool Close = true);
|
|
|
|
|
2011-03-23 01:01:17 +00:00
|
|
|
/// Displays a custom modeless error dialog for aliased file errors
|
2011-04-02 13:03:02 +00:00
|
|
|
void ShowAliasMissingDialog(AudacityProject *parent,
|
2011-03-23 01:01:17 +00:00
|
|
|
const wxString &dlogTitle,
|
2014-06-03 20:30:19 +00:00
|
|
|
const wxString &message,
|
2017-08-25 12:54:37 +00:00
|
|
|
const wxString &helpPage,
|
2011-03-23 01:01:17 +00:00
|
|
|
const bool Close = true);
|
|
|
|
|
2017-09-06 21:39:33 +00:00
|
|
|
extern wxString AudacityMessageBoxCaptionStr();
|
|
|
|
|
|
|
|
// Do not use wxMessageBox!! Its default window title does not translate!
|
|
|
|
inline int AudacityMessageBox(const wxString& message,
|
|
|
|
const wxString& caption = AudacityMessageBoxCaptionStr(),
|
|
|
|
long style = wxOK | wxCENTRE,
|
|
|
|
wxWindow *parent = NULL,
|
|
|
|
int x = wxDefaultCoord, int y = wxDefaultCoord)
|
|
|
|
{
|
|
|
|
return ::wxMessageBox(message, caption, style, parent, x, y);
|
|
|
|
}
|
|
|
|
|
Automation: AudacityCommand
This is a squash of 50 commits.
This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class. AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.
- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
- Tested with Zoom Toggle.
- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.
We abuse EffectsManager. It handles both Effects and
AudacityCommands now. In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.
- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.
This way we can search for related types at the same time.
- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason. They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.
- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
which are now better handled by other commands.
- JSONify "GetInfo: Commands" output, i.e. commas in the right places.
- General work on better Doxygen.
- Lyrics -> LyricsPanel
- Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-01-14 18:51:41 +00:00
|
|
|
|
2018-11-14 16:48:46 +00:00
|
|
|
#include <wx/textdlg.h> // to inherit
|
2017-10-12 15:49:57 +00:00
|
|
|
|
Automation: AudacityCommand
This is a squash of 50 commits.
This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class. AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.
- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
- Tested with Zoom Toggle.
- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.
We abuse EffectsManager. It handles both Effects and
AudacityCommands now. In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.
- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.
This way we can search for related types at the same time.
- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason. They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.
- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
which are now better handled by other commands.
- JSONify "GetInfo: Commands" output, i.e. commas in the right places.
- General work on better Doxygen.
- Lyrics -> LyricsPanel
- Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-01-14 18:51:41 +00:00
|
|
|
/**************************************************************************//**
|
|
|
|
\class AudacityTextEntryDialog
|
|
|
|
\brief Wrap wxTextEntryDialog so that caption IS translatable.
|
|
|
|
********************************************************************************/
|
2017-10-12 15:49:57 +00:00
|
|
|
class AudacityTextEntryDialog : public wxTabTraversalWrapper< wxTextEntryDialog >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AudacityTextEntryDialog(
|
|
|
|
wxWindow *parent,
|
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption, // don't use = wxGetTextFromUserPromptStr,
|
2019-03-15 18:28:30 +00:00
|
|
|
const wxString& value = {},
|
2017-10-12 15:49:57 +00:00
|
|
|
long style = wxTextEntryDialogStyle,
|
|
|
|
const wxPoint& pos = wxDefaultPosition)
|
|
|
|
: wxTabTraversalWrapper< wxTextEntryDialog>
|
2018-01-02 17:01:00 +00:00
|
|
|
( parent, message, caption, value, style, pos )
|
2017-10-12 15:49:57 +00:00
|
|
|
{}
|
2018-03-21 14:16:05 +00:00
|
|
|
|
|
|
|
void SetInsertionPointEnd();
|
2017-10-12 15:49:57 +00:00
|
|
|
};
|
|
|
|
|
Automation: AudacityCommand
This is a squash of 50 commits.
This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class. AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.
- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
- Tested with Zoom Toggle.
- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.
We abuse EffectsManager. It handles both Effects and
AudacityCommands now. In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.
- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.
This way we can search for related types at the same time.
- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason. They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.
- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
which are now better handled by other commands.
- JSONify "GetInfo: Commands" output, i.e. commas in the right places.
- General work on better Doxygen.
- Lyrics -> LyricsPanel
- Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-01-14 18:51:41 +00:00
|
|
|
/**************************************************************************//**
|
|
|
|
|
|
|
|
\brief Wrap wxMessageDialog so that caption IS translatable.
|
|
|
|
********************************************************************************/
|
2017-10-12 16:21:52 +00:00
|
|
|
class AudacityMessageDialog : public wxTabTraversalWrapper< wxMessageDialog >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AudacityMessageDialog(
|
|
|
|
wxWindow *parent,
|
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption, // don't use = wxMessageBoxCaptionStr,
|
|
|
|
long style = wxOK|wxCENTRE,
|
|
|
|
const wxPoint& pos = wxDefaultPosition)
|
|
|
|
: wxTabTraversalWrapper< wxMessageDialog>
|
2018-01-02 17:01:00 +00:00
|
|
|
( parent, message, caption, style, pos )
|
2017-10-12 16:21:52 +00:00
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
2010-01-23 19:44:49 +00:00
|
|
|
#endif // __AUDACITY_ERRORDIALOG__
|