Audacity  3.0.3
Classes | Macros | Functions | Variables
ImportLOF.cpp File Reference
#include <wx/string.h>
#include <wx/utils.h>
#include <wx/intl.h>
#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 96 of file ImportLOF.cpp.

◆ DESC

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

Definition at line 98 of file ImportLOF.cpp.

Function Documentation

◆ DoImportMIDIProject()

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

Definition at line 325 of file ImportLOF.cpp.

327 {
328  AudacityProject *pNewProject {};
329  if ( !pProject )
330  pProject = pNewProject = ProjectManager::New();
331  auto cleanup = finally( [&]
332  { if ( pNewProject ) GetProjectFrame( *pNewProject ).Close(true); } );
333 
334  if ( DoImportMIDI( *pProject, fileName ) ) {
335  pNewProject = nullptr;
336  return pProject;
337  }
338  else
339  return nullptr;
340 }

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")
}

Definition at line 100 of file ImportLOF.cpp.

◆ registered

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

Definition at line 318 of file ImportLOF.cpp.

ProjectManager::New
static AudacityProject * New()
Definition: ProjectManager.cpp:529
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
GetProjectFrame
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 ...
Definition: ProjectWindows.cpp:72
DoImportMIDI
bool DoImportMIDI(AudacityProject &project, const FilePath &fileName)
Definition: ImportMIDI.cpp:37