ToolMap
Loading...
Searching...
No Matches
menumanager.h
Go to the documentation of this file.
1/***************************************************************************
2 menumanager.h
3 Deals with menu activities (enable / disable)
4 -------------------
5 copyright : (C) 2007 CREALP Lucien Schreiber
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17/***************************************************************************/
26#ifndef _MENUMANAGER_H_
27#define _MENUMANAGER_H_
28
29// For compilers that support precompilation, includes "wx/wx.h".
30#include <wx/wxprec.h>
31
32// Include wxWidgets' headers
33#ifndef WX_PRECOMP
34#include <wx/wx.h>
35#endif
36
37#include <wx/docview.h> // for recent documents
38#include <wx/fileconf.h> // for using file config even on windows
39
40#include "../core/toolmap.h"
41
42/***************************************************************************/
47class MenuManager : public wxObject {
48 private:
49 wxMenuBar* m_MenuBar;
50 wxFileHistory* m_pFilesHistory;
51 DECLARE_CLASS(MenuManager);
52
53 public:
54 MenuManager(wxMenuBar* menubar);
55
57
58 // deals with recent files
60
62
63 void AddFileToRecent(const wxString& spath);
64
65 void RemoveFileFromRecent(int fileid);
66
67 bool GetRecentFile(wxString& filepath, int fileid);
68};
69
70#endif
Deals with Recent files.
Definition menumanager.h:47
bool GetRecentFile(wxString &filepath, int fileid)
Get a path from the recent file menu.
Definition menumanager.cpp:146
void RemoveFileFromRecent(int fileid)
Remove an item from the recent files menu.
Definition menumanager.cpp:122
~MenuManager()
Destructor.
Definition menumanager.cpp:48
void TerminateRecentFilesHistory()
Uninit the Recent files.
Definition menumanager.cpp:86
void InitializeRecentFilesHistory()
Init the Recent files.
Definition menumanager.cpp:59
void AddFileToRecent(const wxString &spath)
Add a path to the recent file menu.
Definition menumanager.cpp:109