Audacity  2.3.1
Public Member Functions | List of all members
FileActions::Handler Struct Reference
Inheritance diagram for FileActions::Handler:

Public Member Functions

void OnNew (const CommandContext &)
 
void OnOpen (const CommandContext &context)
 
void OnProjectReset (const CommandContext &context)
 
void OnClose (const CommandContext &context)
 
void OnSave (const CommandContext &context)
 
void OnSaveAs (const CommandContext &context)
 
void OnSaveCopy (const CommandContext &context)
 
void OnSaveCompressed (const CommandContext &context)
 
void OnExportMp3 (const CommandContext &context)
 
void OnExportWav (const CommandContext &context)
 
void OnExportOgg (const CommandContext &context)
 
void OnExportAudio (const CommandContext &context)
 
void OnExportSelection (const CommandContext &context)
 
void OnExportLabels (const CommandContext &context)
 
void OnExportMultiple (const CommandContext &context)
 
void OnExportMIDI (const CommandContext &context)
 
void OnImport (const CommandContext &context)
 
void OnImportLabels (const CommandContext &context)
 
void OnImportMIDI (const CommandContext &context)
 
void OnImportRaw (const CommandContext &context)
 
void OnPageSetup (const CommandContext &context)
 
void OnPrint (const CommandContext &context)
 
void OnExit (const CommandContext &WXUNUSED(context))
 

Detailed Description

Definition at line 142 of file FileMenus.cpp.

Member Function Documentation

void FileActions::Handler::OnClose ( const CommandContext context)
inline

Definition at line 166 of file FileMenus.cpp.

References CommandContext::project, and AudacityProject::SetMenuClose().

167 {
168  auto &project = context.project;
169  project.SetMenuClose(true);
170  project.Close();
171 }
void SetMenuClose(bool value)
Definition: Project.h:754
AudacityProject & project
void FileActions::Handler::OnExit ( const CommandContext WXUNUSEDcontext)
inline

Definition at line 538 of file FileMenus.cpp.

References QuitAudacity().

539 {
540  QuitAudacity();
541 }
void QuitAudacity(bool bForce)
void FileActions::Handler::OnExportAudio ( const CommandContext context)
inline

Definition at line 217 of file FileMenus.cpp.

References CommandContext::project.

218 {
219  auto &project = context.project;
220  DoExport(project, "");
221 }
AudacityProject & project
void FileActions::Handler::OnExportLabels ( const CommandContext context)
inline

Definition at line 235 of file FileMenus.cpp.

References _(), AudacityMessageBox(), FileNames::Export, AudacityProject::GetTracks(), CommandContext::project, and FileNames::SelectFile().

236 {
237  auto &project = context.project;
238  auto tracks = project.GetTracks();
239 
240  /* i18n-hint: filename containing exported text from label tracks */
241  wxString fName = _("labels.txt");
242  auto trackRange = tracks->Any<const LabelTrack>();
243  auto numLabelTracks = trackRange.size();
244 
245  if (numLabelTracks == 0) {
246  AudacityMessageBox(_("There are no label tracks to export."));
247  return;
248  }
249  else
250  fName = (*trackRange.rbegin())->GetName();
251 
253  _("Export Labels As:"),
254  wxEmptyString,
255  fName,
256  wxT("txt"),
257  wxT("*.txt"),
258  wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
259  &project);
260 
261  if (fName == wxT(""))
262  return;
263 
264  // Move existing files out of the way. Otherwise wxTextFile will
265  // append to (rather than replace) the current file.
266 
267  if (wxFileExists(fName)) {
268 #ifdef __WXGTK__
269  wxString safetyFileName = fName + wxT("~");
270 #else
271  wxString safetyFileName = fName + wxT(".bak");
272 #endif
273 
274  if (wxFileExists(safetyFileName))
275  wxRemoveFile(safetyFileName);
276 
277  wxRename(fName, safetyFileName);
278  }
279 
280  wxTextFile f(fName);
281  f.Create();
282  f.Open();
283  if (!f.IsOpened()) {
284  AudacityMessageBox( wxString::Format(
285  _("Couldn't write to file: %s"), fName ) );
286  return;
287  }
288 
289  for (auto lt : trackRange)
290  lt->Export(f);
291 
292  f.Write();
293  f.Close();
294 }
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:113
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:427
AudacityProject & project
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
TrackList * GetTracks()
Definition: Project.h:209
void FileActions::Handler::OnExportMIDI ( const CommandContext context)
inline

Definition at line 306 of file FileMenus.cpp.

References _(), AudacityMessageBox(), FileNames::Export, AudacityProject::GetTracks(), CommandContext::project, TrackList::Selected(), and FileNames::SelectFile().

307 {
308  auto &project = context.project;
309  auto tracks = project.GetTracks();
310 
311  // Make sure that there is
312  // exactly one NoteTrack selected.
313  const auto range = tracks->Selected< const NoteTrack >();
314  const auto numNoteTracksSelected = range.size();
315 
316  if(numNoteTracksSelected > 1) {
318  "Please select only one Note Track at a time."));
319  return;
320  }
321  else if(numNoteTracksSelected < 1) {
323  "Please select a Note Track."));
324  return;
325  }
326 
327  wxASSERT(numNoteTracksSelected);
328  if (!numNoteTracksSelected)
329  return;
330 
331  const auto nt = *range.begin();
332 
333  while(true) {
334 
335  wxString fName = wxT("");
336 
338  _("Export MIDI As:"),
339  wxEmptyString,
340  fName,
341  wxT(".mid|.gro"),
342  _("MIDI file (*.mid)|*.mid|Allegro file (*.gro)|*.gro"),
343  wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
344  &project);
345 
346  if (fName == wxT(""))
347  return;
348 
349  if(!fName.Contains(wxT("."))) {
350  fName = fName + wxT(".mid");
351  }
352 
353  // Move existing files out of the way. Otherwise wxTextFile will
354  // append to (rather than replace) the current file.
355 
356  if (wxFileExists(fName)) {
357 #ifdef __WXGTK__
358  wxString safetyFileName = fName + wxT("~");
359 #else
360  wxString safetyFileName = fName + wxT(".bak");
361 #endif
362 
363  if (wxFileExists(safetyFileName))
364  wxRemoveFile(safetyFileName);
365 
366  wxRename(fName, safetyFileName);
367  }
368 
369  if(fName.EndsWith(wxT(".mid")) || fName.EndsWith(wxT(".midi"))) {
370  nt->ExportMIDI(fName);
371  } else if(fName.EndsWith(wxT(".gro"))) {
372  nt->ExportAllegro(fName);
373  } else {
374  wxString msg = _("You have selected a filename with an unrecognized file extension.\nDo you want to continue?");
375  wxString title = _("Export MIDI");
376  int id = AudacityMessageBox(msg, title, wxYES_NO);
377  if (id == wxNO) {
378  continue;
379  } else if (id == wxYES) {
380  nt->ExportMIDI(fName);
381  }
382  }
383  break;
384  }
385 }
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
auto Selected() -> TrackIterRange< TrackType >
Definition: Track.h:1263
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:427
AudacityProject & project
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
TrackList * GetTracks()
Definition: Project.h:209
A Track that is used for Midi notes. (Somewhat old code).
Definition: NoteTrack.h:66
void FileActions::Handler::OnExportMp3 ( const CommandContext context)
inline

Definition at line 199 of file FileMenus.cpp.

References CommandContext::project.

200 {
201  auto &project = context.project;
202  DoExport(project, "MP3");
203 }
AudacityProject & project
void FileActions::Handler::OnExportMultiple ( const CommandContext context)
inline

Definition at line 296 of file FileMenus.cpp.

References CommandContext::project, AudacityApp::SetMissingAliasedFileWarningShouldShow(), ExportMultiple::ShowModal(), and wxGetApp().

297 {
298  auto &project = context.project;
299  ExportMultiple em(&project);
300 
302  em.ShowModal();
303 }
void SetMissingAliasedFileWarningShouldShow(bool b)
Changes the behavior of missing aliased blockfiles warnings.
AudacityProject & project
Presents a dialog box allowing the user to export multiple files either by exporting each track as a ...
AudacityApp & wxGetApp()
void FileActions::Handler::OnExportOgg ( const CommandContext context)
inline

Definition at line 211 of file FileMenus.cpp.

References CommandContext::project.

212 {
213  auto &project = context.project;
214  DoExport(project, "OGG");
215 }
AudacityProject & project
void FileActions::Handler::OnExportSelection ( const CommandContext context)
inline

Definition at line 223 of file FileMenus.cpp.

References _(), AudacityProject::GetViewInfo(), Exporter::Process(), CommandContext::project, ViewInfo::selectedRegion, Exporter::SetFileDialogTitle(), AudacityApp::SetMissingAliasedFileWarningShouldShow(), and wxGetApp().

224 {
225  auto &project = context.project;
226  auto &selectedRegion = project.GetViewInfo().selectedRegion;
227  Exporter e;
228 
230  e.SetFileDialogTitle( _("Export Selected Audio") );
231  e.Process(&project, true, selectedRegion.t0(),
232  selectedRegion.t1());
233 }
SelectedRegion selectedRegion
Definition: ViewInfo.h:162
void SetFileDialogTitle(const wxString &DialogTitle)
Definition: Export.cpp:339
void SetMissingAliasedFileWarningShouldShow(bool b)
Changes the behavior of missing aliased blockfiles warnings.
bool Process(AudacityProject *project, bool selectedOnly, double t0, double t1)
Definition: Export.cpp:369
AudacityProject & project
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
AudacityApp & wxGetApp()
const ViewInfo & GetViewInfo() const
Definition: Project.h:224
void FileActions::Handler::OnExportWav ( const CommandContext context)
inline

Definition at line 205 of file FileMenus.cpp.

References CommandContext::project.

206 {
207  auto &project = context.project;
208  DoExport(project, "WAV");
209 }
AudacityProject & project
void FileActions::Handler::OnImport ( const CommandContext context)
inline

Definition at line 388 of file FileMenus.cpp.

References CompareNoCaseFileName(), gPrefs, AudacityProject::HandleResize(), AudacityProject::Import(), FileNames::Open, CommandContext::project, AudacityApp::SetMissingAliasedFileWarningShouldShow(), AudacityProject::ShowOpenDialog(), FileNames::UpdateDefaultPath(), wxGetApp(), and AudacityProject::ZoomAfterImport().

389 {
390  auto &project = context.project;
391 
392  // An import trigger for the alias missing dialog might not be intuitive, but
393  // this serves to track the file if the users zooms in and such.
395 
396  wxArrayString selectedFiles = project.ShowOpenDialog(wxT(""));
397  if (selectedFiles.GetCount() == 0) {
398  gPrefs->Write(wxT("/LastOpenType"),wxT(""));
399  gPrefs->Flush();
400  return;
401  }
402 
403  // PRL: This affects FFmpegImportPlugin::Open which resets the preference
404  // to false. Should it also be set to true on other paths that reach
405  // AudacityProject::Import ?
406  gPrefs->Write(wxT("/NewImportingSession"), true);
407 
408  //sort selected files by OD status. Load non OD first so user can edit asap.
409  //first sort selectedFiles.
410  selectedFiles.Sort(CompareNoCaseFileName);
411  ODManager::Pauser pauser;
412 
413  auto cleanup = finally( [&] {
414  gPrefs->Write(wxT("/LastOpenType"),wxT(""));
415 
416  gPrefs->Flush();
417 
418  project.HandleResize(); // Adjust scrollers for NEW track sizes.
419  } );
420 
421  for (size_t ff = 0; ff < selectedFiles.GetCount(); ff++) {
422  wxString fileName = selectedFiles[ff];
423 
425 
426  project.Import(fileName);
427  }
428 
429  project.ZoomAfterImport(nullptr);
430 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
void SetMissingAliasedFileWarningShouldShow(bool b)
Changes the behavior of missing aliased blockfiles warnings.
static void UpdateDefaultPath(Operation op, const wxString &path)
Definition: FileNames.cpp:415
AudacityProject & project
int CompareNoCaseFileName(const wxString &first, const wxString &second)
wxstring compare function for sorting case, which is needed to load correctly.
Definition: ODManager.cpp:49
AudacityApp & wxGetApp()
void FileActions::Handler::OnImportLabels ( const CommandContext context)
inline

Definition at line 432 of file FileMenus.cpp.

References _(), AudacityMessageBox(), AudacityProject::GetTrackFactory(), AudacityProject::GetTracks(), FileNames::Open, CommandContext::project, AudacityProject::PushState(), FileNames::SelectFile(), AudacityProject::SelectNone(), and AudacityProject::ZoomAfterImport().

433 {
434  auto &project = context.project;
435  auto trackFactory = project.GetTrackFactory();
436  auto tracks = project.GetTracks();
437 
438  wxString fileName =
440  _("Select a text file containing labels"),
441  wxEmptyString, // Path
442  wxT(""), // Name
443  wxT(".txt"), // Extension
444  _("Text files (*.txt)|*.txt|All files|*"),
445  wxRESIZE_BORDER, // Flags
446  &project); // Parent
447 
448  if (fileName != wxT("")) {
449  wxTextFile f;
450 
451  f.Open(fileName);
452  if (!f.IsOpened()) {
454  wxString::Format( _("Could not open file: %s"), fileName ) );
455  return;
456  }
457 
458  auto newTrack = trackFactory->NewLabelTrack();
459  wxString sTrackName;
460  wxFileName::SplitPath(fileName, NULL, NULL, &sTrackName, NULL);
461  newTrack->SetName(sTrackName);
462 
463  newTrack->Import(f);
464 
465  project.SelectNone();
466  newTrack->SetSelected(true);
467  tracks->Add(std::move(newTrack));
468 
469  project.PushState(wxString::
470  Format(_("Imported labels from '%s'"), fileName),
471  _("Import Labels"));
472 
473  project.ZoomAfterImport(nullptr);
474  }
475 }
Abstract base class used in importing a file.
Definition: Import.h:32
int AudacityMessageBox(const wxString &message, const wxString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: ErrorDialog.h:92
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:427
AudacityProject & project
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
TrackFactory * GetTrackFactory()
Definition: Project.cpp:1513
void FileActions::Handler::OnImportMIDI ( const CommandContext context)
inline

Definition at line 477 of file FileMenus.cpp.

References _(), FileActions::DoImportMIDI(), FileNames::Open, CommandContext::project, and FileNames::SelectFile().

478 {
479  auto &project = context.project;
480 
482  _("Select a MIDI file"),
483  wxEmptyString, // Path
484  wxT(""), // Name
485  wxT(""), // Extension
486  _("MIDI and Allegro files (*.mid;*.midi;*.gro)|*.mid;*.midi;*.gro|MIDI files (*.mid;*.midi)|*.mid;*.midi|Allegro files (*.gro)|*.gro|All files|*"),
487  wxRESIZE_BORDER, // Flags
488  &project); // Parent
489 
490  if (fileName != wxT(""))
491  DoImportMIDI(&project, fileName);
492 }
AudacityProject * DoImportMIDI(AudacityProject *pProject, const wxString &fileName)
Definition: FileMenus.cpp:104
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:427
AudacityProject & project
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
void FileActions::Handler::OnImportRaw ( const CommandContext context)
inline

Definition at line 495 of file FileMenus.cpp.

References _(), AudacityProject::AddImportedTracks(), AudacityProject::GetTrackFactory(), AudacityProject::HandleResize(), ImportRaw(), FileNames::Open, CommandContext::project, and FileNames::SelectFile().

496 {
497  auto &project = context.project;
498  auto trackFactory = project.GetTrackFactory();
499 
500  wxString fileName =
502  _("Select any uncompressed audio file"),
503  wxEmptyString, // Path
504  wxT(""), // Name
505  wxT(""), // Extension
506  _("All files|*"),
507  wxRESIZE_BORDER, // Flags
508  &project); // Parent
509 
510  if (fileName == wxT(""))
511  return;
512 
513  TrackHolders newTracks;
514 
515  ::ImportRaw(&project, fileName, trackFactory, newTracks);
516 
517  if (newTracks.size() <= 0)
518  return;
519 
520  project.AddImportedTracks(fileName, std::move(newTracks));
521  project.HandleResize(); // Adjust scrollers for NEW track sizes.
522 }
static wxString SelectFile(Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
Definition: FileNames.cpp:427
AudacityProject & project
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
std::vector< NewChannelGroup > TrackHolders
Definition: ImportRaw.h:27
void ImportRaw(wxWindow *parent, const wxString &fileName, TrackFactory *trackFactory, TrackHolders &outTracks)
Definition: ImportRaw.cpp:101
TrackFactory * GetTrackFactory()
Definition: Project.cpp:1513
void FileActions::Handler::OnNew ( const CommandContext )
inline

Definition at line 144 of file FileMenus.cpp.

References CreateNewAudacityProject().

145 {
147 }
AudacityProject * CreateNewAudacityProject()
Definition: Project.cpp:552
void FileActions::Handler::OnOpen ( const CommandContext context)
inline

Definition at line 149 of file FileMenus.cpp.

References AudacityProject::OpenFiles(), and CommandContext::project.

150 {
151  auto &project = context.project;
152  AudacityProject::OpenFiles(&project);
153 }
AudacityProject & project
static void OpenFiles(AudacityProject *proj)
Definition: Project.cpp:2876
void FileActions::Handler::OnPageSetup ( const CommandContext context)
inline

Definition at line 524 of file FileMenus.cpp.

References HandlePageSetup(), and CommandContext::project.

525 {
526  auto &project = context.project;
527  HandlePageSetup(&project);
528 }
void HandlePageSetup(wxWindow *parent)
Definition: Printing.cpp:139
AudacityProject & project
void FileActions::Handler::OnPrint ( const CommandContext context)
inline

Definition at line 530 of file FileMenus.cpp.

References AudacityProject::GetName(), AudacityProject::GetTrackPanel(), AudacityProject::GetTracks(), HandlePrint(), name, and CommandContext::project.

531 {
532  auto &project = context.project;
533  auto name = project.GetName();
534  auto tracks = project.GetTracks();
535  HandlePrint(&project, name, tracks, *project.GetTrackPanel());
536 }
void HandlePrint(wxWindow *parent, const wxString &name, TrackList *tracks, TrackPanel &panel)
Definition: Printing.cpp:149
AudacityProject & project
const wxChar * name
Definition: Distortion.cpp:94
void FileActions::Handler::OnProjectReset ( const CommandContext context)
inline

Definition at line 160 of file FileMenus.cpp.

References CommandContext::project, and AudacityProject::ResetProjectToEmpty().

161 {
162  auto &project = context.project;
163  project.ResetProjectToEmpty();
164 }
AudacityProject & project
void ResetProjectToEmpty()
Definition: Project.cpp:5398
void FileActions::Handler::OnSave ( const CommandContext context)
inline

Definition at line 173 of file FileMenus.cpp.

References CommandContext::project, and AudacityProject::Save().

174 {
175  auto &project = context.project;
176  project.Save();
177 }
AudacityProject & project
void FileActions::Handler::OnSaveAs ( const CommandContext context)
inline

Definition at line 179 of file FileMenus.cpp.

References CommandContext::project, and AudacityProject::SaveAs().

180 {
181  auto &project = context.project;
182  project.SaveAs();
183 }
AudacityProject & project
bool SaveAs(bool bWantSaveCopy=false, bool bLossless=false)
Definition: Project.cpp:4422
void FileActions::Handler::OnSaveCompressed ( const CommandContext context)
inline

Definition at line 192 of file FileMenus.cpp.

References CommandContext::project, and AudacityProject::SaveAs().

193 {
194  auto &project = context.project;
195  project.SaveAs(true);
196 }
AudacityProject & project
bool SaveAs(bool bWantSaveCopy=false, bool bLossless=false)
Definition: Project.cpp:4422
void FileActions::Handler::OnSaveCopy ( const CommandContext context)
inline

Definition at line 185 of file FileMenus.cpp.

References CommandContext::project, and AudacityProject::SaveAs().

186 {
187  auto &project = context.project;
188  project.SaveAs(true, true);
189 }
AudacityProject & project
bool SaveAs(bool bWantSaveCopy=false, bool bLossless=false)
Definition: Project.cpp:4422

The documentation for this struct was generated from the following file: