Audacity 3.2.0
Public Types | Public Attributes | List of all members
FileNames Class Reference

Provides Static functions to yield filenames. More...

Public Types

enum class  Operation {
  _None , Temp , Presets , Open ,
  Save , Import , Export , MacrosOut
}
 
enum class  PathType { _None , User , LastUsed }
 
using FileTypes = std::vector< FileType >
 

Public Attributes

FILES_API const FileType AllFiles { XO("All files"), { wxT("") } }
 
FILES_API const FileType AudacityProjects { XO("AUP3 project files"), { wxT("aup3") }, true }
 
FILES_API const FileType DynamicLibraries
 
FILES_API const FileType TextFiles { XO("Text files"), { wxT("txt") }, true }
 
FILES_API const FileType XMLFiles { XO("XML files"), { wxT("xml"), wxT("XML") }, true }
 

Detailed Description

Provides Static functions to yield filenames.

This class helps us with setting a base path, and makes it easier for us to keep track of the different kinds of files we read and write from.

JKC: In time I plan to add all file names and file extensions used throughout Audacity into this one place.

Member Typedef Documentation

◆ FileTypes

using FileNames::FileTypes = std::vector< FileType >

Definition at line 76 of file FileNames.h.

Member Enumeration Documentation

◆ Operation

enum class FileNames::Operation
strong
Enumerator
_None 
Temp 
Presets 
Open 
Save 
Import 
Export 
MacrosOut 

Definition at line 148 of file FileNames.h.

148 {
149 // _ on None to defeat some macro that is expanding this.
150 _None,
151
152 // These do not have a specific pathtype
153 Temp,
154 Presets,
155
156 // These have default/lastused pathtypes
157 Open,
158 Save,
159 Import,
160 Export,
161 MacrosOut
162 };
Main class to control the export function.

◆ PathType

enum class FileNames::PathType
strong
Enumerator
_None 
User 
LastUsed 

Definition at line 164 of file FileNames.h.

164 {
165 // _ on None to defeat some macro that is expanding this.
166 _None,
167 User,
168 LastUsed
169 };

Member Data Documentation

◆ AllFiles

const FileNames::FileType FileNames::AllFiles { XO("All files"), { wxT("") } }

◆ AudacityProjects

const FileNames::FileType FileNames::AudacityProjects { XO("AUP3 project files"), { wxT("aup3") }, true }

◆ DynamicLibraries

const FileNames::FileType FileNames::DynamicLibraries
Initial value:
{
XO("Dynamically Linked Libraries"), { wxT("dll") }, true
}
#define XO(s)
Definition: Internat.h:31

Definition at line 72 of file FileNames.h.

Referenced by MP3Exporter::GetLibraryTypes(), and FindFFmpegDialog::OnBrowse().

◆ TextFiles

const FileNames::FileType FileNames::TextFiles { XO("Text files"), { wxT("txt") }, true }

◆ XMLFiles

const FileNames::FileType FileNames::XMLFiles { XO("XML files"), { wxT("xml"), wxT("XML") }, true }

The documentation for this class was generated from the following files: