32#include <wx/stockitem.h>
41#include "../ShuttleAutomation.h"
42#include "../ShuttleGui.h"
43#include "../widgets/ProgressDialog.h"
44#include "../widgets/HelpSystem.h"
45#include "../widgets/AudacityMessageBox.h"
46#include "../widgets/VetoDialogHook.h"
48#include <unordered_map>
115 return dlg.release();
132 wxASSERT_MSG( bResult,
"You did not define DefineParameters() for this command" );
133 static_cast<void>(bResult);
145 S.SetForWriting( &eap );
147 wxASSERT_MSG( bResult,
"You did not define DefineParameters() for this command" );
148 static_cast<void>(bResult);
153"%s: Could not load settings below. Default settings will be used.\n\n%s")
181 auto cleanup =
finally( [&] {
185 bool returnVal =
true;
187 if (skipFlag ==
false)
192 XO(
"Applying %s...").Format(
name ),
197 returnVal =
Apply(context);
238 :
XO(
"%s: %s").Format(
GetName(), titleStr );
253 int additionalButtons)
257 wxASSERT( pCommand );
258 mpCommand = pCommand;
260 if( !pCommand->ManualPage().empty() )
269 S.StartVerticalLay(
true);
280 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
const TranslatableString name
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
EffectReverbSettings preset
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 &)
virtual ~AudacityCommand()
virtual void PopulateOrExchange(ShuttleGui &WXUNUSED(S))
virtual bool PromptUser(wxWindow *parent)
wxString GetVersion() const override
ComponentInterfaceSymbol GetSymbol() const override=0
virtual ManualPageID ManualPage()
bool ShowInterface(wxWindow *parent, bool forceModal=false)
virtual bool TransferDataFromWindow()
bool DoAudacityCommand(wxWindow *parent, const CommandContext &context, bool shouldPrompt=true)
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 CheckWhetherSkipAudacityCommand()
CommandContext provides additional information to an 'Apply()' command. It provides the 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 result_type Call(Arguments &&...arguments)
Null check of the installed function is done for you.
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.