Textadept
- Home |
- Download |
- Lua API |
- Source |
- Language Modules |
- Stats |
- Wiki |
- Mailing List
_M.textadept.menu
Defines the menus used by Textadept.
If applicable, load this module last in your ~/.textadept/init.lua, after
_M.textadept.keys
since it looks up defined key commands to show them in
menus.
Functions
select_command
()
Prompts the user to select a menu command to run.
set_contextmenu
(menu)
Sets gui.context_menu
from menu, an ordered list of menu items.
Menu items are tables containing menu text and either a function to call or
a table containing a function with its parameters to call when an item is
clicked. Menu items may also be sub-menus, ordered lists of menu items with
an additional title
key for the sub-menu’s title text.
Parameters:
menu
: The menu table to create the context menu from.
See also:
set_menubar
(menubar)
Sets gui.menubar
from menubar, a table of menus.
Each menu is an ordered list of menu items and has a title
key for the
title text. Menu items are tables containing menu text and either a function
to call or a table containing a function with its parameters to call when an
item is clicked. Menu items may also be sub-menus, ordered lists of menu
items with an additional title
key for the sub-menu’s title text.
Parameters:
menubar
: The table of menu tables to create the menubar from.
See also: