From f0a91b798764dee85dc919bf71d63a93ec3a68d4 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 24 Sep 2007 23:06:53 -0400 Subject: Updated documentation. --- core/._m.lua | 6 ++++++ core/.textadept.lua | 21 ++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/._m.lua b/core/._m.lua index 2ba1077a..5a6d309a 100644 --- a/core/._m.lua +++ b/core/._m.lua @@ -37,3 +37,9 @@ module('_m') -- When assigning key commands to module functions, do not forget to do so AFTER -- the function has been defined. Typically key commands are placed at the end -- of files, like commands.lua in language-specific modules. + +--- +-- This module contains no functions. +function no_functions() + +end diff --git a/core/.textadept.lua b/core/.textadept.lua index 954c83ee..4675a994 100644 --- a/core/.textadept.lua +++ b/core/.textadept.lua @@ -14,12 +14,13 @@ module('textadept') -- @field title The title of the Textadept window. -- @field focused_doc_pointer The pointer to the document associated with the -- buffer of the currently focused view. (Used internally; read-only) +-- @field menubar A table of GTK menus defining a menubar (write-only). -- @field clipboard_text The text on the clipboard (read-only). -- @field statusbar_text The text displayed by the statusbar (write-only). -- @field docstatusbar_text The text displayed by the doc statusbar -- (write-only). textadept = { title = nil, focused_doc_pointer = nil, clipboard_text = nil, - statusbar_text = nil, docstatusbar_text = nil } + menubar = nil, statusbar_text = nil, docstatusbar_text = nil } --- -- A numerically indexed table of open buffers in Textadept. @@ -59,6 +60,24 @@ function get_split_table() end -- Focuses the command entry. function focus_command() end +--- +-- Creates a GTK menu, returning the userdata. +-- @param menu_table A table defining the menu. It is an ordered list of strings +-- that are handled as follows: +-- 'gtk-*' - a stock menu item is created based on the GTK stock-id. +-- 'separator' - a menu separator item is created. +-- Otherwise a regular menu item with a mnemonic is created. +-- An additional 'title' key can be used to define the menu's title text (if it +-- is a submenu). +-- @see popupmenu +function gtkmenu(menu_table) end + +--- +-- Pops up a GTK menu at the cursor. +-- @param menu The menu userdata returned by gtkmenu. +-- @see gtkmenu +function popupmenu(menu) + --- -- Checks if the buffer being indexed is the currently focused buffer. -- This is necessary because any buffer actions are performed in the focused -- cgit v1.2.3