3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #include "sm_globals.h"
17 #include "MenuManager.h"
18 #include "MenuStyle_Valve.h"
19 #include "MenuStyle_Radio.h"
20 #include "HandleSys.h"
21 #include "PluginSys.h"
23 #if defined CreateMenu
28 * And God said, "let there be menus," and behold, there were menus.
29 * God saw the menus and they were good. And the evening and the morning
35 MenuAction_Start = (1<<0), /**< A menu has been started (nothing passed) */
36 MenuAction_Display = (1<<1), /**< A menu is about to be displayed (param1=client, param2=MenuPanel Handle) */
37 MenuAction_Select = (1<<2), /**< An item was selected (param1=client, param2=item) */
38 MenuAction_Cancel = (1<<3), /**< The menu was cancelled (param1=client, param2=item) */
39 MenuAction_End = (1<<4), /**< A menu's display/selection cycle is complete (nothing passed). */
40 MenuAction_VoteEnd = (1<<5), /**< (VOTE ONLY): A vote sequence has ended (param1=chosen item) */
43 class CPanelHandler : public IMenuHandler
45 friend class MenuNativeHelpers;
50 void OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason reason);
51 void OnMenuSelect(IBaseMenu *menu, int client, unsigned int item);
53 IPluginFunction *m_pFunc;
57 class CMenuHandler : public IMenuHandler
59 friend class MenuNativeHelpers;
61 CMenuHandler(IPluginFunction *pBasic, int flags);
63 void OnMenuStart(IBaseMenu *menu);
64 void OnMenuDisplay(IBaseMenu *menu, int client, IMenuPanel *display);
65 void OnMenuSelect(IBaseMenu *menu, int client, unsigned int item);
66 void OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason reason);
67 void OnMenuEnd(IBaseMenu *menu);
68 void OnMenuDestroy(IBaseMenu *menu);
70 void OnMenuDrawItem(IBaseMenu *menu, int client, unsigned int item, unsigned int &style);
71 void OnMenuDisplayItem(IBaseMenu *menu, int client, unsigned int item, const char **display);
74 IPluginFunction *m_pBasic;
79 * GLOBAL CLASS FOR HELPERS
82 class MenuNativeHelpers :
84 public IHandleTypeDispatch,
85 public IPluginsListener
88 virtual void OnSourceModAllInitialized()
90 m_PanelType = g_HandleSys.CreateType("IMenuPanel", this, 0, NULL, NULL, g_pCoreIdent, NULL);
91 g_PluginSys.AddPluginsListener(this);
94 virtual void OnSourceModShutdown()
96 g_HandleSys.RemoveType(m_PanelType, g_pCoreIdent);
98 while (!m_FreePanelHandlers.empty())
100 delete m_FreePanelHandlers.front();
101 m_FreePanelHandlers.pop();
104 while (!m_FreeMenuHandlers.empty())
106 delete m_FreeMenuHandlers.front();
107 m_FreeMenuHandlers.pop();
111 virtual void OnHandleDestroy(HandleType_t type, void *object)
113 IMenuPanel *panel = (IMenuPanel *)object;
118 * It is extremely important that unloaded plugins don't crash.
119 * Thus, if a plugin unloads, we run through every handler we have.
120 * This means we do almost no runtime work for keeping track of
121 * our panel handlers (we don't have to store a list of the running
122 * ones), but when push comes to shove, we have to scan them all
123 * in case any of them are active.
125 virtual void OnPluginUnloaded(IPlugin *plugin)
127 for (size_t i = 0; i < m_PanelHandlers.size(); i++)
129 if (m_PanelHandlers[i]->m_pPlugin == plugin)
131 m_PanelHandlers[i]->m_pPlugin = NULL;
132 m_PanelHandlers[i]->m_pFunc = NULL;
137 inline HandleType_t GetPanelType()
142 CPanelHandler *GetPanelHandler(IPluginFunction *pFunction)
144 CPanelHandler *handler;
145 if (m_FreePanelHandlers.empty())
147 handler = new CPanelHandler;
148 m_PanelHandlers.push_back(handler);
150 handler = m_FreePanelHandlers.front();
151 m_FreePanelHandlers.pop();
153 handler->m_pFunc = pFunction;
154 handler->m_pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
158 void FreePanelHandler(CPanelHandler *handler)
160 handler->m_pFunc = NULL;
161 handler->m_pPlugin = NULL;
162 m_FreePanelHandlers.push(handler);
165 CMenuHandler *GetMenuHandler(IPluginFunction *pFunction, int flags)
167 CMenuHandler *handler;
168 if (m_FreeMenuHandlers.empty())
170 handler = new CMenuHandler(pFunction, flags);
172 handler = m_FreeMenuHandlers.front();
173 m_FreeMenuHandlers.pop();
174 handler->m_pBasic = pFunction;
175 handler->m_Flags = flags;
180 void FreeMenuHandler(CMenuHandler *handler)
182 m_FreeMenuHandlers.push(handler);
186 HandleType_t m_PanelType;
187 CStack<CPanelHandler *> m_FreePanelHandlers;
188 CStack<CMenuHandler *> m_FreeMenuHandlers;
189 CVector<CPanelHandler *> m_PanelHandlers;
193 * BASIC PANEL HANDLER WRAPPER
196 void CPanelHandler::OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason reason)
200 m_pFunc->PushCell(BAD_HANDLE);
201 m_pFunc->PushCell(MenuAction_Cancel);
202 m_pFunc->PushCell(client);
203 m_pFunc->PushCell(reason);
204 m_pFunc->Execute(NULL);
206 g_MenuHelpers.FreePanelHandler(this);
209 void CPanelHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int item)
213 m_pFunc->PushCell(BAD_HANDLE);
214 m_pFunc->PushCell(MenuAction_Select);
215 m_pFunc->PushCell(client);
216 m_pFunc->PushCell(item);
217 m_pFunc->Execute(NULL);
219 g_MenuHelpers.FreePanelHandler(this);
223 * MENU HANDLER WRAPPER
225 CMenuHandler::CMenuHandler(IPluginFunction *pBasic, int flags) :
226 m_pBasic(pBasic), m_Flags(flags)
228 /* :TODO: We can probably cache the handle ahead of time */
231 void CMenuHandler::OnMenuStart(IBaseMenu *menu)
233 if ((m_Flags & (int)MenuAction_Start) == (int)MenuAction_Start)
235 m_pBasic->PushCell(menu->GetHandle());
236 m_pBasic->PushCell(MenuAction_Start);
237 m_pBasic->PushCell(0);
238 m_pBasic->PushCell(0);
239 m_pBasic->Execute(NULL);
243 void CMenuHandler::OnMenuDisplay(IBaseMenu *menu, int client, IMenuPanel *panel)
245 if ((m_Flags & (int)MenuAction_Display) == (int)MenuAction_Display)
248 sec.pIdentity = m_pBasic->GetParentContext()->GetIdentity();
249 sec.pOwner = g_pCoreIdent;
252 g_HandleSys.InitAccessDefaults(NULL, &access);
253 access.access[HandleAccess_Delete] = HANDLE_RESTRICT_IDENTITY|HANDLE_RESTRICT_OWNER;
255 Handle_t hndl = g_HandleSys.CreateHandleEx(g_MenuHelpers.GetPanelType(), panel, &sec, &access, NULL);
257 m_pBasic->PushCell(menu->GetHandle());
258 m_pBasic->PushCell(MenuAction_Display);
259 m_pBasic->PushCell(client);
260 m_pBasic->PushCell(hndl);
261 m_pBasic->Execute(NULL);
263 g_HandleSys.FreeHandle(hndl, &sec);
267 void CMenuHandler::OnMenuSelect(IBaseMenu *menu, int client, unsigned int item)
269 m_pBasic->PushCell(menu->GetHandle());
270 m_pBasic->PushCell(MenuAction_Select);
271 m_pBasic->PushCell(client);
272 m_pBasic->PushCell(item);
273 m_pBasic->Execute(NULL);
276 void CMenuHandler::OnMenuCancel(IBaseMenu *menu, int client, MenuCancelReason reason)
278 m_pBasic->PushCell(menu->GetHandle());
279 m_pBasic->PushCell(MenuAction_Cancel);
280 m_pBasic->PushCell(client);
281 m_pBasic->PushCell(reason);
282 m_pBasic->Execute(NULL);
285 void CMenuHandler::OnMenuEnd(IBaseMenu *menu)
287 m_pBasic->PushCell(menu->GetHandle());
288 m_pBasic->PushCell(MenuAction_End);
289 m_pBasic->PushCell(0);
290 m_pBasic->PushCell(0);
291 m_pBasic->Execute(NULL);
294 void CMenuHandler::OnMenuDestroy(IBaseMenu *menu)
296 g_MenuHelpers.FreeMenuHandler(this);
300 * INLINE FUNCTIONS FOR NATIVES
303 inline Handle_t MakePanelHandle(IMenuPanel *panel, IPluginContext *pContext)
305 return g_HandleSys.CreateHandle(g_MenuHelpers.GetPanelType(), panel, pContext->GetIdentity(), g_pCoreIdent, NULL);
308 inline HandleError ReadPanelHandle(Handle_t hndl, IMenuPanel **panel)
311 sec.pIdentity = g_pCoreIdent;
313 return g_HandleSys.ReadHandle(hndl, g_MenuHelpers.GetPanelType(), &sec, (void **)panel);
316 inline IMenuStyle *GetStyleFromCell(cell_t cell)
320 MenuStyle_Default = 0, /**< The "default" menu style for the mod */
321 MenuStyle_Valve = 1, /**< The Valve provided menu style (Used on HL2DM) */
322 MenuStyle_Radio = 2, /**< The simpler menu style commonly used on CS:S */
325 if (cell == MenuStyle_Valve)
327 return &g_ValveMenuStyle;
328 } else if (cell == MenuStyle_Radio
329 && g_RadioMenuStyle.IsSupported())
331 return &g_RadioMenuStyle;
334 return g_Menus.GetDefaultStyle();
337 /***********************************
338 **** NATIVE DEFINITIONS ***********
339 ***********************************/
341 static cell_t CreateMenu(IPluginContext *pContext, const cell_t *params)
343 IMenuStyle *style = g_Menus.GetDefaultStyle();
344 IPluginFunction *pFunction;
346 if ((pFunction=pContext->GetFunctionById(params[1])) == NULL)
348 return pContext->ThrowNativeError("Function id %x is invalid", params[1]);
351 CMenuHandler *handler = g_MenuHelpers.GetMenuHandler(pFunction, params[2]);
352 IBaseMenu *menu = style->CreateMenu(handler, pContext->GetIdentity());
354 Handle_t hndl = menu->GetHandle();
364 static cell_t DisplayMenu(IPluginContext *pContext, const cell_t *params)
366 Handle_t hndl = (Handle_t)params[1];
370 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
372 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
375 return menu->Display(params[2], params[3]) ? 1 : 0;
378 static cell_t AddMenuItem(IPluginContext *pContext, const cell_t *params)
380 Handle_t hndl = (Handle_t)params[1];
384 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
386 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
392 pContext->LocalToString(params[2], &info);
393 pContext->LocalToString(params[3], (char **)&dr.display);
394 dr.style = params[4];
396 return menu->AppendItem(info, dr) ? 1 : 0;
399 static cell_t InsertMenuItem(IPluginContext *pContext, const cell_t *params)
401 Handle_t hndl = (Handle_t)params[1];
405 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
407 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
413 pContext->LocalToString(params[3], &info);
414 pContext->LocalToString(params[4], (char **)&dr.display);
415 dr.style = params[5];
417 return menu->InsertItem(params[2], info, dr) ? 1 : 0;
420 static cell_t RemoveMenuItem(IPluginContext *pContext, const cell_t *params)
422 Handle_t hndl = (Handle_t)params[1];
426 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
428 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
431 return menu->RemoveItem(params[2]) ? 1 : 0;
434 static cell_t RemoveAllMenuItems(IPluginContext *pContext, const cell_t *params)
436 Handle_t hndl = (Handle_t)params[1];
440 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
442 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
445 menu->RemoveAllItems();
450 static cell_t GetMenuItem(IPluginContext *pContext, const cell_t *params)
452 Handle_t hndl = (Handle_t)params[1];
456 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
458 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
464 if ((info=menu->GetItemInfo(params[2], &dr)) == NULL)
469 pContext->StringToLocalUTF8(params[3], params[4], info, NULL);
470 pContext->StringToLocalUTF8(params[6], params[7], dr.display ? dr.display : "", NULL);
473 pContext->LocalToPhysAddr(params[5], &addr);
479 static cell_t SetMenuPagination(IPluginContext *pContext, const cell_t *params)
481 Handle_t hndl = (Handle_t)params[1];
485 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
487 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
490 return menu->SetPagination(params[2]) ? 1 : 0;
493 static cell_t GetMenuPagination(IPluginContext *pContext, const cell_t *params)
495 Handle_t hndl = (Handle_t)params[1];
499 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
501 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
504 return menu->GetPagination();
507 static cell_t GetMenuItemCount(IPluginContext *pContext, const cell_t *params)
509 Handle_t hndl = (Handle_t)params[1];
513 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
515 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
518 return menu->GetItemCount();
521 static cell_t SetMenuTitle(IPluginContext *pContext, const cell_t *params)
523 Handle_t hndl = (Handle_t)params[1];
527 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
529 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
533 g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2);
535 menu->SetDefaultTitle(buffer);
540 static cell_t CreatePanelFromMenu(IPluginContext *pContext, const cell_t *params)
542 Handle_t hndl = (Handle_t)params[1];
546 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
548 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
551 IMenuPanel *panel = menu->CreatePanel();
552 hndl = MakePanelHandle(panel, pContext);
561 static cell_t GetMenuExitButton(IPluginContext *pContext, const cell_t *params)
563 Handle_t hndl = (Handle_t)params[1];
567 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
569 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
572 return menu->GetExitButton() ? 1 : 0;
575 static cell_t SetMenuExitButton(IPluginContext *pContext, const cell_t *params)
577 Handle_t hndl = (Handle_t)params[1];
581 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
583 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
586 return menu->SetExitButton(params[2] ? true : false) ? 1 : 0;
589 static cell_t CancelMenu(IPluginContext *pContext, const cell_t *params)
591 Handle_t hndl = (Handle_t)params[1];
595 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
597 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
605 static cell_t GetMenuStyle(IPluginContext *pContext, const cell_t *params)
607 Handle_t hndl = (Handle_t)params[1];
611 if ((err=g_Menus.ReadMenuHandle(params[1], &menu)) != HandleError_None)
613 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
616 return menu->GetDrawStyle()->GetHandle();
619 static cell_t GetMenuStyleHandle(IPluginContext *pContext, const cell_t *params)
621 IMenuStyle *style = GetStyleFromCell(params[1]);
627 return style->GetHandle();
630 static cell_t CreatePanel(IPluginContext *pContext, const cell_t *params)
632 Handle_t hndl = (Handle_t)params[1];
638 if ((err=g_Menus.ReadStyleHandle(params[1], &style)) != HandleError_None)
640 return pContext->ThrowNativeError("MenuStyle handle %x is invalid (error %d)", hndl, err);
643 style = g_Menus.GetDefaultStyle();
646 IMenuPanel *panel = style->CreatePanel();
648 hndl = MakePanelHandle(panel, pContext);
658 static cell_t CreateMenuEx(IPluginContext *pContext, const cell_t *params)
660 Handle_t hndl = (Handle_t)params[1];
666 if ((err=g_Menus.ReadStyleHandle(params[1], &style)) != HandleError_None)
668 return pContext->ThrowNativeError("MenuStyle handle %x is invalid (error %d)", hndl, err);
671 style = g_Menus.GetDefaultStyle();
674 IPluginFunction *pFunction;
675 if ((pFunction=pContext->GetFunctionById(params[2])) == NULL)
677 return pContext->ThrowNativeError("Function id %x is invalid", params[2]);
680 CMenuHandler *handler = g_MenuHelpers.GetMenuHandler(pFunction, params[3]);
682 IBaseMenu *pMenu = style->CreateMenu(handler, pContext->GetIdentity());
683 hndl = pMenu->GetHandle();
693 static cell_t GetClientMenu(IPluginContext *pContext, const cell_t *params)
695 Handle_t hndl = (Handle_t)params[2];
701 if ((err=g_Menus.ReadStyleHandle(params[1], &style)) != HandleError_None)
703 return pContext->ThrowNativeError("MenuStyle handle %x is invalid (error %d)", hndl, err);
706 style = g_Menus.GetDefaultStyle();
709 return style->GetClientMenu(params[1], NULL);
712 static cell_t CancelClientMenu(IPluginContext *pContext, const cell_t *params)
714 Handle_t hndl = (Handle_t)params[3];
720 if ((err=g_Menus.ReadStyleHandle(params[1], &style)) != HandleError_None)
722 return pContext->ThrowNativeError("MenuStyle handle %x is invalid (error %d)", hndl, err);
725 style = g_Menus.GetDefaultStyle();
728 return style->CancelClientMenu(params[1], params[2] ? true : false) ? 1 : 0;
731 static cell_t GetMaxPageItems(IPluginContext *pContext, const cell_t *params)
733 Handle_t hndl = (Handle_t)params[1];
739 if ((err=g_Menus.ReadStyleHandle(params[1], &style)) != HandleError_None)
741 return pContext->ThrowNativeError("MenuStyle handle %x is invalid (error %d)", hndl, err);
744 style = g_Menus.GetDefaultStyle();
747 return style->GetMaxPageItems();
750 static cell_t GetPanelStyle(IPluginContext *pContext, const cell_t *params)
752 Handle_t hndl = (Handle_t)params[1];
756 if ((err=ReadPanelHandle(hndl, &panel)) != HandleError_None)
758 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
761 return panel->GetParentStyle()->GetHandle();
764 static cell_t SetPanelTitle(IPluginContext *pContext, const cell_t *params)
766 Handle_t hndl = (Handle_t)params[1];
770 if ((err=ReadPanelHandle(hndl, &panel)) != HandleError_None)
772 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
776 pContext->LocalToString(params[2], &text);
778 panel->DrawTitle(text, params[3] ? true : false);
783 static cell_t DrawPanelItem(IPluginContext *pContext, const cell_t *params)
785 Handle_t hndl = (Handle_t)params[1];
789 if ((err=ReadPanelHandle(hndl, &panel)) != HandleError_None)
791 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
795 pContext->LocalToString(params[2], (char **)&dr.display);
796 dr.style = params[3];
798 return panel->DrawItem(dr);
801 static cell_t DrawPanelText(IPluginContext *pContext, const cell_t *params)
803 Handle_t hndl = (Handle_t)params[1];
807 if ((err=ReadPanelHandle(hndl, &panel)) != HandleError_None)
809 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
813 pContext->LocalToString(params[2], &text);
815 return panel->DrawRawLine(text) ? 1 : 0;
818 static cell_t CanPanelDrawFlags(IPluginContext *pContext, const cell_t *params)
820 Handle_t hndl = (Handle_t)params[1];
824 if ((err=ReadPanelHandle(hndl, &panel)) != HandleError_None)
826 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
829 return panel->CanDrawItem(params[2]);
832 static cell_t SendPanelToClient(IPluginContext *pContext, const cell_t *params)
834 Handle_t hndl = (Handle_t)params[1];
838 if ((err=ReadPanelHandle(hndl, &panel)) != HandleError_None)
840 return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err);
843 IPluginFunction *pFunction;
844 if ((pFunction=pContext->GetFunctionById(params[3])) == NULL)
846 return pContext->ThrowNativeError("Function id %x is invalid", params[3]);
849 CPanelHandler *handler = g_MenuHelpers.GetPanelHandler(pFunction);
850 if (!panel->SendDisplay(params[2], handler, params[4]))
852 g_MenuHelpers.FreePanelHandler(handler);
858 REGISTER_NATIVES(menuNatives)
860 {"AddMenuItem", AddMenuItem},
861 {"CanPanelDrawFlags", CanPanelDrawFlags},
862 {"CancelClientMenu", CancelClientMenu},
863 {"CancelMenu", CancelMenu},
864 {"CreateMenu", CreateMenu},
865 {"CreateMenuEx", CreateMenuEx},
866 {"CreatePanel", CreatePanel},
867 {"CreatePanelFromMenu", CreatePanelFromMenu},\
868 {"DisplayMenu", DisplayMenu},
869 {"DrawPanelItem", DrawPanelItem},
870 {"DrawPanelText", DrawPanelText},
871 {"GetClientMenu", GetClientMenu},
872 {"GetMaxPageItems", GetMaxPageItems},
873 {"GetMenuExitButton", GetMenuExitButton},
874 {"GetMenuItem", GetMenuItem},
875 {"GetMenuItemCount", GetMenuItemCount},
876 {"GetMenuPagination", GetMenuPagination},
877 {"GetMenuStyle", GetMenuStyle},
878 {"GetMenuStyleHandle", GetMenuStyleHandle},
879 {"GetPanelStyle", GetPanelStyle},
880 {"InsertMenuItem", InsertMenuItem},
881 {"RemoveAllMenuItems", RemoveAllMenuItems},
882 {"RemoveMenuItem", RemoveMenuItem},
883 {"SendPanelToClient", SendPanelToClient},
884 {"SetMenuExitButton", SetMenuExitButton},
885 {"SetMenuPagination", SetMenuPagination},
886 {"SetMenuTitle", SetMenuTitle},
887 {"SetPanelTitle", SetPanelTitle},