ManaPlus
src
gui
popups
popupmenu.h
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2004-2009 The Mana World Development Team
4
* Copyright (C) 2009-2010 The Mana Developers
5
* Copyright (C) 2011-2019 The ManaPlus Developers
6
* Copyright (C) 2019-2021 Andrei Karas
7
*
8
* This file is part of The ManaPlus Client.
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
* any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
*/
23
24
#ifndef GUI_POPUPS_POPUPMENU_H
25
#define GUI_POPUPS_POPUPMENU_H
26
27
#ifndef DYECMD
28
29
#include "
const/resources/item/cards.h
"
30
31
#include "
enums/inventorytype.h
"
32
33
#include "
enums/resources/servercommandtype.h
"
34
35
#include "
enums/simpletypes/beingid.h
"
36
#include "
enums/simpletypes/beingtypeid.h
"
37
#include "
enums/simpletypes/itemcolor.h
"
38
39
#include "
gui/widgets/linkhandler.h
"
40
#include "
gui/widgets/popup.h
"
41
42
#include "
listeners/playerlistener.h
"
43
#include "
listeners/renamelistener.h
"
44
45
#include "
localconsts.h
"
46
47
class
ActorSprite
;
48
class
Being
;
49
class
Button
;
50
class
ChatTab
;
51
class
FloorItem
;
52
class
Item
;
53
class
ListModel
;
54
class
MapItem
;
55
class
ProgressBar
;
56
class
ScrollArea
;
57
class
StaticBrowserBox
;
58
class
TextCommand
;
59
class
TextDialog
;
60
class
TextField
;
61
class
Window
;
62
63
struct
GroupInfo
;
64
struct
SkillInfo
;
65
69
class
PopupMenu
final
:
public
Popup
,
public
LinkHandler
70
{
71
public
:
75
PopupMenu
();
76
77
A_DELETE_COPY
(
PopupMenu
)
78
79
void
postInit
()
override
final
;
80
84
void
showPopup
(
const
int
x
,
const
int
y
,
const
Being
*
const
being);
85
89
void
showPopup
(
const
int
x
,
const
int
y
,
90
const
STD_VECTOR<ActorSprite*> &beings);
91
92
void
showPlayerPopup
(
const
std::string &nick);
93
98
void
showPopup
(
const
int
x
,
const
int
y
,
99
const
FloorItem
*
const
floorItem);
100
105
void
showPopup
(
Window
*
const
parent,
106
const
int
x
,
const
int
y
,
107
const
Item
*
const
item,
108
const
InventoryTypeT
type);
109
110
void
showPopup
(
const
int
x
,
const
int
y
,
Button
*
const
button);
111
112
void
showPopup
(
const
int
x
,
const
int
y
,
const
ProgressBar
*
const
bar);
113
114
void
showPopup
(
const
int
x
,
const
int
y
,
MapItem
*
const
mapItem);
115
116
void
showItemPopup
(
const
int
x
,
117
const
int
y
,
118
const
Item
*
const
item);
119
120
void
showItemPopup
(
const
int
x
,
const
int
y
,
121
const
int
itemId,
122
const
ItemColor
color);
123
124
void
showDropPopup
(
const
int
x
,
125
const
int
y
,
126
const
Item
*
const
item);
127
128
void
showOutfitsWindowPopup
(
const
int
x
,
const
int
y
);
129
130
void
showSpellPopup
(
const
int
x
,
const
int
y
,
TextCommand
*
const
cmd);
131
132
void
showAttackMonsterPopup
(
const
int
x
,
const
int
y
,
133
const
std::string &name,
134
const
int
type);
135
136
void
showPickupItemPopup
(
const
int
x
,
const
int
y
,
137
const
std::string &name);
138
139
void
showUndressPopup
(
const
int
x
,
const
int
y
,
140
const
Being
*
const
being,
141
const
Item
*
const
item);
142
143
void
showMapPopup
(
const
int
x
,
const
int
y
,
144
const
int
x2,
const
int
y2,
145
const
bool
isMinimap);
146
151
void
showChatPopup
(
const
int
x
,
const
int
y
,
ChatTab
*
const
tab);
152
153
void
showChangePos
(
const
int
x
,
const
int
y
);
154
155
void
showPopup
(
const
int
x
,
const
int
y
,
ListModel
*
const
model);
156
157
void
showTextFieldPopup
(
TextField
*
const
input);
158
159
void
showLinkPopup
(
const
std::string &link);
160
161
void
showWindowsPopup
();
162
163
void
showNpcDialogPopup
(
const
BeingId
npcId,
164
const
int
x
,
const
int
y
);
165
166
void
showWindowPopup
(
Window
*
const
window);
167
168
void
showSkillPopup
(
const
SkillInfo
*
const
info
);
169
170
void
showSkillLevelPopup
(
const
SkillInfo
*
const
info
);
171
172
void
showSkillTypePopup
(
const
SkillInfo
*
const
info
);
173
174
void
showSkillOffsetPopup
(
const
SkillInfo
*
const
info
,
175
const
bool
isOffsetX);
176
177
void
showCraftPopup
();
178
179
void
showEmoteType
();
180
181
void
showPartyPopup
();
182
183
void
showGuildPopup
();
184
185
void
showAttackPopup
();
186
187
void
showNavigationPopup
();
188
189
void
showPickupPopup
();
190
191
void
showPlayersPopup
();
192
193
void
showFriendsPopup
();
194
198
void
handleLink
(
const
std::string &link,
199
MouseEvent
*event
A_UNUSED
)
override
final
;
200
201
void
clear
()
override
final
;
202
203
void
moveUp
();
204
205
void
moveDown
();
206
207
void
select
();
208
209
private
:
210
void
initPopup
();
211
212
bool
isAllowCommand
(
const
ServerCommandTypeT
command);
213
214
bool
isAllowOtherCommand
(
const
ServerCommandTypeT
command);
215
216
void
setMousePos
();
217
218
void
setMousePos2
();
219
220
void
addPlayerRelation
(
const
std::string &name);
221
222
void
addFollow
();
223
224
void
addBuySell
(
const
Being
*
const
being)
A_NONNULL
(2);
225
226
void
addParty
(
const
std::string &nick);
227
228
void
addPartyName
(
const
std::string &partyName);
229
230
void
addBuySellDefault
();
231
232
void
addPlayerMisc
();
233
234
void
addPickupFilter
(
const
std::string &name);
235
236
void
addProtection
();
237
238
void
addUse
(
const
Item
*
const
item)
A_NONNULL
(2);
239
240
void
addItemMenu
(
const
Item
*
const
item,
241
const
InventoryTypeT
type)
A_NONNULL
(2);
242
243
void
addDrop
(
const
Item
*
const
item,
244
const
bool
isProtected)
A_NONNULL
(2);
245
246
void
addGmCommands
();
247
248
void
showMuteCommands
();
249
250
void
showPlayerMenu
();
251
252
void
showFloorItemGMCommands
();
253
254
void
showItemGMCommands
();
255
256
void
addNormalRelations
();
257
258
void
addWindowMenu
(
const
Window
*
const
window);
259
260
void
showHomunGMCommands
();
261
262
void
showPetGMCommands
();
263
264
void
showMercenaryGMCommands
();
265
266
void
addChat
(
const
Being
*
const
being);
267
268
void
addMailCommands
();
269
270
void
addCatchPetCommands
();
271
272
void
showGMPopup
(
const
std::string &name);
273
274
void
showPlayerGMCommands
(
const
std::string &name);
275
276
void
showNpcGMCommands
();
277
278
void
showMonsterGMCommands
();
279
280
void
showAdoptCommands
();
281
282
void
addSocialMenu
();
283
284
bool
addBeingMenu
();
285
286
StaticBrowserBox
*
mBrowserBox
A_NONNULLPOINTER
;
287
ScrollArea
*
mScrollArea
A_NONNULLPOINTER
;
288
289
BeingId
mBeingId
;
290
BeingId
mFloorItemId
;
291
int
mItemId
;
292
int
mItemIndex
;
293
int
mItemCards
[
maxCards
];
294
ItemColor
mItemColor
;
295
MapItem
*
mMapItem
;
296
ChatTab
*
mTab
;
297
TextCommand
*
mSpell
;
298
Window
*
mCallerWindow
;
299
RenameListener
mRenameListener
;
300
PlayerListener
mPlayerListener
;
301
TextDialog
*
mDialog
;
302
Button
*
mButton
;
303
const
GroupInfo
*
mGroup
;
304
std::string
mName
;
305
std::string
mExtName
;
306
TextField
*
mTextField
;
307
ActorTypeT
mType
;
308
BeingTypeId
mSubType
;
309
int
mX
;
310
int
mY
;
311
bool
mAllowCleanMenu
;
312
316
void
showPopup
(
int
x
,
int
y
);
317
};
318
319
extern
PopupMenu
*
popupMenu
;
320
321
#endif
// DYE_CMD
322
#endif
// GUI_POPUPS_POPUPMENU_H
ActorTypeT
ActorType ::T ActorTypeT
Definition:
actortype.h:43
beingid.h
BeingId
int BeingId
Definition:
beingid.h:30
beingtypeid.h
BeingTypeId
int BeingTypeId
Definition:
beingtypeid.h:30
cards.h
maxCards
#define maxCards
Definition:
cards.h:25
ActorSprite
Definition:
actorsprite.h:56
Being
Definition:
being.h:96
Button
Definition:
button.h:102
ChatTab
Definition:
chattab.h:63
FloorItem
Definition:
flooritem.h:45
Item
Definition:
item.h:50
LinkHandler
Definition:
linkhandler.h:36
ListModel
Definition:
listmodel.h:80
MapItem
Definition:
mapitem.h:33
MouseEvent
Definition:
mouseevent.h:81
PlayerListener
Definition:
playerlistener.h:34
PopupMenu
Definition:
popupmenu.h:70
PopupMenu::showSpellPopup
void showSpellPopup(const int x, const int y, TextCommand *const cmd)
Definition:
popupmenu.cpp:887
PopupMenu::showMapPopup
void showMapPopup(const int x, const int y, const int x2, const int y2, const bool isMinimap)
Definition:
popupmenu.cpp:805
PopupMenu::addBuySell
void addBuySell(const Being *const being)
Definition:
popupmenu.cpp:2593
PopupMenu::mItemCards
int mItemCards[4]
Definition:
popupmenu.h:293
PopupMenu::mY
int mY
Definition:
popupmenu.h:310
PopupMenu::addBuySellDefault
void addBuySellDefault()
Definition:
popupmenu.cpp:2627
PopupMenu::mGroup
const GroupInfo * mGroup
Definition:
popupmenu.h:303
PopupMenu::addUse
void addUse(const Item *const item)
Definition:
popupmenu.cpp:2798
PopupMenu::mType
ActorTypeT mType
Definition:
popupmenu.h:307
PopupMenu::showAttackPopup
void showAttackPopup()
Definition:
popupmenu.cpp:3570
PopupMenu::addPickupFilter
void addPickupFilter(const std::string &name)
Definition:
popupmenu.cpp:2717
PopupMenu::mBrowserBox
StaticBrowserBox * mBrowserBox
Definition:
popupmenu.h:286
PopupMenu::showPickupPopup
void showPickupPopup()
Definition:
popupmenu.cpp:3590
PopupMenu::mName
std::string mName
Definition:
popupmenu.h:304
PopupMenu::mMapItem
MapItem * mMapItem
Definition:
popupmenu.h:295
PopupMenu::showPlayersPopup
void showPlayersPopup()
Definition:
popupmenu.cpp:3600
PopupMenu::addPlayerMisc
void addPlayerMisc()
Definition:
popupmenu.cpp:2705
PopupMenu::mSpell
TextCommand * mSpell
Definition:
popupmenu.h:297
PopupMenu::mExtName
std::string mExtName
Definition:
popupmenu.h:305
PopupMenu::showMonsterGMCommands
void showMonsterGMCommands()
Definition:
popupmenu.cpp:3277
PopupMenu::showAdoptCommands
void showAdoptCommands()
Definition:
popupmenu.cpp:3499
PopupMenu::showAttackMonsterPopup
void showAttackMonsterPopup(const int x, const int y, const std::string &name, const int type)
Definition:
popupmenu.cpp:2018
PopupMenu::mTab
ChatTab * mTab
Definition:
popupmenu.h:296
PopupMenu::mScrollArea
ScrollArea * mScrollArea
Definition:
popupmenu.h:287
PopupMenu::postInit
void postInit()
Definition:
popupmenu.cpp:146
PopupMenu::showTextFieldPopup
void showTextFieldPopup(TextField *const input)
Definition:
popupmenu.cpp:2172
PopupMenu::mSubType
BeingTypeId mSubType
Definition:
popupmenu.h:308
PopupMenu::showSkillTypePopup
void showSkillTypePopup(const SkillInfo *const info)
Definition:
popupmenu.cpp:2394
PopupMenu::showItemGMCommands
void showItemGMCommands()
Definition:
popupmenu.cpp:3355
PopupMenu::addMailCommands
void addMailCommands()
Definition:
popupmenu.cpp:3480
PopupMenu::initPopup
void initPopup()
Definition:
popupmenu.cpp:152
PopupMenu::showFriendsPopup
void showFriendsPopup()
Definition:
popupmenu.cpp:3610
PopupMenu::isAllowCommand
bool isAllowCommand(const ServerCommandTypeT command)
Definition:
popupmenu.cpp:160
PopupMenu::showMercenaryGMCommands
void showMercenaryGMCommands()
Definition:
popupmenu.cpp:3456
PopupMenu::addPartyName
void addPartyName(const std::string &partyName)
Definition:
popupmenu.cpp:2641
PopupMenu::addFollow
void addFollow()
Definition:
popupmenu.cpp:2581
PopupMenu::showNpcDialogPopup
void showNpcDialogPopup(const BeingId npcId, const int x, const int y)
Definition:
popupmenu.cpp:2244
PopupMenu::mButton
Button * mButton
Definition:
popupmenu.h:302
PopupMenu::mRenameListener
RenameListener mRenameListener
Definition:
popupmenu.h:299
PopupMenu::showHomunGMCommands
void showHomunGMCommands()
Definition:
popupmenu.cpp:3448
PopupMenu::showPartyPopup
void showPartyPopup()
Definition:
popupmenu.cpp:3546
PopupMenu::addPlayerRelation
void addPlayerRelation(const std::string &name)
Definition:
popupmenu.cpp:2492
PopupMenu::addSocialMenu
void addSocialMenu()
Definition:
popupmenu.cpp:3508
PopupMenu::addDrop
void addDrop(const Item *const item, const bool isProtected)
Definition:
popupmenu.cpp:2864
PopupMenu::mItemId
int mItemId
Definition:
popupmenu.h:291
PopupMenu::showLinkPopup
void showLinkPopup(const std::string &link)
Definition:
popupmenu.cpp:2194
PopupMenu::setMousePos2
void setMousePos2()
Definition:
popupmenu.cpp:553
PopupMenu::showPlayerPopup
void showPlayerPopup(const std::string &nick)
Definition:
popupmenu.cpp:606
PopupMenu::mX
int mX
Definition:
popupmenu.h:309
PopupMenu::PopupMenu
PopupMenu()
Definition:
popupmenu.cpp:105
PopupMenu::showPickupItemPopup
void showPickupItemPopup(const int x, const int y, const std::string &name)
Definition:
popupmenu.cpp:2101
PopupMenu::showItemPopup
void showItemPopup(const int x, const int y, const Item *const item)
Definition:
popupmenu.cpp:1790
PopupMenu::addGmCommands
void addGmCommands()
Definition:
popupmenu.cpp:2888
PopupMenu::select
void select()
Definition:
popupmenu.cpp:3630
PopupMenu::mItemIndex
int mItemIndex
Definition:
popupmenu.h:292
PopupMenu::showUndressPopup
void showUndressPopup(const int x, const int y, const Being *const being, const Item *const item)
Definition:
popupmenu.cpp:2138
PopupMenu::showNavigationPopup
void showNavigationPopup()
Definition:
popupmenu.cpp:3580
PopupMenu::addParty
void addParty(const std::string &nick)
Definition:
popupmenu.cpp:2665
PopupMenu::showChatPopup
void showChatPopup(const int x, const int y, ChatTab *const tab)
Definition:
popupmenu.cpp:913
PopupMenu::mFloorItemId
BeingId mFloorItemId
Definition:
popupmenu.h:290
PopupMenu::showPlayerMenu
void showPlayerMenu()
Definition:
popupmenu.cpp:2898
PopupMenu::showSkillLevelPopup
void showSkillLevelPopup(const SkillInfo *const info)
Definition:
popupmenu.cpp:2356
PopupMenu::mBeingId
BeingId mBeingId
Definition:
popupmenu.h:289
PopupMenu::addWindowMenu
void addWindowMenu(const Window *const window)
Definition:
popupmenu.cpp:1185
PopupMenu::showWindowsPopup
void showWindowsPopup()
Definition:
popupmenu.cpp:2217
PopupMenu::showFloorItemGMCommands
void showFloorItemGMCommands()
Definition:
popupmenu.cpp:3336
PopupMenu::addChat
void addChat(const Being *const being)
Definition:
popupmenu.cpp:2690
PopupMenu::setMousePos
void setMousePos()
Definition:
popupmenu.cpp:540
PopupMenu::addProtection
void addProtection()
Definition:
popupmenu.cpp:2777
PopupMenu::showGuildPopup
void showGuildPopup()
Definition:
popupmenu.cpp:3556
PopupMenu::addCatchPetCommands
void addCatchPetCommands()
Definition:
popupmenu.cpp:3490
PopupMenu::handleLink
void handleLink(const std::string &link, MouseEvent *event)
Definition:
popupmenu.cpp:1251
PopupMenu::clear
void clear()
Definition:
popupmenu.cpp:2758
PopupMenu::showSkillOffsetPopup
void showSkillOffsetPopup(const SkillInfo *const info, const bool isOffsetX)
Definition:
popupmenu.cpp:2307
PopupMenu::moveUp
void moveUp()
Definition:
popupmenu.cpp:3620
PopupMenu::showOutfitsWindowPopup
void showOutfitsWindowPopup(const int x, const int y)
Definition:
popupmenu.cpp:853
PopupMenu::showPlayerGMCommands
void showPlayerGMCommands(const std::string &name)
Definition:
popupmenu.cpp:2962
PopupMenu::mDialog
TextDialog * mDialog
Definition:
popupmenu.h:301
PopupMenu::showPetGMCommands
void showPetGMCommands()
Definition:
popupmenu.cpp:3452
PopupMenu::moveDown
void moveDown()
Definition:
popupmenu.cpp:3625
PopupMenu::isAllowOtherCommand
bool isAllowOtherCommand(const ServerCommandTypeT command)
Definition:
popupmenu.cpp:183
PopupMenu::mPlayerListener
PlayerListener mPlayerListener
Definition:
popupmenu.h:300
PopupMenu::showCraftPopup
void showCraftPopup()
Definition:
popupmenu.cpp:3460
PopupMenu::showMuteCommands
void showMuteCommands()
Definition:
popupmenu.cpp:3170
PopupMenu::showGMPopup
void showGMPopup(const std::string &name)
Definition:
popupmenu.cpp:3396
PopupMenu::showSkillPopup
void showSkillPopup(const SkillInfo *const info)
Definition:
popupmenu.cpp:2263
PopupMenu::showEmoteType
void showEmoteType()
Definition:
popupmenu.cpp:1215
PopupMenu::showChangePos
void showChangePos(const int x, const int y)
Definition:
popupmenu.cpp:1117
PopupMenu::mTextField
TextField * mTextField
Definition:
popupmenu.h:306
PopupMenu::addNormalRelations
void addNormalRelations()
Definition:
popupmenu.cpp:2473
PopupMenu::showWindowPopup
void showWindowPopup(Window *const window)
Definition:
popupmenu.cpp:1164
PopupMenu::addBeingMenu
bool addBeingMenu()
Definition:
popupmenu.cpp:520
PopupMenu::showDropPopup
void showDropPopup(const int x, const int y, const Item *const item)
Definition:
popupmenu.cpp:1849
PopupMenu::showPopup
void showPopup(const int x, const int y, const Being *const being)
Definition:
popupmenu.cpp:203
PopupMenu::addItemMenu
void addItemMenu(const Item *const item, const InventoryTypeT type)
Definition:
popupmenu.cpp:2817
PopupMenu::mCallerWindow
Window * mCallerWindow
Definition:
popupmenu.h:298
PopupMenu::mAllowCleanMenu
bool mAllowCleanMenu
Definition:
popupmenu.h:311
PopupMenu::mItemColor
ItemColor mItemColor
Definition:
popupmenu.h:294
PopupMenu::showNpcGMCommands
void showNpcGMCommands()
Definition:
popupmenu.cpp:3233
Popup
Definition:
popup.h:52
ProgressBar
Definition:
progressbar.h:47
RenameListener
Definition:
renamelistener.h:33
ScrollArea
Definition:
scrollarea.h:94
StaticBrowserBox
Definition:
staticbrowserbox.h:49
TextCommand
Definition:
textcommand.h:42
TextDialog
Definition:
textdialog.h:42
TextField
Definition:
textfield.h:93
Window
Definition:
window.h:102
y
y
Definition:
graphics_calcImageRect.hpp:73
x
x
Definition:
graphics_calcImageRect.hpp:73
inventorytype.h
InventoryTypeT
InventoryType ::T InventoryTypeT
Definition:
inventorytype.h:42
itemcolor.h
ItemColor
uint16_t ItemColor
Definition:
itemcolor.h:30
linkhandler.h
localconsts.h
A_NONNULL
#define A_NONNULL(...)
Definition:
localconsts.h:168
A_NONNULLPOINTER
#define A_NONNULLPOINTER
Definition:
localconsts.h:266
final
#define final
Definition:
localconsts.h:46
A_DELETE_COPY
#define A_DELETE_COPY(func)
Definition:
localconsts.h:53
A_UNUSED
#define A_UNUSED
Definition:
localconsts.h:160
Actions::info
bool info(InputEvent &event)
Definition:
commands.cpp:57
playerlistener.h
popup.h
popupMenu
PopupMenu * popupMenu
Definition:
popupmenu.cpp:103
renamelistener.h
servercommandtype.h
ServerCommandTypeT
ServerCommandType ::T ServerCommandTypeT
Definition:
servercommandtype.h:36
GroupInfo
Definition:
groupinfo.h:38
SkillInfo
Definition:
skillinfo.h:51
Generated on Wed Mar 17 2021 19:19:06 for ManaPlus by
1.9.1