aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2007-09-24 23:06:53 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2007-09-24 23:06:53 -0400
commitf0a91b798764dee85dc919bf71d63a93ec3a68d4 (patch)
treee7fb99ac9be6cb1524bc0e23a8ba7ab92597301d
parentbc45d6d081ebe6e2c26e5691d7242c1042472244 (diff)
downloadtextadept-f0a91b798764dee85dc919bf71d63a93ec3a68d4.tar.gz
textadept-f0a91b798764dee85dc919bf71d63a93ec3a68d4.zip
Updated documentation.
-rw-r--r--core/._m.lua6
-rw-r--r--core/.textadept.lua21
-rw-r--r--init.lua1
3 files changed, 27 insertions, 1 deletions
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.
@@ -60,6 +61,24 @@ function get_split_table() end
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
-- views' buffer, which may not be the buffer being indexed. Throws an error
diff --git a/init.lua b/init.lua
index 88124aad..b13a939e 100644
--- a/init.lua
+++ b/init.lua
@@ -7,6 +7,7 @@ require 'ext/mime_types'
local mpath = _HOME..'modules/?.lua;'.._HOME..'/modules/?/init.lua'
package.path = package.path..';'..mpath
+-- modules to load on startup
require 'textadept'
local textadept = textadept