blob: e474fa138cba1554351990fcedc0577203569f69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-- 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.command_entry table.
---
-- Textadept's Command entry.
module('gui.command_entry')
-- Markdown:
-- ## Fields
--
-- * `entry_text`: The text in the entry.
--
-- ## Overview
--
-- Access to the Lua state is available through this command entry. It is useful
-- for debugging, inspecting, and entering buffer or view commands. If you try
-- cause instability in Textadept's Lua state, you might very well succeed. Be
-- careful.
--
-- Tab-completion for functions, variables, tables, etc. is available. Press the
-- `Tab` key to display a list of available completions. Use the arrow keys to
-- make a selection and press `Enter` to insert it.
--
-- Abbreviated commands for the `buffer`, `view` and `gui` are available. So
-- `buffer:append_text('textadept')` can be shortened to
-- `append_text('textadept')`. Please note `print()` calls
-- [`gui.print()`][gui_print] and not Lua's `print()`. The latter can be
-- accessed with `_G.print()`.
--
-- [gui_print]: ../modules/gui.html#print
--
-- ## Extending
--
-- You can extend the command entry to do more than enter Lua commands. An
-- example of this is [incremental search][inc_search]. See
-- `modules/textadept/find.lua` for the implementation.
--
-- [inc_search]: ../modules/gui.find.html#incremental
--
-- ## Events
--
-- The following is a list of all command entry events generated in
-- `event_name(arguments)` format:
--
-- * **command\_entry\_command** (command)<br />
-- Called when a command is entered into the Command Entry.
-- - command: the string command.
-- * **command\_entry\_keypress** (code)<br />
-- Called when a key is pressed in the Command Entry.
-- - code: the key code (according to `<gdk/gdkkeysyms.h>`).
--- Focuses the command entry.
function focus() end
|