Audacity  3.0.3
Functions
SelectFile.cpp File Reference
#include "SelectFile.h"
#include "FileNames.h"
#include "widgets/FileDialog/FileDialog.h"
#include "widgets/AudacityMessageBox.h"
Include dependency graph for SelectFile.cpp:

Go to the source code of this file.

Functions

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)
 

Detailed Description


Audacity: A Digital Audio Editor

Paul Licameli split from FileNames.cpp

Definition in file SelectFile.cpp.

Function Documentation

◆ SelectFile()

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 at line 17 of file SelectFile.cpp.

25 {
26  return WithDefaultPath(op, default_path, [&](const FilePath &path) {
27  wxString filter;
28  if ( !default_extension.empty() )
29  filter = wxT("*.") + default_extension;
30  return FileSelector(
31  message.Translation(), path, default_filename, filter,
32  FormatWildcard( fileTypes ),
33  flags, parent, wxDefaultCoord, wxDefaultCoord);
34  });
35 }

References FileSelector(), FileNames::FormatWildcard(), TranslatableString::Translation(), and FileNames::WithDefaultPath().

Referenced by AudioUnitEffect::ExportPresets(), Effect::ExportPresets(), VSTEffect::ExportPresets(), AudioUnitEffect::ImportPresets(), Effect::ImportPresets(), VSTEffect::ImportPresets(), TimerRecordDialog::OnAutoSavePathButton_Click(), ExportCLOptions::OnBrowse(), FindDialog::OnBrowse(), FindFFmpegDialog::OnBrowse(), KeyConfigPrefs::OnExport(), ContrastDialog::OnExport(), FrequencyPlotDialog::OnExport(), LabelDialog::OnExport(), FileActions::Handler::OnExportLabels(), FileActions::Handler::OnExportMIDI(), KeyConfigPrefs::OnImport(), LabelDialog::OnImport(), FileActions::Handler::OnImportLabels(), FileActions::Handler::OnImportMIDI(), TagsEditorDialog::OnLoad(), BenchmarkDialog::OnSave(), TagsEditorDialog::OnSave(), anonymous_namespace{LogWindow.cpp}::OnSave(), MacroCommands::ReadMacro(), ProjectFileManager::SaveAs(), ProjectFileManager::SaveCopy(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), and MacroCommands::WriteMacro().

Here is the call graph for this function:
Here is the caller graph for this function:
FileSelector
wxString FileSelector(const wxString &title, const wxString &defaultDir, const wxString &defaultFileName, const wxString &defaultExtension, const wxString &filter, int flags, wxWindow *parent, int x, int y)
Definition: FileDialog.cpp:61
FileNames::WithDefaultPath
FilePath WithDefaultPath(Operation op, const FilePath &defaultPath, F function)
Definition: FileNames.h:185
FilePath
wxString FilePath
Definition: Project.h:20
TranslatableString::Translation
wxString Translation() const
Definition: TranslatableString.h:79
FileNames::FormatWildcard
FILES_API wxString FormatWildcard(const FileTypes &fileTypes)