aboutsummaryrefslogtreecommitdiff
path: root/core/.gui.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-06-11 18:51:16 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-06-11 18:51:16 -0400
commit8e66381a040f695f4203b28bc3f1d6818d0da7a2 (patch)
treee30e8115d27b423b579e60178f36a151dc795f50 /core/.gui.lua
parent7a4800f05f26067a1cef77e5431256aab4c3d675 (diff)
downloadtextadept-8e66381a040f695f4203b28bc3f1d6818d0da7a2.tar.gz
textadept-8e66381a040f695f4203b28bc3f1d6818d0da7a2.zip
Removed _G.textadept.
Created new _SCINTILLA core module. Renamed textadept.constants to _SCINTILLA.constants Renamed textadept.buffer_functions to _SCINTILLA.functions Renamed textadept.buffer_properties to _SCINTILLA.properties Created new gui core module. Renamed textadept._print() to gui._print(). Renamed textadept.check_focused_buffer() to gui.check_focused_buffer(). Renamed textadept.clipboard_text to gui.clipboard_text. Renamed textadept.context_menu to gui.context_menu Renamed textadept.command_entry to gui.command_entry. Renamed textadept.dialog to gui.dialog. Renamed textadept.docstatusbar_text to gui.docstatusbar_text. Renamed textadept.find to gui.find. Renamed textadept.focused_doc_pointer to gui.focused_doc_pointer. Renamed textadept.get_split_table() to gui.get_split_table(). Renamed textadept.gtkmenu() to gui.gtkmenu(). Renamed textadept.goto_view() to gui.goto_view(). Renamed textadept.menubar to gui.menubar. Renamed textadept.print() to gui.print(). Renamed textadept.size to gui.size. Renamed textadept.statusbar_text to gui.statusbar_text. Renamed textadept.switch_buffer() to gui.switch_buffer(). Renamed textadept.title to gui.title. Renamed textadept.buffers to _G._BUFFERS. Renamed textadept.new_buffer() to _G.new_buffer(). Renamed textadept.quit() to _G.quit(). Renamed textadept.reset() to _G.reset(). Renamed textadept.views to _G._VIEWS. Renamed textadept.user_dofile() to _G.user_dofile(). Renamed textadept.iconv to string.iconv. Renamed textadept.session_file to _SESSIONFILE. Renamed appropriate C functions.
Diffstat (limited to 'core/.gui.lua')
-rw-r--r--core/.gui.lua84
1 files changed, 84 insertions, 0 deletions
diff --git a/core/.gui.lua b/core/.gui.lua
new file mode 100644
index 00000000..04869e70
--- /dev/null
+++ b/core/.gui.lua
@@ -0,0 +1,84 @@
+-- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE.
+-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the
+-- global gui table.
+
+--- The core gui table.
+module('gui')
+
+-- Markdown:
+-- ## Fields
+--
+-- * `title`: The title of the Textadept window.
+-- * `focused_doc_pointer`: The pointer to the document associated with the
+-- buffer of the currently focused view. (Used internally; read-only.)
+-- * `menubar`: A table of GTK menus defining a menubar (write-only).
+-- * `context_menu`: A GTK menu defining the editor's context menu.
+-- * `clipboard_text`: The text on the clipboard (read-only).
+-- * `statusbar_text`: The text displayed by the statusbar (write-only).
+-- * `docstatusbar_text`: The text displayed by the doc statusbar (write-only).
+-- * `size`: The size of the Textadept window (`{ width, height}`).
+
+---
+-- Goes to the specified view.
+-- Activates the 'view_*_switch' signal.
+-- @param n A relative or absolute view index.
+-- @param absolute Flag indicating if n is an absolute index or not.
+function goto_view(n, absolute) end
+
+---
+-- Gets the current split view structure.
+-- @return table of split views. Each split view entry is a table with 4
+-- fields: 1, 2, vertical, and size. 1 and 2 have values of either
+-- split view entries or the index of the buffer shown in each view.
+-- vertical is a flag indicating if the split is vertical or not, and
+-- size is the integer position of the split resizer.
+function get_split_table() end
+
+---
+-- Creates a GTK menu, returning the userdata.
+-- @param menu_table A table defining the menu. It is an ordered list of tables
+-- with a string menu item and integer menu ID.
+-- The string menu item is 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.
+-- Submenus are just nested menu-structure tables. Their title text is defined
+-- with a 'title' key.
+function gtkmenu(menu_table) end
+
+---
+-- 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
+-- if the check fails.
+-- @param buffer The buffer in question.
+function check_focused_buffer(buffer) end
+
+---
+-- Helper function for printing messages to buffers.
+-- Splits the view and opens a new buffer for printing messages. If the message
+-- buffer is already open and a view is currently showing it, the message is
+-- printed to that view. Otherwise the view is split, goes to the open message
+-- buffer, and prints to it.
+-- @param buffer_type String type of message buffer.
+-- @param ... Message strings.
+-- @usage gui._print(locale.ERROR_BUFFER, error_message)
+-- @usage gui._print(locale.MESSAGE_BUFFER, message)
+function _print(buffer_type, ...) end
+
+---
+-- Prints messages to the Textadept message buffer.
+-- Opens a new buffer (if one hasn't already been opened) for printing messages.
+-- @param ... Message strings.
+function print(...) end
+
+---
+-- Displays a dialog with a list of buffers to switch to and switches to the
+-- selected one, if any.
+function switch_buffer() end
+
+---
+-- Displays a CocoaDialog of a specified type with the given string arguments.
+-- Each argument is like a string in Lua's 'arg' table.
+-- @return string CocoaDialog result.
+function dialog(kind, ...) end