22#include "../CommonCommandFlags.h"
24#include "../ProjectFileManager.h"
27#include "../SelectUtilities.h"
51 {
return VisitSettings<false>(
S); }
54 {
return VisitSettings<true>(
S); }
60 S.StartMultiColumn(2, wxALIGN_CENTER);
73 if (success && wasEmpty)
82 fn.SetName(
"exported.wav");
89 {
return VisitSettings<false>(
S); }
92 {
return VisitSettings<true>(
S); }
103 S.StartMultiColumn(2, wxALIGN_CENTER);
115 t0 = selectedRegion.
t0();
116 t1 = selectedRegion.t1();
119 int splitAt =
mFileName.Find(wxUniChar(
'.'),
true);
122 context.
Error(
wxT(
"Export filename must have an extension!"));
129 if(plugin !=
nullptr)
131 auto editor = plugin->CreateOptionsEditor(formatIndex,
nullptr);
149 context.
Status(wxString::Format(
wxT(
"Exported to %s format: %s"),
155 context.
Error(wxString::Format(
wxT(
"Could not export to %s format!"),
extension));
175 wxT(
"Optional/Extra/Part2/Scriptables2")
const ReservedCommandFlag & AudioIONotBusyFlag()
XXO("&Cut/Copy/Paste Toolbar")
audacity::BasicSettings * gPrefs
an object holding per-project preferred sample rate
declares abstract base class Track, TrackList, and iterators over TrackList
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
virtual void Error(const wxString &message) const
virtual void Status(const wxString &message, bool bFlush=false) const
AudacityProject & project
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
static const ComponentInterfaceSymbol Symbol
bool Apply(const CommandContext &context) override
void PopulateOrExchange(ShuttleGui &S) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
std::tuple< ExportPlugin *, int > FindFormat(const wxString &format, bool compareWithCase=false) const
Returns first pair of [exportPlugin, formatIndex], such that: exportPlugin->GetFormatInfo(formatIndex...
static ExportPluginRegistry & Get()
ExportTaskBuilder & SetPlugin(const ExportPlugin *plugin, int format=0) noexcept
ExportTaskBuilder & SetParameters(ExportProcessor::Parameters parameters) noexcept
ExportTaskBuilder & SetNumChannels(unsigned numChannels) noexcept
ExportTaskBuilder & SetSampleRate(double sampleRate) noexcept
ExportTaskBuilder & SetFileName(const wxFileName &filename)
ExportTaskBuilder & SetRange(double t0, double t1, bool selectedOnly=false) noexcept
static ExportProcessor::Parameters ParametersFromEditor(const ExportOptionsEditor &editor)
bool Apply(const CommandContext &context) override
bool VisitSettings(SettingsVisitorBase< Const > &S)
void PopulateOrExchange(ShuttleGui &S) override
static const ComponentInterfaceSymbol Symbol
bool Import(const FilePath &fileName, bool addToHistory=true)
static ProjectFileManager & Get(AudacityProject &project)
static ProjectRate & Get(AudacityProject &project)
Generates classes whose instances register items at construction.
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
static TrackList & Get(AudacityProject &project)
NotifyingSelectedRegion selectedRegion
static ViewInfo & Get(AudacityProject &project)
AUDACITY_DLL_API void OnAudacityCommand(const CommandContext &ctx)
IMPORT_EXPORT_API ExportResult Show(ExportTask exportTask)
void ExceptionWrappedCall(Callable callable)
FILES_API FilePath FindDefaultPath(Operation op)
void SelectAllIfNone(AudacityProject &project)
ProjectFileIOExtensionRegistry::Extension extension
BuiltinCommandsModule::Registration< ImportCommand > reg
BuiltinCommandsModule::Registration< ExportCommand > reg2