summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples/icons.lua
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-09 20:42:18 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-09 20:42:18 +0000
commitdf8bc2304a8afe0319f8909f397bdf1a0670b710 (patch)
tree912af3e7cc49884c4f00fbcefd24b18f5deaccc1 /plugins/MirLua/docs/examples/icons.lua
parente80b0c7dd5b03b9e289740037171dea69691e7df (diff)
MirLua:
- renamed m_clist module to m_menus - added m_icons module - added examples with comments git-svn-id: http://svn.miranda-ng.org/main/trunk@14091 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/docs/examples/icons.lua')
-rw-r--r--plugins/MirLua/docs/examples/icons.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/MirLua/docs/examples/icons.lua b/plugins/MirLua/docs/examples/icons.lua
new file mode 100644
index 0000000000..7b9f6dca6c
--- /dev/null
+++ b/plugins/MirLua/docs/examples/icons.lua
@@ -0,0 +1,22 @@
+--- include m_icons module
+require('m_icons')
+
+--- Add icon to icoLib
+-- @param name The name of icon
+-- @param description The description of icon
+-- @param section The section in witch icon will be stored (default 'MirLua')
+-- @return handle of icon
+M.Icons.AddIcon('testIcon', 'Lua icon', 'MirLua')
+
+--- Create the icon which will be deleted below
+M.Icons.AddIcon('testRemoved', 'Lua temporary icon')
+
+--- Get icon by name
+-- @param name The name of icon
+-- @return handle of icon
+local hIcon = M.Icons.GetIcon('testRemoved')
+
+--- Remove icon from iconLib
+-- @param handle The handle of icon (or name)
+-- @return 0 on success
+M.Icons.RemoveIcon('testRemoved')