Irrlicht 3D Engine
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
IGUIContextMenu.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2012 Nikolaus Gebhardt
2
// This file is part of the "Irrlicht Engine".
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5
#ifndef __I_GUI_CONTEXT_MENU_H_INCLUDED__
6
#define __I_GUI_CONTEXT_MENU_H_INCLUDED__
7
8
#include "
IGUIElement.h
"
9
10
namespace
irr
11
{
12
namespace
gui
13
{
16
enum
ECONTEXT_MENU_CLOSE
17
{
19
ECMC_IGNORE
= 0,
20
22
ECMC_REMOVE
= 1,
23
25
ECMC_HIDE
= 2
26
27
// note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags.
28
};
29
31
35
class
IGUIContextMenu
:
public
IGUIElement
36
{
37
public
:
38
40
IGUIContextMenu
(
IGUIEnvironment
* environment,
IGUIElement
* parent,
s32
id
,
core::rect<s32>
rectangle)
41
:
IGUIElement
(
EGUIET_CONTEXT_MENU
, environment, parent, id, rectangle) {}
42
44
virtual
void
setCloseHandling
(
ECONTEXT_MENU_CLOSE
onClose) = 0;
45
47
virtual
ECONTEXT_MENU_CLOSE
getCloseHandling
()
const
= 0;
48
50
virtual
u32
getItemCount
()
const
= 0;
51
53
64
virtual
u32
addItem
(
const
wchar_t
* text,
s32
commandId=-1,
bool
enabled=
true
,
65
bool
hasSubMenu=
false
,
bool
checked=
false
,
bool
autoChecking=
false
) = 0;
66
68
81
virtual
u32
insertItem
(
u32
idx,
const
wchar_t
* text,
s32
commandId=-1,
bool
enabled=
true
,
82
bool
hasSubMenu=
false
,
bool
checked=
false
,
bool
autoChecking=
false
) = 0;
83
85
89
virtual
s32
findItemWithCommandId
(
s32
commandId,
u32
idxStartSearch=0)
const
= 0;
90
92
virtual
void
addSeparator
() = 0;
93
95
96
virtual
const
wchar_t
*
getItemText
(
u32
idx)
const
= 0;
97
99
101
virtual
void
setItemText
(
u32
idx,
const
wchar_t
* text) = 0;
102
104
105
virtual
bool
isItemEnabled
(
u32
idx)
const
= 0;
106
108
110
virtual
void
setItemEnabled
(
u32
idx,
bool
enabled) = 0;
111
113
115
virtual
void
setItemChecked
(
u32
idx,
bool
enabled) = 0;
116
118
119
virtual
bool
isItemChecked
(
u32
idx)
const
= 0;
120
122
123
virtual
void
removeItem
(
u32
idx) = 0;
124
126
virtual
void
removeAllItems
() = 0;
127
129
130
virtual
s32
getSelectedItem
()
const
= 0;
131
133
134
virtual
s32
getItemCommandId
(
u32
idx)
const
= 0;
135
137
140
virtual
void
setItemCommandId
(
u32
idx,
s32
id
) = 0;
141
143
146
virtual
IGUIContextMenu
*
getSubMenu
(
u32
idx)
const
= 0;
147
149
virtual
void
setItemAutoChecking
(
u32
idx,
bool
autoChecking) = 0;
150
152
virtual
bool
getItemAutoChecking
(
u32
idx)
const
= 0;
153
155
virtual
void
setEventParent
(
IGUIElement
*parent) = 0;
156
};
157
158
}
// end namespace gui
159
}
// end namespace irr
160
161
#endif
162
Irrlicht Engine
Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Sat Apr 20 2019 06:56:49 for Irrlicht 3D Engine by
Doxygen
1.8.1.2