Audacity 3.2.0
Classes | Macros | Functions | Variables
ImportLOF.cpp File Reference
#include <wx/textfile.h>
#include <wx/tokenzr.h>
#include "ImportMIDI.h"
#include "FileNames.h"
#include "../WaveTrack.h"
#include "ImportPlugin.h"
#include "Import.h"
#include "Project.h"
#include "ProjectHistory.h"
#include "../ProjectManager.h"
#include "../ProjectWindow.h"
#include "../ProjectWindows.h"
#include "Prefs.h"
#include "../widgets/AudacityMessageBox.h"
#include "../widgets/ProgressDialog.h"
Include dependency graph for ImportLOF.cpp:

Go to the source code of this file.

Classes

class  LOFImportPlugin
 An ImportPlugin for LOF data. More...
 
class  LOFImportFileHandle
 An ImportFileHandle for LOF data. More...
 

Macros

#define BINARY_FILE_CHECK_BUFFER_SIZE   1024
 
#define DESC   XO("List of Files in basic text format")
 

Functions

static AudacityProjectDoImportMIDIProject (AudacityProject *pProject, const FilePath &fileName)
 

Variables

static const auto exts
 
static Importer::RegisteredImportPlugin registered
 

Macro Definition Documentation

◆ BINARY_FILE_CHECK_BUFFER_SIZE

#define BINARY_FILE_CHECK_BUFFER_SIZE   1024

Definition at line 93 of file ImportLOF.cpp.

◆ DESC

#define DESC   XO("List of Files in basic text format")

Definition at line 95 of file ImportLOF.cpp.

Function Documentation

◆ DoImportMIDIProject()

static AudacityProject * DoImportMIDIProject ( AudacityProject pProject,
const FilePath fileName 
)
static

Definition at line 322 of file ImportLOF.cpp.

324{
325 AudacityProject *pNewProject {};
326 if ( !pProject )
327 pProject = pNewProject = ProjectManager::New();
328 auto cleanup = finally( [&]
329 { if ( pNewProject ) GetProjectFrame( *pNewProject ).Close(true); } );
330
331 if ( DoImportMIDI( *pProject, fileName ) ) {
332 pNewProject = nullptr;
333 return pProject;
334 }
335 else
336 return nullptr;
337}
bool DoImportMIDI(AudacityProject &project, const FilePath &fileName)
Definition: ImportMIDI.cpp:39
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 ...
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static AudacityProject * New()

References DoImportMIDI(), GetProjectFrame(), and ProjectManager::New().

Referenced by LOFImportFileHandle::lofOpenFiles().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ exts

const auto exts
static
Initial value:
= {
wxT("lof")
}
wxT("CloseDown"))

Definition at line 97 of file ImportLOF.cpp.

◆ registered

Initial value:
{ "LOF",
std::make_unique< LOFImportPlugin >()
}

Definition at line 315 of file ImportLOF.cpp.