From 8f5721964ac7ee042e04776c722e459490061204 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 11 Jun 2015 08:03:36 +0000 Subject: MirLua: - added ability to create submenu - fixed event hook for parameterless function git-svn-id: http://svn.miranda-ng.org/main/trunk@14112 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/docs/examples/menus.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/MirLua/docs/examples') diff --git a/plugins/MirLua/docs/examples/menus.lua b/plugins/MirLua/docs/examples/menus.lua index aee6ab8559..50e7e75cde 100644 --- a/plugins/MirLua/docs/examples/menus.lua +++ b/plugins/MirLua/docs/examples/menus.lua @@ -12,6 +12,7 @@ local hIcon = icolib.AddIcon('testMenuIcon', 'Lua icon for menus') -- @param position The position of menu item in main menu (default 0) -- @param icon The handle of icon of menu item (default NULL) -- @param service The name of service which will be called (default '') +-- @param hParentMenu The handle of parent menu (default 0) -- @return handle of menu item genmenu.AddMainMenuItem('Main menu item', 0, 0, hIcon, 'Srv/MMI') @@ -21,6 +22,7 @@ genmenu.AddMainMenuItem('Main menu item', 0, 0, hIcon, 'Srv/MMI') -- @param position The position of menu item in main menu (default 0) -- @param icon The handle of icon of menu item (default NULL) -- @param service The name of service which will be called (default '') +-- @param hParentMenu The handle of parent menu (default 0) -- @return handle of menu item genmenu.AddContactMenuItem('Contact menu item', 0, 0, hIcon, 'Srv/CMI') @@ -31,3 +33,9 @@ local hMenuItem = genmenu.AddContactMenuItem('testRemove', 0, 0, 0, 'Srv/TestRem -- @param handle The handle of menu item -- @return 0 on success genmenu.RemoveMenuItem(hMenuItem) + +--- Add root menu item +local CMIF_ROOTHANDLE = 384 +local hRoot = genmenu.AddMainMenuItem('Main menu root', CMIF_ROOTHANDLE) +--- Add child menu item +genmenu.AddMainMenuItem('Main menu child', CMIF_ROOTHANDLE, 0, nil, 'Srv/CMI', hRoot) -- cgit v1.2.3