Audacity  2.2.0
AudacityApp Class Referencefinal

AudacityApp is the 'main' class for Audacity. More...

#include <AudacityApp.h>

Inheritance diagram for AudacityApp:

Public Member Functions

 AudacityApp ()
 ~AudacityApp ()
bool OnInit (void) override
int OnExit (void) override
void OnFatalException () override
bool OnExceptionInMainLoop () override
int FilterEvent (wxEvent &event)
wxString InitLang (const wxString &lang)
void OnMenuAbout (wxCommandEvent &event)
void OnMenuNew (wxCommandEvent &event)
void OnMenuOpen (wxCommandEvent &event)
void OnMenuPreferences (wxCommandEvent &event)
void OnMenuExit (wxCommandEvent &event)
void OnQueryEndSession (wxCloseEvent &event)
void OnEndSession (wxCloseEvent &event)
void OnMRUClear (wxCommandEvent &event)
void OnMRUFile (wxCommandEvent &event)
bool MRUOpen (const wxString &fileName)
bool SafeMRUOpen (const wxString &fileName)
void OnReceiveCommand (AppCommandEvent &event)
void OnKeyDown (wxKeyEvent &event)
void OnTimer (wxTimerEvent &event)
void OnServerEvent (wxSocketEvent &evt)
void OnSocketEvent (wxSocketEvent &evt)
void MarkAliasedFilesMissingWarning (const AliasBlockFile *b)
 Mark playback as having missing aliased blockfiles. More...
void SetMissingAliasedFileWarningShouldShow (bool b)
 Changes the behavior of missing aliased blockfiles warnings. More...
bool ShouldShowMissingAliasedFileWarning ()
 Returns true if the user should be notified of missing alias warnings. More...
FileHistoryGetRecentFiles ()
void AddFileToHistory (const wxString &name)
bool GetWindowRectAlreadySaved () const
void SetWindowRectAlreadySaved (bool alreadySaved)
AudacityLoggerGetLogger ()

Static Public Member Functions

static void AddUniquePathToPathList (const wxString &path, wxArrayString &pathList)
static void AddMultiPathsToPathList (const wxString &multiPathString, wxArrayString &pathList)
static void FindFilesInPathList (const wxString &pattern, const wxArrayString &pathList, wxArrayString &results, int flags=wxDIR_FILES)
static bool IsTempDirectoryNameOK (const wxString &Name)

Public Attributes

wxArrayString audacityPathList
 A list of directories that should be searched for Audacity files (plug-ins, help files, etc.). More...
wxString defaultTempDir
 Default temp directory. More...

Private Member Functions

void InitCommandHandler ()
bool InitTempDir ()
bool CreateSingleInstanceChecker (const wxString &dir)
std::unique_ptr< wxCmdLineParser > ParseCommandLine ()

Private Attributes

std::unique_ptr< CommandHandlermCmdHandler
std::unique_ptr< FileHistorymRecentFiles
std::unique_ptr< wxLocale > mLocale
< wxSingleInstanceChecker > 
wxTimer mTimer
bool m_aliasMissingWarningShouldShow
std::weak_ptr< AudacityProjectm_LastMissingBlockFileProject
wxString m_LastMissingBlockFilePath
ODLock m_LastMissingBlockFileLock
bool mWindowRectAlreadySaved
std::unique_ptr< wxSocketServer > mIPCServ

Detailed Description

AudacityApp is the 'main' class for Audacity.

It handles initialization and termination by subclassing wxApp.

Constructor & Destructor Documentation

AudacityApp::AudacityApp ( )
AudacityApp::~AudacityApp ( )

Member Function Documentation

void AudacityApp::AddMultiPathsToPathList ( const wxString &  multiPathString,
wxArrayString &  pathList 
void AudacityApp::AddUniquePathToPathList ( const wxString &  path,
wxArrayString &  pathList 
bool AudacityApp::CreateSingleInstanceChecker ( const wxString &  dir)
int AudacityApp::FilterEvent ( wxEvent &  event)
void AudacityApp::FindFilesInPathList ( const wxString &  pattern,
const wxArrayString &  pathList,
wxArrayString &  results,
int  flags = wxDIR_FILES 
AudacityLogger * AudacityApp::GetLogger ( )
bool AudacityApp::GetWindowRectAlreadySaved ( ) const
void AudacityApp::InitCommandHandler ( )

References mCmdHandler.

Referenced by OnInit().

wxString AudacityApp::InitLang ( const wxString &  lang)
bool AudacityApp::IsTempDirectoryNameOK ( const wxString &  Name)
void AudacityApp::MarkAliasedFilesMissingWarning ( const AliasBlockFile b)

Mark playback as having missing aliased blockfiles.

Playback will continue, but the missing files will be silenced ShouldShowMissingAliasedFileWarning can be called to determine if the user should be notified

References gAudacityProjects, AliasBlockFile::GetAliasedFileName(), m_LastMissingBlockFileLock, m_LastMissingBlockFilePath, and m_LastMissingBlockFileProject.

Referenced by BlockFile::CommonReadData(), and SetMissingAliasedFileWarningShouldShow().

void AudacityApp::OnEndSession ( wxCloseEvent &  event)

References gAudacityProjects, and gIsQuitting.

Referenced by OnQueryEndSession().

bool AudacityApp::OnExceptionInMainLoop ( )
void AudacityApp::OnFatalException ( )
void AudacityApp::OnKeyDown ( wxKeyEvent &  event)
void AudacityApp::OnMenuAbout ( wxCommandEvent &  event)
void AudacityApp::OnMenuExit ( wxCommandEvent &  event)
void AudacityApp::OnMenuNew ( wxCommandEvent &  event)
void AudacityApp::OnMenuOpen ( wxCommandEvent &  event)
void AudacityApp::OnMenuPreferences ( wxCommandEvent &  event)
void AudacityApp::OnMRUClear ( wxCommandEvent &  event)

References mRecentFiles.

void AudacityApp::OnMRUFile ( wxCommandEvent &  event)
void AudacityApp::OnQueryEndSession ( wxCloseEvent &  event)

References OnEndSession().

void AudacityApp::OnReceiveCommand ( AppCommandEvent event)

References mCmdHandler.

void AudacityApp::OnServerEvent ( wxSocketEvent &  evt)
void AudacityApp::OnSocketEvent ( wxSocketEvent &  evt)
std::unique_ptr< wxCmdLineParser > AudacityApp::ParseCommandLine ( )

References _().

Referenced by CreateSingleInstanceChecker(), and OnInit().

bool AudacityApp::SafeMRUOpen ( const wxString &  fileName)

References MRUOpen().

Referenced by OnInit(), and OnTimer().

void AudacityApp::SetWindowRectAlreadySaved ( bool  alreadySaved)
bool AudacityApp::ShouldShowMissingAliasedFileWarning ( )

Returns true if the user should be notified of missing alias warnings.

References m_aliasMissingWarningShouldShow, m_LastMissingBlockFileLock, and m_LastMissingBlockFileProject.

Referenced by OnTimer().

Member Data Documentation

wxArrayString AudacityApp::audacityPathList

A list of directories that should be searched for Audacity files (plug-ins, help files, etc.).

On Unix this will include the directory Audacity was installed into, plus the current user's .audacity-data/Plug-Ins directory. Additional directories can be specified using the AUDACITY_PATH environment variable. On Windows or Mac OS, this will include the directory which contains the Audacity program.

Referenced by GetLanguages(), NyquistEffect::GetNyquistSearchPath(), NyquistEffectsModule::Initialize(), ModuleManager::Initialize(), InitLang(), and OnInit().

wxString AudacityApp::defaultTempDir

Default temp directory.

Referenced by InitTempDir(), DirectoriesPrefs::OnChooseTempDir(), and OnInit().

bool AudacityApp::m_aliasMissingWarningShouldShow
ODLock AudacityApp::m_LastMissingBlockFileLock
wxString AudacityApp::m_LastMissingBlockFilePath
std::weak_ptr< AudacityProject > AudacityApp::m_LastMissingBlockFileProject
std::unique_ptr<wxSingleInstanceChecker> AudacityApp::mChecker
std::unique_ptr<CommandHandler> AudacityApp::mCmdHandler
std::unique_ptr<wxSocketServer> AudacityApp::mIPCServ
std::unique_ptr<wxLocale> AudacityApp::mLocale

Referenced by InitLang(), and OnInit().

std::unique_ptr<FileHistory> AudacityApp::mRecentFiles
wxTimer AudacityApp::mTimer

Referenced by OnInit().

bool AudacityApp::mWindowRectAlreadySaved

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