![]() |
Audacity 3.2.0
|
Similar to wxFileHistory, but customized to our needs. More...
#include <FileHistory.h>
Public Types | |
enum | { ID_RECENT_CLEAR = 6100 , ID_RECENT_FIRST = 6101 , ID_RECENT_LAST = 6112 } |
using | const_iterator = FilePaths::const_iterator |
Public Member Functions | |
FileHistory (size_t maxfiles=12, wxWindowID idbase=wxID_FILE) | |
virtual | ~FileHistory () |
FileHistory (const FileHistory &)=delete | |
FileHistory & | operator= (const FileHistory &)=delete |
void | Append (const FilePath &file) |
void | Remove (size_t i) |
void | Clear () |
void | UseMenu (wxMenu *menu) |
void | Load (wxConfigBase &config, const wxString &group=wxEmptyString) |
void | Save (wxConfigBase &config) |
const_iterator | begin () const |
const_iterator | end () const |
const FilePath & | operator[] (size_t ii) const |
bool | empty () const |
Static Public Member Functions | |
static FileHistory & | Global () |
Private Member Functions | |
void | AddFileToHistory (const FilePath &file, bool update) |
void | NotifyMenus () |
void | NotifyMenu (wxMenu *menu) |
void | Compress () |
Private Attributes | |
size_t | mMaxFiles |
wxWindowID | mIDBase |
std::vector< wxWeakRef< wxMenu > > | mMenus |
FilePaths | mHistory |
wxString | mGroup |
Similar to wxFileHistory, but customized to our needs.
Definition at line 25 of file FileHistory.h.
using FileHistory::const_iterator = FilePaths::const_iterator |
Definition at line 55 of file FileHistory.h.
anonymous enum |
Enumerator | |
---|---|
ID_RECENT_CLEAR | |
ID_RECENT_FIRST | |
ID_RECENT_LAST |
Definition at line 34 of file FileHistory.h.
FileHistory::FileHistory | ( | size_t | maxfiles = 12 , |
wxWindowID | idbase = wxID_FILE |
||
) |
Definition at line 27 of file FileHistory.cpp.
|
virtual |
Definition at line 33 of file FileHistory.cpp.
|
delete |
|
private |
Definition at line 51 of file FileHistory.cpp.
References wxArrayStringEx::insert(), mHistory, mMaxFiles, and NotifyMenus().
Referenced by Load().
|
inline |
Definition at line 42 of file FileHistory.h.
Referenced by anonymous_namespace{FileMenus.cpp}::DoExport(), DoImportMIDI(), ProjectFileManager::Import(), ProjectFileManager::OpenProjectFile(), ProjectFileManager::SaveAs(), ProjectFileManager::SaveFromTimerRecording(), and ExportCLOptions::TransferDataFromWindow().
|
inline |
Definition at line 56 of file FileHistory.h.
Referenced by ExportCLOptions::PopulateOrExchange().
void FileHistory::Clear | ( | ) |
Definition at line 90 of file FileHistory.cpp.
References mHistory, and NotifyMenus().
Referenced by AudacityApp::OnMRUClear().
|
private |
Definition at line 181 of file FileHistory.cpp.
Referenced by NotifyMenus(), and UseMenu().
|
inline |
Definition at line 59 of file FileHistory.h.
|
inline |
Definition at line 57 of file FileHistory.h.
Referenced by Compress(), NotifyMenu(), ExportCLOptions::PopulateOrExchange(), and UseMenu().
|
static |
Definition at line 37 of file FileHistory.cpp.
References flag, gPrefs, ID_RECENT_CLEAR, ID_RECENT_FIRST, ID_RECENT_LAST, and wxT().
Referenced by anonymous_namespace{FileMenus.cpp}::DoExport(), DoImportMIDI(), anonymous_namespace{FileMenus.cpp}::FileMenu(), ProjectFileManager::Import(), AudacityApp::InitPart2(), AudacityApp::OnExit(), AudacityApp::OnMRUClear(), AudacityApp::OnMRUFile(), ProjectFileManager::OpenProjectFile(), ProjectFileManager::SaveAs(), and ProjectFileManager::SaveFromTimerRecording().
void FileHistory::Load | ( | wxConfigBase & | config, |
const wxString & | group = wxEmptyString |
||
) |
Definition at line 114 of file FileHistory.cpp.
References AddFileToHistory(), mGroup, mHistory, NotifyMenus(), and wxT().
|
private |
Definition at line 162 of file FileHistory.cpp.
References _, end(), mHistory, and mIDBase.
Referenced by NotifyMenus(), and UseMenu().
|
private |
Definition at line 153 of file FileHistory.cpp.
References Compress(), gPrefs, mMenus, NotifyMenu(), and Save().
Referenced by AddFileToHistory(), Clear(), Load(), and Remove().
|
delete |
|
inline |
Definition at line 58 of file FileHistory.h.
void FileHistory::Remove | ( | size_t | i | ) |
Definition at line 79 of file FileHistory.cpp.
References mHistory, and NotifyMenus().
void FileHistory::Save | ( | wxConfigBase & | config | ) |
Definition at line 136 of file FileHistory.cpp.
References mGroup, mHistory, and wxT().
Referenced by NotifyMenus(), AudacityApp::OnExit(), and ExportCLOptions::TransferDataFromWindow().
void FileHistory::UseMenu | ( | wxMenu * | menu | ) |
Definition at line 97 of file FileHistory.cpp.
References Compress(), end(), mMenus, and NotifyMenu().
|
private |
Definition at line 74 of file FileHistory.h.
|
private |
Definition at line 72 of file FileHistory.h.
Referenced by AddFileToHistory(), Clear(), Load(), NotifyMenu(), Remove(), and Save().
|
private |
Definition at line 69 of file FileHistory.h.
Referenced by FileHistory(), and NotifyMenu().
|
private |
Definition at line 68 of file FileHistory.h.
Referenced by AddFileToHistory(), and FileHistory().
|
private |
Definition at line 71 of file FileHistory.h.
Referenced by Compress(), NotifyMenus(), and UseMenu().