Textadept
- Home |
- Download |
- Lua API |
- Source |
- Language Modules |
- Stats |
- Wiki |
- Mailing List
Contents
_M.textadept.menu
Provides dynamic menus for Textadept.
This module should be require
d last, after _M.textadept.keys
since it
looks up defined key commands to show them in menus.
Functions
rebuild_command_tables
()
Rebuilds the tables used by select_command()
.
This should be called every time set_menubar()
is called.
select_command
()
Prompts the user with a filteredlist to run menu commands.
set_contextmenu
(menu_table)
Sets gui.context_menu
from the given menu table.
Parameters:
menu_table
: The menu table to create the context menu from. Each table entry is either a submenu or menu text and a function or action table.
See also:
set_menubar
(menubar)
Sets gui.menubar
from the given table of menus.
Parameters:
menubar
: The table of menus to create the menubar from. Each table entry is another table that corresponds to a particular menu. A menu can have atitle
key with string value. Each menu item is either a submenu (another menu table) or a table consisting of two items: string menu text and a function or action table just like inkeys
. The table can optionally contain 2 more number values: a GDK keycode and modifier mask for setting a menu accelerator. If the menu text is'separator'
, a menu separator is created and no action table is required.
See also:
Tables
context_menu
Contains the default right-click context menu.
menubar
Contains the main menubar.