33#include <wx/stockitem.h>
45#include <unordered_map>
108 return dlg.release();
125 wxASSERT_MSG( bResult,
"You did not define DefineParameters() for this command" );
126 static_cast<void>(bResult);
138 S.SetForWriting( &eap );
140 wxASSERT_MSG( bResult,
"You did not define DefineParameters() for this command" );
141 static_cast<void>(bResult);
146"%s: Could not load settings below. Default settings will be used.\n\n%s")
173 auto cleanup =
finally( [&] {
177 bool returnVal =
true;
179 if (skipFlag ==
false)
184 XO(
"Applying %s...").Format(
name ),
189 returnVal =
Apply(context);
230 :
XO(
"%s: %s").Format(
GetName(), titleStr );
245 int additionalButtons)
249 wxASSERT( pCommand );
250 mpCommand = pCommand;
252 if( !pCommand->ManualPage().empty() )
261 S.StartVerticalLay(
true);
272 SetMinSize(GetSize());
#define BUILTIN_GENERIC_COMMAND_PREFIX
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
ValueRestorer< T > valueRestorer(T &var)
inline functions provide convenient parameter type deduction
std::unique_ptr< T, Destroyer< T > > Destroy_ptr
a convenience for using Destroyer
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
accessors for certain important windows associated with each project
Default dialog used for commands. Is populated using ShuttleGui.
virtual void OnCancel(wxCommandEvent &evt)
AudacityCommand * mpCommand
virtual void OnHelp(wxCommandEvent &evt)
virtual void OnOk(wxCommandEvent &evt)
virtual void PopulateOrExchange(ShuttleGui &S)
bool TransferDataFromWindow() override
bool TransferDataToWindow() override
Base class for command in Audacity.
virtual bool IsBatchProcessing() const
virtual bool Apply(const CommandContext &WXUNUSED(context))
bool LoadSettingsFromString(const wxString &parms)
VendorSymbol GetVendor() const override
bool SaveSettingsAsString(wxString &parms)
virtual bool VisitSettings(SettingsVisitor &)
bool DoAudacityCommand(const CommandContext &context, bool shouldPrompt=true)
virtual ~AudacityCommand()
virtual void PopulateOrExchange(ShuttleGui &WXUNUSED(S))
wxString GetVersion() const override
ComponentInterfaceSymbol GetSymbol() const override=0
virtual ManualPageID ManualPage()
bool ShowInterface(wxWindow *parent, bool forceModal=false)
virtual bool TransferDataFromWindow()
ProgressDialog * mProgress
PluginPath GetPath() const override
virtual bool TransferDataToWindow()
wxDialog * CreateUI(wxWindow *parent, AudacityCommand *client)
int MessageBox(const TranslatableString &message, long style=DefaultMessageBoxStyle, const TranslatableString &titleStr={})
virtual bool PromptUser(AudacityProject &)
virtual bool CheckWhetherSkipAudacityCommand()
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
AudacityProject & project
CommandParameters, derived from wxFileConfig, is essentially doing the same things as the SettingsVis...
bool GetParameters(wxString &parms)
TranslatableString GetName() const
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
const wxString & Internal() const
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
SettingsVisitor that sets parameters to their default values.
SettingsVisitor that gets parameter values into a string.
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
SettingsVisitor that sets parameters to a value (from a string)
Holds a msgid for the translation catalog; may also bind format arguments.