![]() |
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 (audacity::BasicSettings &config, const wxString &group=wxEmptyString) |
| void | Save (audacity::BasicSettings &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 29 of file FileHistory.h.
| using FileHistory::const_iterator = FilePaths::const_iterator |
Definition at line 59 of file FileHistory.h.
| anonymous enum |
| Enumerator | |
|---|---|
| ID_RECENT_CLEAR | |
| ID_RECENT_FIRST | |
| ID_RECENT_LAST | |
Definition at line 38 of file FileHistory.h.
| FileHistory::FileHistory | ( | size_t | maxfiles = 12, |
| wxWindowID | idbase = wxID_FILE |
||
| ) |
Definition at line 29 of file FileHistory.cpp.
|
virtual |
Definition at line 35 of file FileHistory.cpp.
|
delete |
|
private |
Definition at line 53 of file FileHistory.cpp.
References wxArrayStringEx::insert(), mHistory, mMaxFiles, and NotifyMenus().
Referenced by Load().
|
inline |
Definition at line 46 of file FileHistory.h.
Referenced by anonymous_namespace{FileMenus.cpp}::DoExport(), ProjectFileManager::DoImport(), anonymous_namespace{ImportMIDI.cpp}::DoImportMIDI(), ProjectFileManager::OpenProjectFile(), ExportOptionsCLEditor::PopulateUI(), ProjectFileManager::SaveAs(), ProjectFileManager::SaveFromTimerRecording(), and ExportOptionsCLEditor::TransferDataFromWindow().
|
inline |
Definition at line 60 of file FileHistory.h.
Referenced by ExportOptionsCLEditor::PopulateUI().
| void FileHistory::Clear | ( | ) |
Definition at line 92 of file FileHistory.cpp.
References mHistory, and NotifyMenus().
Referenced by AudacityApp::OnMRUClear().
|
private |
Definition at line 171 of file FileHistory.cpp.
Referenced by NotifyMenus(), and UseMenu().
|
inline |
Definition at line 63 of file FileHistory.h.
Referenced by ExportOptionsCLEditor::PopulateUI().
|
inline |
Definition at line 61 of file FileHistory.h.
Referenced by Compress(), NotifyMenu(), ExportOptionsCLEditor::PopulateUI(), and UseMenu().
|
static |
Definition at line 39 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(), ProjectFileManager::DoImport(), anonymous_namespace{ImportMIDI.cpp}::DoImportMIDI(), anonymous_namespace{FileMenus.cpp}::FileMenu(), AudacityApp::InitPart2(), AudacityApp::OnExit(), AudacityApp::OnMRUClear(), AudacityApp::OnMRUFile(), ProjectFileManager::OpenProjectFile(), ProjectFileManager::SaveAs(), and ProjectFileManager::SaveFromTimerRecording().
| void FileHistory::Load | ( | audacity::BasicSettings & | config, |
| const wxString & | group = wxEmptyString |
||
| ) |
Definition at line 116 of file FileHistory.cpp.
References AddFileToHistory(), key, mGroup, mHistory, NotifyMenus(), and settings().
Referenced by ExportOptionsCLEditor::PopulateUI().
|
private |
Definition at line 152 of file FileHistory.cpp.
References _, end(), mHistory, and mIDBase.
Referenced by NotifyMenus(), and UseMenu().
|
private |
Definition at line 143 of file FileHistory.cpp.
References Compress(), gPrefs, mMenus, NotifyMenu(), and Save().
Referenced by AddFileToHistory(), Clear(), Load(), and Remove().
|
delete |
|
inline |
Definition at line 62 of file FileHistory.h.
| void FileHistory::Remove | ( | size_t | i | ) |
Definition at line 81 of file FileHistory.cpp.
References mHistory, and NotifyMenus().
| void FileHistory::Save | ( | audacity::BasicSettings & | config | ) |
Definition at line 130 of file FileHistory.cpp.
References mGroup, mHistory, settings(), and wxT().
Referenced by NotifyMenus(), AudacityApp::OnExit(), and ExportOptionsCLEditor::TransferDataFromWindow().
| void FileHistory::UseMenu | ( | wxMenu * | menu | ) |
Definition at line 99 of file FileHistory.cpp.
References Compress(), end(), mMenus, and NotifyMenu().
|
private |
Definition at line 78 of file FileHistory.h.
|
private |
Definition at line 76 of file FileHistory.h.
Referenced by AddFileToHistory(), Clear(), Load(), NotifyMenu(), Remove(), and Save().
|
private |
Definition at line 73 of file FileHistory.h.
Referenced by FileHistory(), and NotifyMenu().
|
private |
Definition at line 72 of file FileHistory.h.
Referenced by AddFileToHistory(), and FileHistory().
|
private |
Definition at line 75 of file FileHistory.h.
Referenced by Compress(), NotifyMenus(), and UseMenu().