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 164 of file FileNames.h.

164 {
165 // _ on None to defeat some macro that is expanding this.
166 _None,
167
168 // These do not have a specific pathtype
169 Temp,
170 Presets,
171
172 // These have default/lastused pathtypes
173 Open,
174 Save,
175 Import,
176 Export,
177 MacrosOut
178 };
Main class to control the export function.

◆ PathType

enum class FileNames::PathType
strong
Enumerator
_None 
User 
LastUsed 

Definition at line 180 of file FileNames.h.

180 {
181 // _ on None to defeat some macro that is expanding this.
182 _None,
183 User,
184 LastUsed
185 };

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
}
wxT("CloseDown"))
#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: