Plugin:MirLua/Module/m clist/en

From Miranda NG
< Plugin:MirLua
Revision as of 02:03, 10 February 2022 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Other languages:

Allows you to work with menus of the contact list.

Include module: local clist = require('m_clist')

Main menu

AddMainMenuRoot

Creates a root menu item in the main menu.

Parameters

Parameter name Required Type Description
name Yes string Menu item name.
position No number Menu item position.
hIcon No light userdata Icon handle.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hRootMenuItem = m.AddMainMenuRoot('My root menu item')

AddMainMenuItem

Creates a menu item in the main menu.

Parameters

Parameter name Required Type Description
data Yes table MenuItem table.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hMenuItem = m.AddMainMenuItem({ Name ='My menu item' })

Contact menu

AddContactMenuRoot

Creates a root menu item in the contact menu.

Parameters

Parameter name Required Type Description
name Yes string Menu item name.
position No number Menu item position.
hIcon No light userdata Icon handle.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hRootMenuItem = m.AddContactMenuRoot('My contact menu item')

AddContactMenuItem

Creates a menu item in the contact menu.

Parameters

Parameter name Required Type Description
data Yes table MenuItem table.
protocol No string Name of the protocol (prefix for the service name)

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hMenuItem = m.AddContactMenuItem ({ Name ='My menu item' })

Tray menu

AddTrayMenuItem

Creates a menu item in the tray menu.

Parameters

Parameter name Required Type Description
data Yes table MenuItem table.

Result

     Type: light userdata

     If success, returns menu item handle, otherwise nil.

Example

local hMenuItem = m.AddTrayMenuItem ({ Name ='My menu item' })