Code::Blocks  SVN r11506
menuitemsmanager.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef MENUITEMSMANAGER_H
7 #define MENUITEMSMANAGER_H
8 
9 #include "settings.h"
10 #include <wx/menu.h>
11 
12 WX_DEFINE_ARRAY(wxMenuItem*, MenuItemsList);
13 
29 {
30  public:
31  MenuItemsManager(bool autoClearOnDestroy = true);
32  virtual ~MenuItemsManager();
33 
34  virtual int CreateFromString(const wxString& menuPath, int id);
35 
36  virtual wxMenuItem* Add(wxMenu* parent, int id, const wxString& caption, const wxString& helptext);
37  virtual wxMenuItem* Insert(wxMenu* parent, int index, int id, const wxString& caption, const wxString& helptext);
38  virtual void Clear();
39  protected:
40  MenuItemsList m_MenuItems; // The managed array of wxMenuItem pointers
41  bool m_AutoClearOnDestroy; // if true, the menus are cleared in the destructor
42  private:
43 };
44 
45 #endif // MENUITEMSMANAGER_H
46 
DLLIMPORT bool Add(const wxString &name, const wxString &mask)
Add a new extension filter.
Definition: filefilters.cpp:41
#define DLLIMPORT
Definition: settings.h:16
Manager for wxMenuItem pointers.
MenuItemsList m_MenuItems