139{
140 auto &project = context.
project;
142
143 wxString fileName =
SelectFile(FileNames::Operation::Open,
144 XO(
"Select a MIDI file"),
145 wxEmptyString,
148 {
149 {
XO(
"MIDI and Allegro files"),
150 {
wxT(
"mid"),
wxT(
"midi"),
wxT(
"gro"), },
true },
152 {
wxT(
"mid"),
wxT(
"midi"), },
true },
153 {
XO(
"Allegro files"),
154 {
wxT(
"gro"), },
true },
156 },
157 wxRESIZE_BORDER,
158 &window);
159
160 if (!fileName.empty())
162}
bool DoImportMIDI(AudacityProject &project, const FilePath &fileName)
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)
AudacityProject & project
FILES_API const FileType AllFiles