summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-11 08:03:36 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-11 08:03:36 +0000
commit8f5721964ac7ee042e04776c722e459490061204 (patch)
tree0c936caa3cb1c851d512c7daa451e4b876420add /plugins/MirLua/docs
parenta15cfbf2d3abc5a66b394e2da551828d39994d51 (diff)
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
Diffstat (limited to 'plugins/MirLua/docs')
-rw-r--r--plugins/MirLua/docs/examples/menus.lua8
1 files changed, 8 insertions, 0 deletions
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)