Code::Blocks  SVN r11506
recentitemslist.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
3  * http://www.gnu.org/licenses/gpl-3.0.html
4  */
5 #ifndef _RECENT_ITEMS_LIST_H_
6 #define _RECENT_ITEMS_LIST_H_
7 
8 class wxFileHistory;
9 
11 {
12  public:
13  RecentItemsList(const wxString &menuName, const wxString &configPath, int menuID, int firstMenuItemID);
14  void AddToHistory(const wxString& FileName);
15 
16  void AskToRemoveFileFromHistory(size_t id, bool cannot_open = true);
17  wxString GetHistoryFile(size_t id) const;
18 
19  void ClearHistory();
20 
21  void Initialize();
22  void TerminateHistory();
23 
24  const wxFileHistory* GetFileHistory() const { return m_list; }
25  bool Empty() const { return !m_list || m_list->GetCount() == 0; }
26  private:
27  void BuildMenu(wxMenu *menu);
28  void ClearMenu(wxMenu *menu);
29  wxMenu* GetMenu();
30  void RefreshStartHerePage();
31  private:
35 };
36 
37 #endif // _RECENT_ITEMS_LIST_H_
void ClearMenu(wxMenu *menu)
virtual size_t GetCount() const
void BuildMenu(wxMenu *menu)
wxString m_configPath
bool Empty() const
const wxFileHistory * GetFileHistory() const
RecentItemsList(const wxString &menuName, const wxString &configPath, int menuID, int firstMenuItemID)
void AskToRemoveFileFromHistory(size_t id, bool cannot_open=true)
wxString GetHistoryFile(size_t id) const
void AddToHistory(const wxString &FileName)
wxFileHistory * m_list