Code::Blocks
SVN r11506
include
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
28
class
DLLIMPORT
MenuItemsManager
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
FileFilters::Add
DLLIMPORT bool Add(const wxString &name, const wxString &mask)
Add a new extension filter.
Definition:
filefilters.cpp:41
wxMenuItem
MenuItemsManager::m_AutoClearOnDestroy
bool m_AutoClearOnDestroy
Definition:
menuitemsmanager.h:41
DLLIMPORT
#define DLLIMPORT
Definition:
settings.h:16
WX_DEFINE_ARRAY
WX_DEFINE_ARRAY(wxMenuItem *, MenuItemsList)
wxMenu
settings.h
wxString
MenuItemsManager
Manager for wxMenuItem pointers.
Definition:
menuitemsmanager.h:28
menu.h
MenuItemsManager::m_MenuItems
MenuItemsList m_MenuItems
Definition:
menuitemsmanager.h:40
Generated by
1.8.13