Audacity 3.2.0
FileMenus.cpp
Go to the documentation of this file.
1#include "../CommonCommandFlags.h"
2#include "FileNames.h"
3#include "LabelTrack.h"
4#include "MenuCreator.h"
5#include "PluginManager.h"
6#include "Prefs.h"
7#include "Project.h"
8#include "../ProjectFileManager.h"
9#include "ProjectHistory.h"
10#include "../ProjectManager.h"
11#include "../ProjectWindows.h"
12#include "Registry.h"
13#include "SelectFile.h"
14#include "../TagsEditor.h"
15#include "../SelectUtilities.h"
16#include "UndoManager.h"
17#include "ViewInfo.h"
18#include "Viewport.h"
19#include "WaveTrack.h"
20#include "CommandContext.h"
21#include "RealtimeEffectList.h"
22#include "RealtimeEffectState.h"
23#include "Import.h"
24#include "../import/ImportRaw.h"
25#include "AudacityMessageBox.h"
26#include "../widgets/FileHistory.h"
27#include "../widgets/MissingPluginsErrorDialog.h"
28#include "wxPanelWrapper.h"
29
30#include "ExportProgressUI.h"
31#include "ExportUtils.h"
32
33#include <wx/app.h>
34#include <wx/menu.h>
35#include <wx/frame.h>
36
38#include "ProjectRate.h"
40
41// private helper classes and functions
42namespace {
43
46{
47 auto &tracks = TrackList::Get( project );
48
49 wxString projectName = project.GetProjectName();
50
51 // Prompt for file name and/or extension?
52 bool bPromptingRequired = !project.mBatchMode ||
53 projectName.empty() ||
54 format.empty();
55
56 if (bPromptingRequired) {
58 {
60 XO("All audio is muted."), //":576"
61 XO("Warning"),
62 false);
63 return;
64 }
65
67 }
68 else {
69 // We either use a configured output path,
70 // or we use the default documents folder - just as for exports.
71 FilePath pathName = FileNames::FindDefaultPath(FileNames::Operation::MacrosOut);
72
73 if (!FileNames::WritableLocationCheck(pathName, XO("Cannot proceed to export.")))
74 {
75 return;
76 }
77/*
78 // If we've gotten to this point, we are in batch mode, have a file format,
79 // and the project has either been saved or a file has been imported. So, we
80 // want to use the project's path if it has been saved, otherwise use the
81 // initial import path.
82 FilePath pathName = !projectFileIO.IsTemporary() ?
83 wxPathOnly(projectFileIO.GetFileName()) :
84 project.GetInitialImportPath();
85*/
86 wxFileName fileName(pathName, projectName, format.Lower());
87
88 // Append the "macro-output" directory to the path
89 const wxString macroDir( "macro-output" );
90 if (fileName.GetDirs().empty() || fileName.GetDirs().back() != macroDir) {
91 fileName.AppendDir(macroDir);
92 }
93
94 wxString justName = fileName.GetName();
95 wxString extension = fileName.GetExt();
96 FilePath fullPath = fileName.GetFullPath();
97
98 if (wxFileName::FileExists(fileName.GetPath())) {
100 XO("Cannot create directory '%s'. \n"
101 "File already exists that is not a directory"),
102 Verbatim(fullPath));
103 return;
104 }
105 fileName.Mkdir(0777, wxPATH_MKDIR_FULL); // make sure it exists
106
107 int nChannels = tracks.Any().max(&Track::NChannels);
108 auto [plugin, formatIndex] = ExportPluginRegistry::Get().FindFormat(format);
109 if(plugin != nullptr)
110 {
111 auto editor = plugin->CreateOptionsEditor(formatIndex, nullptr);
112 editor->Load(*gPrefs);
113
114 auto builder = ExportTaskBuilder {}
117 .SetPlugin(plugin)
118 .SetFileName(fullPath)
119 .SetNumChannels(nChannels)
120 .SetRange(0.0, tracks.GetEndTime(), false);
121
122 bool success = false;
124 {
125 // We're in batch mode, the file does not exist already.
126 // We really can proceed without prompting.
127 const auto result = ExportProgressUI::Show(builder.Build(project));
128 success = result == ExportResult::Success || result == ExportResult::Stopped;
129 });
130
131 if (success && !project.mBatchMode) {
132 FileHistory::Global().Append(fullPath);
133 }
134 }
135 }
136}
137
138void DoImport(const CommandContext &context, bool isRaw)
139{
140 auto &project = context.project;
141 auto &trackFactory = WaveTrackFactory::Get( project );
142 auto &viewport = Viewport::Get(project);
143 auto &window = GetProjectFrame(project);
144
145 auto selectedFiles = ProjectFileManager::ShowOpenDialog(FileNames::Operation::Import);
146 if (selectedFiles.size() == 0) {
148 return;
149 }
150
151 // PRL: This affects FFmpegImportPlugin::Open which resets the preference
152 // to false. Should it also be set to true on other paths that reach
153 // AudacityProject::Import ?
155
156 selectedFiles.Sort(FileNames::CompareNoCase);
157
158 auto cleanup = finally( [&] {
159
161 viewport.ZoomFitHorizontallyAndShowTrack(nullptr);
162 viewport.HandleResize(); // Adjust scrollers for NEW track sizes.
163 } );
164
165 wxArrayString filesToImport;
166 for (size_t ff = 0; ff < selectedFiles.size(); ff++) {
167 wxString fileName = selectedFiles[ff];
168
169 FileNames::UpdateDefaultPath(FileNames::Operation::Import, ::wxPathOnly(fileName));
170
171 if (isRaw) {
172 TrackHolders newTracks;
173
174 ::ImportRaw(project, &window, fileName, &trackFactory, newTracks);
175
176 if (newTracks.size() > 0) {
178 .AddImportedTracks(fileName, std::move(newTracks));
179 }
180 }
181 else
182 filesToImport.Add(fileName);
183 }
184 if (!isRaw)
185 ProjectFileManager::Get(project).Import(filesToImport);
186}
187
188// Menu handler functions
189
190void OnNew(const CommandContext & )
191{
192 ( void ) ProjectManager::New();
193}
194
195void OnOpen(const CommandContext &context )
196{
197 auto &project = context.project;
199
200 int unavailablePlugins = 0;
201
202 auto &trackList = TrackList::Get(project);
203 for (auto track : trackList.Any<WaveTrack>())
204 {
205 auto& effects = RealtimeEffectList::Get(*track);
206 effects.Visit([&unavailablePlugins](auto& state, bool)
207 {
208 const auto& ID = state.GetID();
210
211 if (plug)
212 {
214 unavailablePlugins++;
215 }
216 else
217 {
218 unavailablePlugins++;
219 }
220 });
221 }
222
223 if (unavailablePlugins > 0)
224 {
225 MissingPluginsErrorDialog dlg(nullptr);
226 dlg.ShowModal();
227 }
228}
229
230// JKC: This is like OnClose, except it empties the project in place,
231// rather than creating a new empty project (with new toolbars etc).
232// It does not test for unsaved changes.
233// It is not in the menus by default. Its main purpose is/was for
234// developers checking functionality of ResetProjectToEmpty().
235void OnProjectReset(const CommandContext &context)
236{
237 auto &project = context.project;
239}
240
241void OnClose(const CommandContext &context )
242{
243 auto &project = context.project;
244 auto &window = GetProjectFrame(project);
246 window.Close();
247}
248
249void OnCompact(const CommandContext &context)
250{
252}
253
254void OnSave(const CommandContext &context )
255{
256 auto &project = context.project;
257 auto &projectFileManager = ProjectFileManager::Get( project );
258 projectFileManager.Save();
259}
260
261void OnSaveAs(const CommandContext &context )
262{
263 auto &project = context.project;
264 auto &projectFileManager = ProjectFileManager::Get( project );
265 projectFileManager.SaveAs();
266}
267
268void OnSaveCopy(const CommandContext &context )
269{
270 auto &project = context.project;
271 auto &projectFileManager = ProjectFileManager::Get( project );
272 projectFileManager.SaveCopy();
273}
274
275void OnExportMp3(const CommandContext &context)
276{
277 auto &project = context.project;
278 DoExport(
279 project, "MP3",
281}
282
283void OnExportWav(const CommandContext &context)
284{
285 auto &project = context.project;
286 DoExport(
287 project, "WAV",
289}
290
291void OnExportOgg(const CommandContext &context)
292{
293 auto &project = context.project;
294 DoExport(
295 project, "OGG",
297}
298
299void OnExportAudio(const CommandContext &context)
300{
301 auto &project = context.project;
302 DoExport(
303 project, "",
305}
306
307void OnExportLabels(const CommandContext &context)
308{
309 auto &project = context.project;
310 auto &tracks = TrackList::Get( project );
311 auto &window = GetProjectFrame(project);
312
313 /* i18n-hint: filename containing exported text from label tracks */
314 wxString fName = _("labels.txt");
315 auto trackRange = tracks.Any<const LabelTrack>();
316 auto numLabelTracks = trackRange.size();
317
318 if (numLabelTracks == 0) {
319 AudacityMessageBox( XO("There are no label tracks to export.") );
320 return;
321 }
322 else
323 fName = (*trackRange.rbegin())->GetName();
324
325 fName = SelectFile(FileNames::Operation::Export,
326 XO("Export Labels As:"),
327 wxEmptyString,
328 fName,
329 wxT("txt"),
331 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
332 &window);
333
334 if (fName.empty())
335 return;
336
338
339 // Move existing files out of the way. Otherwise wxTextFile will
340 // append to (rather than replace) the current file.
341
342 if (wxFileExists(fName)) {
343#ifdef __WXGTK__
344 wxString safetyFileName = fName + wxT("~");
345#else
346 wxString safetyFileName = fName + wxT(".bak");
347#endif
348
349 if (wxFileExists(safetyFileName))
350 wxRemoveFile(safetyFileName);
351
352 wxRename(fName, safetyFileName);
353 }
354
355 wxTextFile f(fName);
356 f.Create();
357 f.Open();
358 if (!f.IsOpened()) {
360 XO( "Couldn't write to file: %s" ).Format( fName ) );
361 return;
362 }
363
364 for (auto lt : trackRange)
365 lt->Export(f, format);
366
367 f.Write();
368 f.Close();
369}
370
371void OnImport(const CommandContext &context)
372{
373 DoImport(context, false);
374}
375
376void OnImportLabels(const CommandContext &context)
377{
378 auto &project = context.project;
379 auto &tracks = TrackList::Get( project );
380 auto &viewport = Viewport::Get(project);
381 auto &window = GetProjectFrame(project);
382
383 wxString fileName =
384 SelectFile(FileNames::Operation::Open,
385 XO("Select a text file containing labels"),
386 wxEmptyString, // Path
387 wxT(""), // Name
388 wxT("txt"), // Extension
390 wxRESIZE_BORDER, // Flags
391 &window); // Parent
392
393 if (!fileName.empty()) {
395 wxTextFile f;
396
397 f.Open(fileName);
398 if (!f.IsOpened()) {
400 XO("Could not open file: %s").Format( fileName ) );
401 return;
402 }
403
404 auto newTrack = std::make_shared<LabelTrack>();
405 wxString sTrackName;
406 wxFileName::SplitPath(fileName, NULL, NULL, &sTrackName, NULL);
407 newTrack->SetName(sTrackName);
408
409 newTrack->Import(f, format);
410
412 newTrack->SetSelected(true);
413 tracks.Add( newTrack );
414
416 XO("Imported labels from '%s'").Format( fileName ),
417 XO("Import Labels"));
418
419 viewport.ZoomFitHorizontallyAndShowTrack(nullptr);
420 }
421}
422
423void OnImportRaw(const CommandContext &context)
424{
425 DoImport(context, true);
426}
427
428void OnExit(const CommandContext &WXUNUSED(context) )
429{
430 // Simulate the application Exit menu item
431 wxCommandEvent evt{ wxEVT_MENU, wxID_EXIT };
432 wxTheApp->ProcessEvent( evt );
433}
434
435void OnExportFLAC(const CommandContext &context)
436{
437 DoExport(
438 context.project, "FLAC",
440}
441
443{
445 return;
446
448 context.project, "",
449 AudiocomTrace::ignore, // Local save, no need.
450 true);
451}
452
453// Menu definitions
454
455using namespace MenuRegistry;
456
458{
459 static auto menu = std::shared_ptr{
460 Menu( wxT("File"), XXO("&File"),
461 Section( "Basic",
462 /*i18n-hint: "New" is an action (verb) to create a NEW project*/
463 Command( wxT("New"), XXO("&New"), OnNew,
464 AudioIONotBusyFlag(), wxT("Ctrl+N") ),
465
466 /*i18n-hint: (verb)*/
467 Command( wxT("Open"), XXO("&Open..."), OnOpen,
468 AudioIONotBusyFlag(), wxT("Ctrl+O") ),
469
470 #ifdef EXPERIMENTAL_RESET
471 // Empty the current project and forget its name and path. DANGEROUS
472 // It's just for developers.
473 // Do not translate this menu item (no XXO).
474 // It MUST not be shown to regular users.
475 Command( wxT("Reset"), XXO("&Dangerous Reset..."), OnProjectReset,
477 #endif
478
480
481 Menu( wxT("Recent"),
482 #ifdef __WXMAC__
483 /* i18n-hint: This is the name of the menu item on Mac OS X only */
484 XXO("Open Recent")
485 #else
486 /* i18n-hint: This is the name of the menu item on Windows and Linux */
487 XXO("Recent &Files")
488 #endif
489 ,
490 MenuCreator::Special( wxT("PopulateRecentFilesStep"),
491 [](AudacityProject &, wxMenu &theMenu){
492 // Recent Files and Recent Projects menus
493 auto &history = FileHistory::Global();
494 history.UseMenu( &theMenu );
495
496 wxWeakRef<wxMenu> recentFilesMenu{ &theMenu };
497 wxTheApp->CallAfter( [=] {
498 // Bug 143 workaround.
499 // The bug is in wxWidgets. For a menu that has scrollers,
500 // the scrollers have an ID of 0 (not wxID_NONE which is -3).
501 // Therefore wxWidgets attempts to find a help string. See
502 // wxFrameBase::ShowMenuHelp(int menuId)
503 // It finds a bogus automatic help string of "Recent &Files"
504 // from that submenu.
505 // So we set the help string for command with Id 0 to empty.
506 if ( recentFilesMenu )
507 recentFilesMenu->GetParent()->SetHelpString( 0, "" );
508 } );
509 } )
510 )
511 ),
512
513 Section( "Save",
514 Menu( wxT("Save"), XXO("&Save Project"),
515 Command( wxT("Save"), XXO("&Save Project"), OnSave,
516 AudioIONotBusyFlag(), wxT("Ctrl+S") ),
517 Command( wxT("SaveAs"), XXO("Save Project &As..."), OnSaveAs,
519 Command( wxT("SaveCopy"), XXO("&Backup Project..."), OnSaveCopy,
521 )//,
522
523 // Bug 2600: Compact has interactions with undo/history that are bound
524 // to confuse some users. We don't see a way to recover useful amounts
525 // of space and not confuse users using undo.
526 // As additional space used by aup3 is 50% or so, perfectly valid
527 // approach to this P1 bug is to not provide the 'Compact' menu item.
528 //Command( wxT("Compact"), XXO("Co&mpact Project"), OnCompact,
529 // AudioIONotBusyFlag(), wxT("Shift+A") )
530 ),
531
532 Section( "Import-Export",
533 Command( wxT("Export"), XXO("&Export Audio..."), OnExportAudio,
534 AudioIONotBusyFlag() | WaveTracksExistFlag(), wxT("Ctrl+Shift+E") ),
535
536 Menu( wxT("ExportOther"), XXO("Expo&rt Other"),
537 Command( wxT("ExportLabels"), XXO("Export &Labels..."),
540 ),
541
542 Menu( wxT("Import"), XXO("&Import"),
543 Command( wxT("ImportAudio"), XXO("&Audio..."), OnImport,
544 AudioIONotBusyFlag(), wxT("Ctrl+Shift+I") ),
545 Command( wxT("ImportLabels"), XXO("&Labels..."), OnImportLabels,
547 Command( wxT("ImportRaw"), XXO("&Raw Data..."), OnImportRaw,
549 )
550 ),
551
552 Section( "Close", Command( wxT("Close"), XXO("&Close Project"), OnClose,
553 AudioIONotBusyFlag(), wxT("Ctrl+W") )
554 ),
555
556 Section( "Exit",
557 // On the Mac, the Exit item doesn't actually go here...wxMac will
558 // pull it out
559 // and put it in the Audacity menu for us based on its ID.
560 /* i18n-hint: (verb) It's item on a menu. */
561 Command( wxT("Exit"), XXO("&Quit Audacity"), OnExit,
562 AlwaysEnabledFlag, wxT("Ctrl+Q") )
563 )
564 ) };
565 return menu;
566}
567
569
571{
572 static auto menu = std::shared_ptr{
573 Section( "Import-Export",
574 Menu( wxT("Export"), XXO("&Export"),
575 // Enable Export audio commands only when there are audio tracks.
576 Command( wxT("ExportMp3"), XXO("Export as MP&3"), OnExportMp3,
578 Command( wxT("ExportWav"), XXO("Export as &WAV"), OnExportWav,
580 Command( wxT("ExportOgg"), XXO("Export as &OGG"), OnExportOgg,
582 Command( wxT("ExportFLAC"), XXO("Export as FLAC"), OnExportFLAC,
584 Command( wxT("ExportSel"), XXO("Expo&rt Selected Audio..."), OnExportSelectedAudio,
586 ))};
587 return menu;
588}
589
592 wxT("Optional/Extra/Part1")
593};
594
595}
wxT("CloseDown"))
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
AttachedItem sAttachment1
AttachedItem sAttachment3
constexpr CommandFlag AlwaysEnabledFlag
Definition: CommandFlag.h:34
const ReservedCommandFlag & AudioIONotBusyFlag()
const ReservedCommandFlag & LabelTracksExistFlag()
const ReservedCommandFlag & TimeSelectedFlag()
const ReservedCommandFlag & WaveTracksExistFlag()
const ReservedCommandFlag & WaveTracksSelectedFlag()
void ShowExportErrorDialog(const TranslatableString &message, const TranslatableString &caption, bool allowReporting)
Definition: Export.cpp:144
AudiocomTrace
Definition: ExportUtils.h:27
@ ShareAudioExportExtraMenu
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
wxString FileExtension
File extension, not including any leading dot.
Definition: Identifier.h:224
BoolSetting NewImportingSession
Definition: Import.cpp:860
void ImportRaw(const AudacityProject &project, wxWindow *parent, const wxString &fileName, WaveTrackFactory *trackFactory, TrackHolders &outTracks)
Definition: ImportRaw.cpp:106
std::vector< std::shared_ptr< Track > > TrackHolders
Definition: ImportRaw.h:24
#define _(s)
Definition: Internat.h:73
LabelFormat
Definition: LabelTrack.h:30
audacity::BasicSettings * gPrefs
Definition: Prefs.cpp:68
wxString FilePath
Definition: Project.h:21
an object holding per-project preferred sample rate
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 ...
FilePath SelectFile(FileNames::Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
Definition: SelectFile.cpp:17
const auto tracks
const auto project
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
virtual size_t NChannels() const =0
Report the number of channels.
size_t size() const
How many attachment pointers are in the Site.
Definition: ClientData.h:260
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
AudacityProject & project
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
Definition: Export.cpp:59
ExportTaskBuilder & SetParameters(ExportProcessor::Parameters parameters) noexcept
Definition: Export.cpp:47
ExportTaskBuilder & SetNumChannels(unsigned numChannels) noexcept
Definition: Export.cpp:53
ExportTaskBuilder & SetSampleRate(double sampleRate) noexcept
Definition: Export.cpp:72
ExportTaskBuilder & SetFileName(const wxFileName &filename)
Definition: Export.cpp:33
ExportTaskBuilder & SetRange(double t0, double t1, bool selectedOnly=false) noexcept
Definition: Export.cpp:39
static TrackIterRange< const WaveTrack > FindExportWaveTracks(const TrackList &tracks, bool selectedOnly)
Definition: ExportUtils.cpp:23
static void PerformInteractiveExport(AudacityProject &project, const FileExtension &format, AudiocomTrace trace, bool selectedOnly)
Definition: ExportUtils.cpp:78
static ExportProcessor::Parameters ParametersFromEditor(const ExportOptionsEditor &editor)
Definition: ExportUtils.cpp:39
static bool HasSelectedAudio(const AudacityProject &project)
Definition: ExportUtils.cpp:33
void Append(const FilePath &file)
Definition: FileHistory.h:46
static FileHistory & Global()
Definition: FileHistory.cpp:39
FILES_API const FileType AllFiles
Definition: FileNames.h:70
FILES_API const FileType TextFiles
Definition: FileNames.h:73
Abstract base class used in importing a file.
static void SetLastOpenType(const FileNames::FileType &type)
Definition: Import.cpp:254
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:98
static const FileNames::FileType WebVTTFiles
Definition: LabelTrack.h:132
static const FileNames::FileType SubripFiles
Definition: LabelTrack.h:131
static LabelFormat FormatForFileName(const wxString &fileName)
Definition: LabelTrack.cpp:685
static constexpr auto Special
Definition: MenuCreator.h:36
An error dialog about missing plugins.
static bool IsPluginAvailable(const PluginDescriptor &plug)
const PluginDescriptor * GetPlugin(const PluginID &ID) const
static PluginManager & Get()
bool Import(const FilePath &fileName, bool addToHistory=true)
void AddImportedTracks(const FilePath &fileName, TrackHolders &&newTracks)
static wxArrayString ShowOpenDialog(FileNames::Operation op, const FileNames::FileType &extraType={})
Show an open dialogue for opening audio files, and possibly other sorts of files.
static ProjectFileManager & Get(AudacityProject &project)
void SetMenuClose(bool value)
void PushState(const TranslatableString &desc, const TranslatableString &shortDesc)
static ProjectHistory & Get(AudacityProject &project)
static ProjectManager & Get(AudacityProject &project)
static AudacityProject * New()
static void OpenFiles(AudacityProject *proj)
void ResetProjectToEmpty()
static ProjectRate & Get(AudacityProject &project)
Definition: ProjectRate.cpp:28
static RealtimeEffectList & Get(AudacityProject &project)
Generates classes whose instances register items at construction.
Definition: Registry.h:388
bool Write(const T &value)
Write value to config and return true if successful.
Definition: Prefs.h:259
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:314
static Viewport & Get(AudacityProject &project)
Definition: Viewport.cpp:33
static WaveTrackFactory & Get(AudacityProject &project)
Definition: WaveTrack.cpp:3376
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
IMPORT_EXPORT_API ExportResult Show(ExportTask exportTask)
void ExceptionWrappedCall(Callable callable)
FILES_API bool WritableLocationCheck(const FilePath &path, const TranslatableString &message)
Check location on writable access and return true if checked successfully.
FILES_API void UpdateDefaultPath(Operation op, const FilePath &path)
FILES_API int CompareNoCase(const wxString &first, const wxString &second)
FILES_API FilePath FindDefaultPath(Operation op)
constexpr auto Section
Definition: MenuRegistry.h:436
constexpr auto Command
Definition: MenuRegistry.h:456
constexpr auto Menu
Items will appear in a main toolbar menu or in a sub-menu.
Definition: MenuRegistry.h:445
std::unique_ptr< detail::IndirectItem< Item > > Indirect(const std::shared_ptr< Item > &ptr)
A convenience function.
Definition: Registry.h:175
void SelectNone(AudacityProject &project)
void OnNew(const CommandContext &)
Definition: FileMenus.cpp:190
void OnSaveAs(const CommandContext &context)
Definition: FileMenus.cpp:261
void DoExport(AudacityProject &project, const FileExtension &format, AudiocomTrace trace)
Definition: FileMenus.cpp:44
void OnImportLabels(const CommandContext &context)
Definition: FileMenus.cpp:376
void OnExportSelectedAudio(const CommandContext &context)
Definition: FileMenus.cpp:442
void DoImport(const CommandContext &context, bool isRaw)
Definition: FileMenus.cpp:138
void OnExportAudio(const CommandContext &context)
Definition: FileMenus.cpp:299
void OnSave(const CommandContext &context)
Definition: FileMenus.cpp:254
void OnImportRaw(const CommandContext &context)
Definition: FileMenus.cpp:423
void OnExportLabels(const CommandContext &context)
Definition: FileMenus.cpp:307
void OnClose(const CommandContext &context)
Definition: FileMenus.cpp:241
void OnExportOgg(const CommandContext &context)
Definition: FileMenus.cpp:291
void OnImport(const CommandContext &context)
Definition: FileMenus.cpp:371
void OnOpen(const CommandContext &context)
Definition: FileMenus.cpp:195
void OnExportFLAC(const CommandContext &context)
Definition: FileMenus.cpp:435
void OnExportWav(const CommandContext &context)
Definition: FileMenus.cpp:283
void OnCompact(const CommandContext &context)
Definition: FileMenus.cpp:249
void OnProjectReset(const CommandContext &context)
Definition: FileMenus.cpp:235
void OnExit(const CommandContext &WXUNUSED(context))
Definition: FileMenus.cpp:428
void OnExportMp3(const CommandContext &context)
Definition: FileMenus.cpp:275
void OnSaveCopy(const CommandContext &context)
Definition: FileMenus.cpp:268
double GetRate(const Track &track)
Definition: TimeTrack.cpp:182