From 44d46d022675756783e3c007923a77446d52b7e7 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 17 Jun 2010 21:40:46 -0400 Subject: Renamed core/.*.lua to core/.*.luadoc documentation files. --- core/._G.lua | 74 ---- core/._G.luadoc | 74 ++++ core/._m.lua | 62 --- core/._m.luadoc | 62 +++ core/.buffer.lua | 961 --------------------------------------------- core/.buffer.luadoc | 961 +++++++++++++++++++++++++++++++++++++++++++++ core/.command_entry.lua | 42 -- core/.command_entry.luadoc | 42 ++ core/.find.lua | 80 ---- core/.find.luadoc | 80 ++++ core/.gui.lua | 84 ---- core/.gui.luadoc | 84 ++++ core/.iconv.lua | 15 - core/.iconv.luadoc | 15 + core/.view.lua | 39 -- core/.view.luadoc | 39 ++ 16 files changed, 1357 insertions(+), 1357 deletions(-) delete mode 100644 core/._G.lua create mode 100644 core/._G.luadoc delete mode 100644 core/._m.lua create mode 100644 core/._m.luadoc delete mode 100644 core/.buffer.lua create mode 100644 core/.buffer.luadoc delete mode 100644 core/.command_entry.lua create mode 100644 core/.command_entry.luadoc delete mode 100644 core/.find.lua create mode 100644 core/.find.luadoc delete mode 100644 core/.gui.lua create mode 100644 core/.gui.luadoc delete mode 100644 core/.iconv.lua create mode 100644 core/.iconv.luadoc delete mode 100644 core/.view.lua create mode 100644 core/.view.luadoc (limited to 'core') diff --git a/core/._G.lua b/core/._G.lua deleted file mode 100644 index 1ee02455..00000000 --- a/core/._G.lua +++ /dev/null @@ -1,74 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- _G table. - ---- Extends Lua's _G table to provide extra functions and fields. -module('_G') - --- Markdown: --- ## Fields --- --- * `_HOME`: Path to the directory containing Textadept. --- * `_LEXERPATH`: Paths to lexers, formatted like --- [`package.path`][package_path]. --- * `_RELEASE`: The Textadept release version. --- * `_THEME`: The [theme][theme] file to use. --- * `_USERHOME`: Path to the user's `~/.textadept/`. --- * `_CHARSET`: The character set encoding of the filesystem. This is used in --- [File I/O][file_io]. --- * `RESETTING`: If [`reset()`][reset] has been called, --- this flag is `true` while the Lua state is being re-initialized. --- * `WIN32`: If Textadept is running on Windows, this flag is `true`. --- * `MAC`: If Textadept is running on Mac OSX, this flag is `true`. --- --- [package_path]: http://www.lua.org/manual/5.1/manual.html#pdf-package.path --- [theme]: ../manual/6_Startup.html --- [file_io]: ../modules/io.html --- [reset]: ../modules/_G.html#reset - ---- --- Command line parameters. --- @class table --- @name arg -arg = {} - - ---- --- A numerically indexed table of open buffers in Textadept. --- @class table --- @name _BUFFERS -_BUFFERS = {} - ---- --- A numerically indexed table of views in Textadept. --- @class table --- @name _VIEWS -_VIEWS = {} - ---- --- Creates a new buffer. --- Activates the 'buffer_new' signal. --- @return the new buffer. -function new_buffer() end - ---- --- Resets the Lua state by reloading all init scripts. --- Language-specific modules for opened files are NOT reloaded. Re-opening the --- files that use them will reload those modules. --- This function is useful for modifying init scripts (such as keys.lua) on the --- fly without having to restart Textadept. --- A global RESETTING variable is set to true when re-initing the Lua State. Any --- scripts that need to differentiate between startup and reset can utilize this --- variable. -function reset() end - ---- Quits Textadept. -function quit() end - ---- --- Calls 'dofile' on the given filename in the user's Textadept directory. --- This is typically used for loading user files like key commands or snippets. --- Errors are printed to the Textadept message buffer. --- @param filename The name of the file (not path). --- @return true if successful; false otherwise. -function user_dofile(filename) end diff --git a/core/._G.luadoc b/core/._G.luadoc new file mode 100644 index 00000000..1ee02455 --- /dev/null +++ b/core/._G.luadoc @@ -0,0 +1,74 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the +-- _G table. + +--- Extends Lua's _G table to provide extra functions and fields. +module('_G') + +-- Markdown: +-- ## Fields +-- +-- * `_HOME`: Path to the directory containing Textadept. +-- * `_LEXERPATH`: Paths to lexers, formatted like +-- [`package.path`][package_path]. +-- * `_RELEASE`: The Textadept release version. +-- * `_THEME`: The [theme][theme] file to use. +-- * `_USERHOME`: Path to the user's `~/.textadept/`. +-- * `_CHARSET`: The character set encoding of the filesystem. This is used in +-- [File I/O][file_io]. +-- * `RESETTING`: If [`reset()`][reset] has been called, +-- this flag is `true` while the Lua state is being re-initialized. +-- * `WIN32`: If Textadept is running on Windows, this flag is `true`. +-- * `MAC`: If Textadept is running on Mac OSX, this flag is `true`. +-- +-- [package_path]: http://www.lua.org/manual/5.1/manual.html#pdf-package.path +-- [theme]: ../manual/6_Startup.html +-- [file_io]: ../modules/io.html +-- [reset]: ../modules/_G.html#reset + +--- +-- Command line parameters. +-- @class table +-- @name arg +arg = {} + + +--- +-- A numerically indexed table of open buffers in Textadept. +-- @class table +-- @name _BUFFERS +_BUFFERS = {} + +--- +-- A numerically indexed table of views in Textadept. +-- @class table +-- @name _VIEWS +_VIEWS = {} + +--- +-- Creates a new buffer. +-- Activates the 'buffer_new' signal. +-- @return the new buffer. +function new_buffer() end + +--- +-- Resets the Lua state by reloading all init scripts. +-- Language-specific modules for opened files are NOT reloaded. Re-opening the +-- files that use them will reload those modules. +-- This function is useful for modifying init scripts (such as keys.lua) on the +-- fly without having to restart Textadept. +-- A global RESETTING variable is set to true when re-initing the Lua State. Any +-- scripts that need to differentiate between startup and reset can utilize this +-- variable. +function reset() end + +--- Quits Textadept. +function quit() end + +--- +-- Calls 'dofile' on the given filename in the user's Textadept directory. +-- This is typically used for loading user files like key commands or snippets. +-- Errors are printed to the Textadept message buffer. +-- @param filename The name of the file (not path). +-- @return true if successful; false otherwise. +function user_dofile(filename) end diff --git a/core/._m.lua b/core/._m.lua deleted file mode 100644 index d5f52a94..00000000 --- a/core/._m.lua +++ /dev/null @@ -1,62 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- global _m table. - ---- --- A table of loaded modules. -module('_m') - --- Markdown: --- ## Overview --- --- Modules utilize the Lua 5.1 package model. It is recommended to put all --- modules in your `~/.textadept/modules/` directory. A module consists of a --- single directory with an `init.lua` script to load any additional Lua files --- (typically in the same location). Essentially there are two classes of --- modules: generic and language-specific. --- --- ## Generic Modules --- --- This class of modules is usually available globally for programming in all --- languages. An example is the [`_m.textadept`][m_textadept] module which adds --- a wide variety of text editing capabilities to Textadept. --- --- [m_textadept]: ../modules/_m.textadept.html --- --- ## Language-specific Modules --- --- Each module of this class of modules is named after a language lexer in --- `lexers/` and is usually available only for editing code in that particular --- programming language. Examples are the [`_m.cpp`][m_cpp] and --- [`_m.lua`][m_lua] modules which provide special editing features for the --- C/C++ and Lua languages respectively. --- --- [m_cpp]: ../modules/_m.cpp.html --- [m_lua]: ../modules/_m.lua.html --- --- Note: While language-specific modules can only be used by files of that --- language, they persist in Textadept's Lua state. Because of this, it is not --- recommended to set global functions or variables and depend on them, as they --- may be inadvertantly overwritten. Keep these inside the module. --- --- ## Loading Modules --- --- Generic modules can be loaded using `require`: --- --- require 'module_name' --- --- Language-specific modules are automatically loaded when a file of that --- language is loaded or a buffer's lexer is set to that language. --- --- ## Modules and Key Commands --- --- When assigning [key commands][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. --- --- [key_commands]: ../modules/_m.textadept.keys.html - ---- --- This module contains no functions. -function no_functions() end diff --git a/core/._m.luadoc b/core/._m.luadoc new file mode 100644 index 00000000..d5f52a94 --- /dev/null +++ b/core/._m.luadoc @@ -0,0 +1,62 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the +-- global _m table. + +--- +-- A table of loaded modules. +module('_m') + +-- Markdown: +-- ## Overview +-- +-- Modules utilize the Lua 5.1 package model. It is recommended to put all +-- modules in your `~/.textadept/modules/` directory. A module consists of a +-- single directory with an `init.lua` script to load any additional Lua files +-- (typically in the same location). Essentially there are two classes of +-- modules: generic and language-specific. +-- +-- ## Generic Modules +-- +-- This class of modules is usually available globally for programming in all +-- languages. An example is the [`_m.textadept`][m_textadept] module which adds +-- a wide variety of text editing capabilities to Textadept. +-- +-- [m_textadept]: ../modules/_m.textadept.html +-- +-- ## Language-specific Modules +-- +-- Each module of this class of modules is named after a language lexer in +-- `lexers/` and is usually available only for editing code in that particular +-- programming language. Examples are the [`_m.cpp`][m_cpp] and +-- [`_m.lua`][m_lua] modules which provide special editing features for the +-- C/C++ and Lua languages respectively. +-- +-- [m_cpp]: ../modules/_m.cpp.html +-- [m_lua]: ../modules/_m.lua.html +-- +-- Note: While language-specific modules can only be used by files of that +-- language, they persist in Textadept's Lua state. Because of this, it is not +-- recommended to set global functions or variables and depend on them, as they +-- may be inadvertantly overwritten. Keep these inside the module. +-- +-- ## Loading Modules +-- +-- Generic modules can be loaded using `require`: +-- +-- require 'module_name' +-- +-- Language-specific modules are automatically loaded when a file of that +-- language is loaded or a buffer's lexer is set to that language. +-- +-- ## Modules and Key Commands +-- +-- When assigning [key commands][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. +-- +-- [key_commands]: ../modules/_m.textadept.keys.html + +--- +-- This module contains no functions. +function no_functions() end diff --git a/core/.buffer.lua b/core/.buffer.lua deleted file mode 100644 index de553c2f..00000000 --- a/core/.buffer.lua +++ /dev/null @@ -1,961 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- global buffer table. - ---- --- The current buffer in the currently focused view. --- It also represents the structure of any buffer table in 'buffers'. -module('buffer') - --- Markdown: --- ## Fields --- --- * `doc_pointer`: The pointer to the document associated with this buffer. --- (Used internally; read-only) --- * `dirty`: Flag indicating whether or not the buffer has been modified since --- it was last saved. --- * `filename`: The absolute path to the file associated with this buffer. It --- is encoded in UTF-8. Use [`string.iconv()`][string_iconv] for charset --- conversions. --- * `encoding`: The encoding of the file on the hard disk. It will be nil if --- the file is a binary file. --- * `encoding_bom`: The byte-order mark of the file encoding (if any). --- * `additional_caret_fore`: The foreground color of additional carets. --- * `additional_carets_blink`: The rate in milliseconds at which additional --- carets blink. --- * `additional_carets_visible`: Flag indicating whether or not additional --- carets are visible. --- * `additional_sel_alpha`: The alpha of additional selections. --- * `additional_sel_back`: The background color of additional selections. --- * `additional_sel_fore`: The foreground color of additional selections. --- * `additional_selection_typing`: Flag indicating whether or not typing, --- backspace, or delete works with multiple selections simultaneously. --- * `anchor`: The position of the opposite end of the selection to the caret. --- * `annotation_lines`: The number of lines annotating the indexed line. --- (Read-only) --- * `annotation_style`: The style of the annotated text at the indexed line. --- * `annotation_style_offset`: The style number offset for annotations. This is --- used to keep lexer and margin styles separate from annotation styles. --- * `annotation_visible`: The annotation display mode.
--- * 0: Annotations are not displayed. --- * 1: Annotations are drawn left justified with no adornment. --- * 2: Annotations are indented to match the text and are surrounded by a --- box. --- * `auto_c_auto_hide`: Flag indicating whether or not autocompletion is hidden --- automatically when nothing matches. --- * `auto_c_cancel_at_start`: Flag indicating whether or not autocompletion --- should be cancelled if the user backspaces to a position before where it --- was created. --- * `auto_c_choose_single`: Flag indicating whether or not a single item in --- autocompletion should be chosen automatically. --- * `auto_c_drop_rest_of_word`: Flag indicating whether or not autocompletion --- deletes any word characters after the inserted text upon completion. --- * `auto_c_fill_ups`: A string of characters that when typed will cause the --- autocompletion to choose the selected item. --- * `auto_c_ignore_case`: Flag indicating whether or not case is significant --- when performing autocompletion searches. --- * `auto_c_max_height`: The maximum height in rows of autocompletion and user --- lists. Default is 5. --- * `auto_c_max_width`: The maximum width in characters of autocompletion and --- user lists. --- * `auto_c_type_separator`: The (integer) type separator character in the --- string setting up an autocompletion list. --- * `back_space_un_indents`: Flag indicating whether or not a backspace press --- when the caret is within indentation unindents. --- * `buffered_draw`: Flag indicating whether or not text is drawn into a buffer --- first or directly onto the screen. --- * `call_tip_back`: The background [color][color] for the call tip. --- (Write-only) --- * `call_tip_fore`: The foreground [color][color] for the call tip. --- (Write-only) --- * `call_tip_fore_hlt`: The foreground [color][color] for the highlighted part --- of the call tip. --- * `call_tip_use_style`: Call tip tab size in pixels. (Enables --- `STYLE_CALLTIP`.) --- * `caret_fore`: The foreground [color][color] of the caret. --- * `caret_line_back`: The [color][color] of the background of the line --- containing the caret. --- * `caret_line_back_alpha`: The background alpha of the caret line. --- * `caret_line_visible`: Flag indicating whether or not the background of the --- line containing the caret is a different color. --- * `caret_period`: The time in milliseconds that the caret is on and off. 0 is --- a steady on. --- * `caret_sticky`: Flag indicating whether or not the caret preferred x --- position can only be changed by explicit movement commands. --- * `caret_style`: The style of the caret to be drawn.
--- * 0: invisible --- * 1: line --- * 2: block --- * `caret_width`: The width of the insert mode caret in pixels. --- * `char_at`: The character byte at given index position. (Read-only) --- * `character_pointer`: The pointer to the first character in the document. --- (Read-only) --- * `code_page`: The code page used to interpret the bytes of the document as --- characters. --- * `column`: The column number of an index position, taking tab width into --- account. --- * `control_char_symbol`: The character used to display control characters. --- (< 32 uses that control character) --- * `current_pos`: The position of the caret. --- * `cursor`: The cursor type.
--- * -1: normal --- * 4: wait. --- * `direct_function`: The pointer to a function that processes messages for --- this Scintilla. (Read-only) --- * `direct_pointer`: The pointer value to use as the first function argument --- when calling the function returned by direct_function. --- * `eol_mode`: The end of line mode.
--- * 0: `CRLF` --- * 1: `CR` --- * 2: `LF` --- * `edge_colour`: The [color][color] used in edge indication. --- * `edge_column`: The column number which text should be kept within. --- * `edge_mode`: The edge highlight mode.
--- * 0: None --- * 1: Line --- * 2: Background --- * `end_at_last_line`: Flag indicating whether or not the maximum scroll --- position has the last line at the bottom of the view. Default is true. --- * `end_styled`: The position of the last correctly styled character. --- (Read-only) --- * `extra_ascent`: The extra space above lines. --- * `extra_descent`: The extra space below lines. --- * `first_visible_line`: The display line at the top of the display. --- * `focus`: The internal focus flag. --- * `fold_expanded`: Flag indicating whether or not an indexed (header) line --- has been expanded. --- * `fold_level`: The fold level of an indexed line.
--- * 0x400: Base --- * 0x1000: White --- * 0x2000: Header --- * 0x0FFF: Number mask --- * `fold_parent`: The parent line of indexed (child) line. (Read-only) --- * `font_quality`: The font quality (antialiasing method). (Windows only)
--- * 0: Default --- * 1: Non-antialiased --- * 2: Antialiased --- * 3: LCD Optimized --- * `h_scroll_bar`: Flag indicating whether or not the horizontal scroll bar is --- visible. --- * `highlight_guide`: The highlighted indentation guide column. --- * `hotspot_active_underline`: Flag indicating whether or not active hotspots --- are underlined. --- * `hotspot_single_line`: Flag indicating whether or not hotspots are limited --- to a single line so hotspots on two lines do not merge. --- * `indent`: The indentation size. --- * `indentation_guides`: Flag indicating whether or not indentation guides are --- visible. --- * `indic_alpha`: The alpha transparency of an indexed indicator. This value --- ranges from 0 (transparent) to 100 (opaque). --- * `indic_fore`: The foreground [color][color] of an indexed indicator. --- * `indic_style`: The style of an indexed indicator.
--- * 0: Plain --- * 1: Squiggle --- * 2: TT --- * 3: Diagonal --- * 4: Strike --- * 5: Hidden --- * 6: Box --- * 7: Roundbox. --- * `indic_under`: Flag indicating whether or not an indexed indicator is drawn --- over text. Default is `true`. --- * `indicator_current`: The indicator used for `indicator_fill_range` and --- `indicator_clear_range`. --- * `indicator_value`: The value used for `indicator_fill_range`. --- * `key_words`: Unused. --- * `keys_unicode`: Flag indicating whether or not to treat character keys as --- unicode. --- * `layout_cache`: The degree of caching of layout information. --- * `length`: The number of characters in the document. (Read-only). --- * `lexer`: The (integer) lexing language of the document. --- * `line_count`: The number of lines in the document (>= 1). (Read-only). --- * `line_end_position`: The position after the last visible character on an --- index line. (Read-only) --- * `line_indent_position`: The position before the first non-indentation --- character on an indexed line. (Read-only) --- * `line_indentation`: The number of columns an indexed line is indented. --- * `line_state`: Extra styling information of an indexed line. --- * `line_visible`: Flag indicating whether or not the indexed line is visible. --- (Read-only) --- * `lines_on_screen`: The number of lines completely visible. (Read-only) --- * `main_selection`: The main selection. --- * `margin_left`: The size in pixels of the left margin. --- * `margin_mask_n`: The marker mask of an indexed margin. --- * `margin_right`: The size in pixels of the right margin. --- * `margin_sensitive_n`: Flag indicating whether or not the indexed margin is --- sensitive to mouse clicks. --- * `margin_style`: The style of the margin text at the indexed line. --- * `margin_style_offset`: The style number offset for margin text. This is --- used to keep lexer and annotation styles separate from margin styles. --- * `margin_type_n`: The type of an indexed margin.
--- * 0: Symbolic --- * 1: Numeric --- * `margin_width_n`: The width of an indexed margin in pixels. --- * `max_line_state`: The last line number that has a line state. (Read-only). --- * `mod_event_mask`: Mask of modification events sent to the container. --- * `modify`: Flag indicating whether or not the document is different from --- when it was last saved. --- * `mouse_down_captures`: Flag indicating whether or not the mouse is --- captured when its button is pressed. --- * `mouse_dwell_time`: The time in milliseconds the mouse must sit still to --- generate a mouse dwell event. --- * `multi_paste`: Flag indicating whether or not pasted text goes into each --- multiple selection. --- * `multiple_selection`: Flag indicating whether or not to enable multiple --- selection. --- * `overtype`: Flag indicating whether or not overtype mode is active. --- * `paste_convert_endings`: Flag indicating whether or not line endings are --- converted when pasting text. --- * `position_cache`: The number of entries in the position cache. --- * `print_colour_mode`: The print color mode.
--- * 0: Normal --- * 1: Invert the light value of each style --- * 2: Force black on white --- * 3: Force background to be white --- * 4: Only default background is forced to be white --- * `print_magnification`: The print magnification added to the point size. --- * `print_wrap_mode`: Wrap mode.
--- * 0: None --- * 1: Word --- * `property`: The (string) value for a given (string) key index. --- * `property_int`: The (integer) value for a given (string) key index. --- (Read-only) --- * `read_only`: Flag indicating whether or not the document is read-only. --- * `rectangular_selection_anchor`: The position of the rectangular selection --- anchor. --- * `rectangular_selection_anchor_virtual_space`: The amount of virtual space --- for the rectangular selection anchor. --- * `rectangular_selection_caret`: The position of the rectangular selection --- caret. --- * `rectangular_selection_caret_virtual_space`: The amount of virtual space --- for the rectangular selection caret. --- * `rectangular_selection_modifier`: The key used to indicate that a --- rectangular selection should be created when combined with a mouse drag. ---
--- * 2: Control --- * 4: Alt --- * 8: Super (Win) --- * `scroll_width`: The document width assumed for scrolling. --- * `scroll_width_tracking`: Flag indicating whether or not the maximum width --- line displayed is used to set the scroll width. --- * `search_flags`: The search flags used by `search_in_target`. --- * `sel_alpha`: The alpha of the selection. --- * `sel_eol_filled`: Flag indicating whether or not the selection end of line --- is filled. --- * `selection_end`: The position that ends the selection. (current_pos) --- * `selection_is_rectangle`: Flag indicating whether or not the selection is --- rectangular. (Read-only) --- * `selection_mode`: The mode of the current selection.
--- * 0: Stream --- * 1: Rectangle --- * 2: Lines --- * `selection_n_anchor`: The position of the anchor for an existing selection. --- * `selection_n_anchor_virtual_space`: The amount of virtual space for the --- anchor for an existing selection. --- * `selection_n_caret`: The position of the caret for an existing selection. --- * `selection_n_caret_virtual_space`: The amount of virtual space for the --- anchor for an existing selection. --- * `selection_n_end`: The end position of an existing selection. --- * `selection_n_start`: The start position of an existing selection. --- * `selection_start`: The position that starts the selection. (anchor) --- * `selections`: The number of selections currently active. (Read-only) --- * `status`: error status. 0: OK. --- * `style_at`: The style byte at the index position. (Read-only) --- * `style_back`: The background [color][color] of an indexed style. --- * `style_bits`: The number of bits in style bytes. --- * `style_bits_needed`: The number of bits the current lexer needs for --- styling. (Read-only) --- * `style_bold`: Flag indicating whether or not the indexed style is bold. --- * `style_case`: The case of an indexed style.
--- * 0: Mixed --- * 1: Upper --- * 2: Lower --- * `style_changeable`: Flag indicating whether or not the indexed style is --- changeable. --- * `style_character_set`: The character set of the font in the indexed style. --- * `style_eol_filled`: Flag indicating whether or not the indexed style's end --- of line is filled. --- * `style_font`: The font of the indexed style. --- * `style_fore`: The foreground [color][color] of the indexed style. --- * `style_hot_spot`: Flag indicating whether or not the indexed style is a --- hotspot. --- * `style_italic`: Flag indicating whether or not the indexed style is italic. --- * `style_size`: The font size of the indexed style. --- * `style_underline`: Flag indicating whether or not the indexed style is --- underlined. --- * `style_visible`: Flag indicating whether or not the indexed style is --- visible. --- * `tab_indents`: Flag indicating whether or not a tab press when the caret --- is within indentation indents. --- * `tab_width`: The visible size of a tab in multiples of the width of a space --- character. --- * `target_end`: The position that ends the target which is used for updating --- the document without affecting the scroll position. --- * `target_start`: The position that starts the target which is used for --- updating the document without affecting the scroll position. --- * `text_length`: The number of characters in the document. (Read-only) --- * `two_phase_draw`: Flag indicating whether or not drawing is performed in --- two phases: background and then foreground. --- * `undo_collection`: Flag indicating whether or not an undo history is being --- collected. --- * `use_palette`: Flag indicating whether or not Scintilla uses the env's --- palette calls to display more colors. --- * `use_tabs`: Flag indicating whether or not indentation uses tabs and spaces --- or just spaces. --- * `v_scroll_bar`: Flag indicating whether or not the vertical scroll bar is --- visible. --- * `view_eol`: Flag indicating whether or not end of line characters are --- visible. --- * `view_ws`: Flag indicating whether or not whitespace characters are visible. --- * `virtual_space_options`: Options for enabling virtual space.
--- * 0: Disabled. --- * 1: Enabled only for rectangular selection. --- * 2: Enabled. --- * `whitespace_chars`: The set of characters making up whitespace when moving --- or selecting by word. Should be called after setting word_chars. --- (Write-only) --- * `wrap_indent_mode`: The modes of wrapped sublines.
--- * 0: Wrapped sublines aligned to left of window plus amount set by --- `buffer.wrap_start_indent`. --- * 1: Wrapped sublines are aligned to first subline indent. --- * 2: Wrapped sublines are aligned to first subline indent plus one more --- level of indentation. --- * `whitespace_size`: The size of the dots used for marking space characters. --- * `word_chars`: The set of characters making up words when moving or --- selecting by word. (Write-only) --- * `wrap_mode`: Flag indicating whether or not text is word wrapped. --- * `wrap_start_indent`: The start indent for wrapped lines. --- * `wrap_visual_flags`: The display mode of visual flags for wrapped lines. ---
--- * 0: None --- * 1: End --- * 2: Start --- * `wrap_visual_flags_location`: The location of visual flags for wrapped --- lines.
--- * 0: Default --- * 1: End by text --- * 2: Start by text --- * `x_offset`: The horizontal scroll position. --- * `zoom`: The zoom level added to all font sizes. +: magnify, -: reduce. --- --- [string_iconv]: ../modules/string.html#iconv --- [color]: http://scintilla.org/ScintillaDoc.html#colour - ---- --- Gets a range of text from the current buffer. --- The indexed buffer must be the currently focused one. --- @param start_pos The beginning position of the range of text to get. --- @param end_pos The end position of the range of text to get. -function buffer:text_range(start_pos, end_pos) - ---- --- Deletes the current buffer. --- The indexed buffer must be the currently focused one. WARNING: this function --- should NOT be called via scripts. io provides a close() function for buffers --- to prompt for confirmation if necessary; this function does not. Activates --- the 'buffer_deleted' signal. -function buffer:delete() - ---- Adds a new selection from anchor to caret as the main selection. All other --- selections are retained as additional selections. -function buffer:add_selection(caret, anchor) ---- Adds text to the document at the current position. -function buffer:add_text(text) ---- Adds an action to the undo stack. -function buffer:add_undo_action(token, flags) ---- Enlarges the document to a particular size of text bytes -function buffer:allocate(bytes) ---- Clears all lines of annotations. -function buffer:annotation_clear_all() ---- Returns the styles of the annotation for the given line. -function buffer:annotation_get_styles(line) ---- Returns the annotation text for the given line. -function buffer:annotation_get_text(line) ---- Sets the styled annotation text for the given line. -function buffer:annotation_set_styles(line, styles) ---- Sets the annotation text for the given line. -function buffer:annotation_set_text(line, text) ---- Appends a string to the end of the document without changing the selection. -function buffer:append_text(text) ---- Returns a flag indicating whether or not an autocompletion list is visible. -function buffer:auto_c_active() ---- Removes the autocompletion list from the screen. -function buffer:auto_c_cancel() ---- Item selected; removes the list and insert the selection. -function buffer:auto_c_complete() ---- Returns the currently selected item position in the autocompletion list. -function buffer:auto_c_get_current() ---- Returns the currently selected text in the autocompletion list. -function buffer:auto_c_get_current_text() ---- Returns the position of the caret when the autocompletion list was shown. -function buffer:auto_c_pos_start() ---- Selects the item in the autocompletion list that starts with a string. -function buffer:auto_c_select(string) ---- Displays an autocompletion list. --- @param len_entered The number of characters before the caret used to provide --- the context. --- @param item_list String if completion items separated by spaces. -function buffer:auto_c_show(len_entered, item_list) ---- Defines a set of characters that why typed cancel the autocompletion list. -function buffer:auto_c_stops(chars) ---- Dedents selected lines. -function buffer:back_tab() ---- Starts a sequence of actions that are undone/redone as a unit. -function buffer:begin_undo_action() ---- Highlights the character at a position indicating there's no matching brace. -function buffer:brace_bad_light(pos) ---- Highlights the characters at two positions as matching braces. -function buffer:brace_highlight(pos1, pos2) ---- Returns the position of a matching brace at a position or -1. -function buffer:brace_match(pos) ---- Returns a flag indicating whether or not a call tip is active. -function buffer:call_tip_active() ---- Removes the call tip from the screen. -function buffer:call_tip_cancel() ---- Returns the position where the caret was before showing the call tip. -function buffer:call_tip_pos_start() ---- Highlights a segment of a call tip. -function buffer:call_tip_set_hlt(start_pos, end_pos) ---- Shows a call tip containing text at or near a position. -function buffer:call_tip_show(pos, text) ---- Returns a flag indicating whether or not a paste will succeed. -function buffer:can_paste() ---- Returns a flag indicating whether or not there are redoable actions in the --- undo history. -function buffer:can_redo() ---- Returns a flag indicating whether or not there are redoable actions in the --- undo history. -function buffer:can_undo() ---- Cancels any modes such as call tip or autocompletion list display. -function buffer:cancel() ---- Moves the caret left one character. -function buffer:char_left() ---- Moves the caret left one character, extending the selection. -function buffer:char_left_extend() ---- Moves the caret left one character, extending the rectangular selection. -function buffer:char_left_rect_extend() ---- Finds the closest character to a point. -function buffer:char_position_from_point(x, y) ---- Finds the closest character to a point, but returns -1 if the given point is --- outside the window or not close to any characters. -function buffer:char_position_from_point_close(x, y) ---- Moves the caret right one character. -function buffer:char_right() ---- Moves the caret right one character, extending the selection. -function buffer:char_right_extend() ---- Moves the caret right one character, extending the rectangular selection. -function buffer:char_right_rect_extend() ---- Sets the last x chosen value to be the caret x position. -function buffer:choose_caret_x() ---- Clears the selection. -function buffer:clear() ---- Deletes all text in the document. -function buffer:clear_all() ---- Drops all key mappings. -function buffer:clear_all_cmd_keys() ---- Sets all style bytes to 0, remove all folding information. -function buffer:clear_document_style() ---- Clears all the registered XPM images. -function buffer:clear_registered_images() ---- Clears all selections. -function buffer:clear_selections() ---- Colorizes a segment of the document using the current lexing language. -function buffer:colourise(start_pos, end_pos) ---- Converts all line endings in the document to one mode. --- @param mode The line ending mode. 0: CRLF, 1: CR, 2: LF. -function buffer:convert_eo_ls(mode) ---- Copies the selection to the clipboard. -function buffer:copy() ---- Copies the selection to the clipboard or the current line. -function buffer:copy_allow_line() ---- Copies a range of text to the clipboard. -function buffer:copy_range(start_pos, end_pos) ---- Copies argument text to the clipboard. -function buffer:copy_text(text) ---- Cuts the selection to the clipboard. -function buffer:cut() ---- Deletes back from the current position to the start of the line. -function buffer:del_line_left() ---- Deletes forwards from the current position to the end of the line. -function buffer:del_line_right() ---- Deletes the word to the left of the caret. -function buffer:del_word_left() ---- Deletes the word to the right of the caret. -function buffer:del_word_right() ---- Deletes the word to the right of the caret to its end. -function buffer:del_word_right_end() ---- Deletes the selection or the character before the caret. -function buffer:delete_back() ---- Deletes the selection or the character before the caret. Will not delete the --- character before at the start of a lone. -function buffer:delete_back_not_line() ---- Returns the document line of a display line taking hidden lines into --- account. -function buffer:doc_line_from_visible() ---- Moves the caret to the last position in the document. -function buffer:document_end() ---- Moves the caret to the last position in the document, extending the --- selection. -function buffer:document_end_extend() ---- Moves the caret to the first position in the document. -function buffer:document_start() ---- Moves the caret to the first position in the document, extending the --- selection. -function buffer:document_start_extend() ---- Switches from insert to overtype mode or the reverse. -function buffer:edit_toggle_overtype() ---- Deletes the undo history. -function buffer:empty_undo_buffer() ---- Translates a UTF8 string into the document encoding and returns its length. -function buffer:encoded_from_utf8(string) ---- Ends a sequence of actions that is undone/redone as a unit. -function buffer:end_undo_action() ---- Ensures a particular line is visible by expanding any header line hiding it. -function buffer:ensure_visible(line) ---- Ensures a particular line is visible by expanding any header line hiding it. --- Uses the currently set visible policy to determine which range to display. -function buffer:ensure_visible_enforce_policy(line) ---- Returns the position of the column on a line taking into account tabs and --- multi-byte characters or the line end position. -function buffer:find_column(line, column) ---- Inserts a form feed character. -function buffer:form_feed() ---- Returns the text of the line containing the caret and the index of the caret --- on the line. -function buffer:get_cur_line() ---- Returns the background color for active hotspots. -function buffer:get_hotspot_active_back() ---- Returns the foreground color for active hotspots. -function buffer:get_hotspot_active_fore() ---- Returns the last child line of a header line. -function buffer:get_last_child(header_line, level) ---- Returns the name of the lexing language used by the document. -function buffer:get_lexer_language() ---- Returns the contents of a line. -function buffer:get_line(line) ---- Returns the position of the end of the selection at the given line or -1. -function buffer:get_line_sel_end_position(line) ---- Returns the position of the start of the selection at the given line or -1. -function buffer:get_line_sel_start_position(line) ---- Returns the value of a property. -function buffer:get_property(property) ---- Returns the value of a property with "$()" variable replacement. -function buffer:get_property_expanded() ---- Returns the selected text. -function buffer:get_sel_text() ---- Returns the name of the style associated with a style number. -function buffer:get_style_name(style_num) ---- Returns the text matched by a tagged expression in a regexp search. -function buffer:get_tag(tag_num) ---- Returns all text in the document and its length. -function buffer:get_text() ---- Sets the caret to the start of a line and ensure it is visible. -function buffer:goto_line(line) ---- Sets the caret to a position and ensure it is visible. -function buffer:goto_pos(pos) ---- Sets the focus to this Scintilla widget. -function buffer:grab_focus() ---- Makes a range of lines invisible. -function buffer:hide_lines(start_line, end_line) ---- Draws the selection in normal style or with the selection highlighted. -function buffer:hide_selection(normal) ---- Moves the caret to the first position on the current line. -function buffer:home() ---- Moves the caret to the first position on the display line. -function buffer:home_display() ---- Moves the caret to the first position on the display line, extending the --- selection. -function buffer:home_display_extend() ---- Moves the caret to the first position on the current line, extending the --- selection. -function buffer:home_extend() ---- Moves the caret to the first position on the current line, extending the --- rectangular selection. -function buffer:home_rect_extend() ---- Moves the caret to the start of the current display line and then the --- document line. (If word wrap is enabled) -function buffer:home_wrap() ---- Moves the caret to the start of the current display line and then the --- document line, extending the selection. (If word wrap is enabled) -function buffer:home_wrap_extend() ---- Returns a flag indicating whether or not any indicators are present at the --- specified position. -function buffer:indicator_all_on_for(pos) ---- Turns an indicator off over a range. -function buffer:indicator_clear_range(pos, clear_length) ---- Returns the position where a particular indicator ends. -function buffer:indicator_end(indicator, pos) ---- Turns an indicator on over a range. -function buffer:indicator_fill_range(pos, fill_length) ---- Returns the position where a particular indicator starts. -function buffer:indicator_start(indicator, pos) ---- Returns the value of a particular indicator at the specified position. -function buffer:indicator_value_at(indicator, pos) ---- Inserts text at a position. -1 is the document's length. -function buffer:insert_text(pos, text) ---- Copies the line containing the caret. -function buffer:line_copy() ---- Cuts the line containing the caret. -function buffer:line_cut() ---- Deletes the line containing the caret. -function buffer:line_delete() ---- Moves the caret down one line. -function buffer:line_down() ---- Moves the caret down one line, extending the selection. -function buffer:line_down_extend() ---- Moves the caret down one line, extending the rectangular selection. -function buffer:line_down_rect_extend() ---- Duplicates the current line. -function buffer:line_duplicate() ---- Moves the caret to the last position on the current line. -function buffer:line_end() ---- Moves the caret to the last position on the display line. -function buffer:line_end_display() ---- Moves the caret to the last position on the display line, extending the --- selection. -function buffer:line_end_display_extend() ---- Moves the caret to the last position on the current line, extending the --- selection. -function buffer:line_end_extend() ---- Moves the caret to the last position on the current line, extending the --- rectangular selection. -function buffer:line_end_rect_extend() ---- Moves the caret to the last position on the current display line and then --- the document line. (If wrap mode is enabled) -function buffer:line_end_wrap() ---- Moves the caret to the last position on the current display line and then --- the document line, extending the selection. (If wrap mode is enabled) -function buffer:line_end_wrap_extend() ---- Returns the line containing the position. -function buffer:line_from_position(pos) ---- Returns the length of the specified line including EOL characters. -function buffer:line_length(line) ---- Scrolls horizontally and vertically the number of columns and lines. -function buffer:line_scroll(columns, lines) ---- Scrolls the document down, keeping the caret visible. -function buffer:line_scroll_down() ---- Scrolls the document up, keeping the caret visible. -function buffer:line_scroll_up() ---- Switches the current line with the previous. -function buffer:line_transpose() ---- Moves the caret up one line. -function buffer:line_up() ---- Moves the caret up one line, extending the selection. -function buffer:line_up_extend() ---- Moves the caret up one line, extending the rectangular selection. -function buffer:line_up_rect_extend() ---- Joins the lines in the target. -function buffer:lines_join() ---- Splits lines in the target into lines that are less wide that pixel_width --- where possible. -function buffer:lines_split(pixel_width) ---- Loads a lexer library (dll/so) -function buffer:load_lexer_library(path) ---- Transforms the selection to lower case. -function buffer:lower_case() ---- Returns the styled margin text for the given line. -function buffer:margin_get_styles(line) ---- Returns the margin text for the given line. -function buffer:margin_get_text(line) ---- Sets the styled margin text for the given line. -function buffer:margin_set_styles(line, styles) ---- Sets the margin text for the given line. -function buffer:margin_set_text(line, text) ---- Clears all margin text. -function buffer:margin_text_clear_all() ---- Adds a marker to a line, returning an ID which can be used to find or delete --- the marker. -function buffer:marker_add(line, marker_num) ---- Adds a set of markers to a line. -function buffer:marker_add_set(line, set) ---- Sets the symbol used for a particular marker number. -function buffer:marker_define(marker_num, marker_symbol) ---- Defines a marker from a pixmap. -function buffer:marker_define_pixmap(marker_num, pixmap) ---- Deletes a marker from a line. -function buffer:marker_delete(line, marker_num) ---- Deletes all markers with a particular number from all lines. -function buffer:marker_delete_all(marker_num) ---- Deletes a marker. -function buffer:marker_delete_handle(handle) ---- Gets a bit mask of all the markers set on a line. -function buffer:marker_get(line) ---- Returns the line number at which a particular marker is located. -function buffer:marker_line_from_handle(handle) ---- Finds the next line after start_line that includes a marker in marker_mask. -function buffer:marker_next(start_line, marker_mask) ---- Finds the previous line after start_line that includes a marker in --- marker_mask. -function buffer:marker_previous(start_line, marker_mask) ---- Sets the alpha used for a marker that is drawn in the text area, not the --- margin. -function buffer:marker_set_alpha(marker_num, alpha) ---- Sets the background color used for a particular marker number. -function buffer:marker_set_back(marker_num, color) ---- Sets the foreground color used for a particular marker number. -function buffer:marker_set_fore(marker_num, color) ---- Returns the symbol defined for the given marker_number. -function buffer:marker_symbol_defined(marker_number) ---- Moves the caret inside the current view if it's not there already. -function buffer:move_caret_inside_view() ---- Inserts a new line depending on EOL mode. -function buffer:new_line() ---- Null operation -function buffer:null() ---- Moves the caret one page down. -function buffer:page_down() ---- Moves the caret one page down, extending the selection. -function buffer:page_down_extend() ---- Moves the caret one page down, extending the rectangular selection. -function buffer:page_down_rect_extend() ---- Moves the caret one page up. -function buffer:page_up() ---- Moves the caret one page up, extending the selection. -function buffer:page_up_extend() ---- Moves the caret one page up, extending the rectangular selection. -function buffer:page_up_rect_extend() ---- Moves the caret one paragraph down (delimited by empty lines). -function buffer:para_down() ---- Moves the caret one paragraph down (delimited by empty lines), extending the --- selection. -function buffer:para_down_extend() ---- Moves the caret one paragraph up (delimited by empty lines). -function buffer:para_up() ---- Moves the caret one paragraph up (delimited by empty lines), extending the --- selection. -function buffer:para_up_extend() ---- Pastes the contents of the clipboard into the document replacing the --- selection. -function buffer:paste() ---- Returns the x value of the point in the window where a position is shown. -function buffer:point_x_from_position(pos) ---- Returns the y value of the point in the window where a position is shown. -function buffer:point_y_from_position(pos) ---- Returns the next position in the document taking code page into account. -function buffer:position_after(pos) ---- Returns the previous position in the document taking code page into account. -function buffer:position_before(pos) ---- Returns the position at the start of the specified line. -function buffer:position_from_line(line) ---- Returns the position from a point within the window. -function buffer:position_from_point(x, y) ---- Returns the position from a point within the window, but return -1 if not --- close to text. -function buffer:position_from_point_close(x, y) ---- Redoes the next action in the undo history. -function buffer:redo() ---- Registers and XPM image for use in autocompletion lists. -function buffer:register_image(type, xmp_data) ---- Replaces the selected text with the argument text. -function buffer:replace_sel(text) ---- Replaces the target text with the argument text. -function buffer:replace_target(text) ---- Replaces the target text with the argument text after \d processing. --- Looks for \d where d is 1-9 and replaces it with the strings captured by a --- previous RE search. -function buffer:replace_target_re(text) ---- Makes the next selection the main selection. -function buffer:rotate_selection() ---- Ensures the caret is visible. -function buffer:scroll_caret() ---- Sets the current caret position to be the search anchor. -function buffer:search_anchor() ---- Searches for a string in the target and sets the target to the found range, --- returning the length of the range or -1. -function buffer:search_in_target(text) ---- Finds some text starting at the search anchor. (Does not scroll selection) --- @param flags Mask of search flags. 2: whole word, 4: match case, 0x00100000: --- word start, 0x00200000 regexp, 0x00400000: posix. -function buffer:search_next(flags, text) ---- Finds some text starting at the search anchor and moving backwards. (Does --- not scroll the selection) --- @param flags Mask of search flags. 2: whole word, 4: match case, 0x00100000: --- word start, 0x00200000 regexp, 0x00400000: posix. -function buffer:search_prev(flags, text) ---- Selects all the text in the document. -function buffer:select_all() ---- Duplicates the selection or the line containing the caret. -function buffer:selection_duplicate() ---- Resets the set of characters for whitespace and word characters to the --- defaults. -function buffer:set_chars_default() ---- Sets some style options for folding. --- @param flags Mask of fold flags. 0x0002: line before expanded, 0x0004: line --- before contracted, 0x0008: line after expanded, 0x0010: line after --- contracted, 0x0040: level numbers, 0x0001: box. -function buffer:set_fold_flags(flags) ---- Sets the background color used as a checkerboard pattern in the fold margin. -function buffer:set_fold_margin_colour(use_setting, color) ---- Sets the foreground color used as a checkerboard pattern in the fold margin. -function buffer:set_fold_margin_hi_colour(use_setting, color) ---- Sets a background color for active hotspots. -function buffer:set_hotspot_active_back(use_setting, color) ---- Sets a foreground color for active hotspots. -function buffer:set_hotspot_active_fore(use_setting, color) ---- Sets the length of the utf8 argument for calling encoded_from_utf8. -function buffer:set_length_for_encode(bytes) ---- Sets the lexer language to the specified name. -function buffer:set_lexer_language(language_name) ---- Remembers the current position in the undo history as the position at which --- the document was saved. -function buffer:set_save_point() ---- Selects a range of text. -function buffer:set_sel(start_pos, end_pos) ---- Sets the background color of the selection and whether to use this setting. -function buffer:set_sel_back(use_setting, color) ---- Sets the foreground color of the selection and whether to use this setting. -function buffer:set_sel_fore(use_setting, color) ---- Set a single selection from anchor to caret as the only selection. -function buffer:set_selection(caret, anchor) ---- Changes the style from the current styling position for a length of --- characters to a style and move the current styling position to after this --- newly styled segment. -function buffer:set_styling(length, style) ---- Sets the styles for a segment of the document. -function buffer:set_styling_ex(length, styles) ---- Replaces the contents of the document with the argument text. -function buffer:set_text(text) ---- Sets the way the display area is determined when a particular line is to be --- moved to by find, find_next, goto_line, etc. --- @param visible_policy 0x01: slop, 0x04: strict. --- @param visible_slop 0x01: slop, 0x04: strict. -function buffer:set_visible_policy(visible_policy, visible_slop) ---- Sets the background color of all whitespace and whether to use this setting. -function buffer:set_whitespace_back(use_setting, color) ---- Sets the foreground color of all whitespace and whether to use this setting. -function buffer:set_whitespace_fore(use_setting, color) ---- Sets the way the caret is kept visible when going side-ways. --- @param caret_policy 0x01: slop, 0x04: strict, 0x10: jumps, 0x08: even. -function buffer:set_x_caret_policy(caret_policy, caret_slop) ---- Sets the way the line the caret is visible on is kept visible. --- @param caret_policy 0x01: slop, 0x04: strict, 0x10: jumps, 0x08: even. -function buffer:set_y_caret_policy(caret_policy, caret_slop) ---- Makes a range of lines visible. -function buffer:show_lines(start_line, end_line) ---- Starts notifying the container of all key presses and commands. -function buffer:start_record() ---- Sets the current styling position to pos and the styling mask to mask. -function buffer:start_styling(position, mask) ---- Stops notifying the container of all key presses and commands. -function buffer:stop_record() ---- Moves caret to the bottom of the page, or one page down if already there. -function buffer:stuttered_page_down() ---- Moves caret to the bottom of the page, or one page down if already there, --- extending the selection. -function buffer:stuttered_page_down_extend() ---- Moves caret to the top of the page, or one page up if already there. -function buffer:stuttered_page_up() ---- Moves caret to the top of the page, or one page up if already there, --- extending the selection. -function buffer:stuttered_page_up_extend() ---- Resets all styles to the global default style. -function buffer:style_clear_all() ---- Returns the font name of a given style. -function buffer:style_get_font(style_num) ---- Resets the default style to its state at startup. -function buffer:style_reset_default() ---- Moves the caret to the opposite end of the main selection. -function buffer:swap_main_anchor_caret() ---- Inserts a tab character or indent multiple lines. -function buffer:tab() ---- Returns the target converted to utf8. -function buffer:target_as_utf8() ---- Makes the target range the same as the selection range. -function buffer:target_from_selection() ---- Returns the height of a particular line of text in pixels. -function buffer:text_height(line) ---- Returns the pixel width of some text in a particular style. -function buffer:text_width(style_num, text) ---- Switches the caret between sticky and non-sticky. -function buffer:toggle_caret_sticky() ---- Switches a header line between expanded and contracted. -function buffer:toggle_fold() ---- Undoes one action in the undo history. -function buffer:undo() ---- Transforms the selection to upper case. -function buffer:upper_case() ---- Sets whether a pop up menu is displayed automatically when the user presses --- the right mouse button. -function buffer:use_pop_up(allow_popup) ---- Displays a list of strings and sends a notification when one is chosen. -function buffer:user_list_show(list_type, item_list_string) ---- Moves the caret to before the first visible character on the current line --- or the first character on the line if already there. -function buffer:vc_home() ---- Moves the caret to before the first visible character on the current line --- or the first character on the line if already there, extending the selection. -function buffer:vc_home_extend() ---- Moves the caret to before the first visible character on the current line --- or the first character on the line if already there, extending the --- rectangular selection. -function buffer:vc_home_rect_extend() ---- Moves the caret to the first visible character on the current display line --- and then the document line. (If wrap mode is enabled) -function buffer:vc_home_wrap() ---- Moves the caret to the first visible character on the current display line --- and then the document line, extending the selection. (If wrap mode is --- enabled) -function buffer:vc_home_wrap_extend() ---- Returns the display line of a document line taking hidden lines into --- account. -function buffer:visible_from_doc_line(line) ---- Returns the position of the end of a word. -function buffer:word_end_position(pos, only_word_chars) ---- Moves the caret left one word. -function buffer:word_left() ---- Moves the caret left one word, positioning the caret at the end of the word. -function buffer:word_left_end() ---- Moves the caret left one word, positioning the caret at the end of the word, --- extending the selection. -function buffer:word_left_end_extend() ---- Moves the caret left one word, extending the selection. -function buffer:word_left_extend() ---- Moves the caret to the previous change in capitalization or underscore. -function buffer:word_part_left() ---- Moves the caret to the previous change in capitalization or underscore, --- extending the selection. -function buffer:word_part_left_extend() ---- Moves the caret to the next change in capitalization or underscore. -function buffer:word_part_right() ---- Moves the caret to the next change in capitalization or underscore, --- extending the selection. -function buffer:word_part_right_extend() ---- Moves the caret right one word. -function buffer:word_right() ---- Moves the caret right one word, positioning the caret at the end of the --- word. -function buffer:word_right_end() ---- Moves the caret right one word, positioning the caret at the end of the --- word, extending the selection. -function buffer:word_right_end_extend() ---- Moves the caret right one word, extending the selection. -function buffer:word_right_extend() ---- Returns the position of a start of a word. -function buffer:word_start_position(pos, only_word_chars) ---- Returns the number of display lines needed to wrap a document line. -function buffer:wrap_count(line) ---- Magnifies the displayed text by increasing the font sizes by 1 point. -function buffer:zoom_in() ---- Makes the displayed text smaller by decreasing the font sizes by 1 point. -function buffer:zoom_out() - ---- Reloads the file in a given buffer. -function buffer:reload() ---- --- Sets the encoding for the buffer, converting its contents in the process. --- @param encoding The encoding to set. Valid encodings are ones that GTK's --- g_convert() function accepts (typically GNU iconv's encodings). --- @usage buffer:set_encoding('ASCII') -function buffer:set_encoding() ---- Saves the current buffer to a file. -function buffer:save() ---- --- Saves the current buffer to a file different than its filename property. --- @param utf8_filename The new filepath to save the buffer to. Must be UTF-8 --- encoded. -function buffer:save_as() ---- --- Closes the current buffer. --- If the buffer is dirty, the user is prompted to continue. The buffer is not --- saved automatically. It must be done manually. -function buffer:close() diff --git a/core/.buffer.luadoc b/core/.buffer.luadoc new file mode 100644 index 00000000..de553c2f --- /dev/null +++ b/core/.buffer.luadoc @@ -0,0 +1,961 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the +-- global buffer table. + +--- +-- The current buffer in the currently focused view. +-- It also represents the structure of any buffer table in 'buffers'. +module('buffer') + +-- Markdown: +-- ## Fields +-- +-- * `doc_pointer`: The pointer to the document associated with this buffer. +-- (Used internally; read-only) +-- * `dirty`: Flag indicating whether or not the buffer has been modified since +-- it was last saved. +-- * `filename`: The absolute path to the file associated with this buffer. It +-- is encoded in UTF-8. Use [`string.iconv()`][string_iconv] for charset +-- conversions. +-- * `encoding`: The encoding of the file on the hard disk. It will be nil if +-- the file is a binary file. +-- * `encoding_bom`: The byte-order mark of the file encoding (if any). +-- * `additional_caret_fore`: The foreground color of additional carets. +-- * `additional_carets_blink`: The rate in milliseconds at which additional +-- carets blink. +-- * `additional_carets_visible`: Flag indicating whether or not additional +-- carets are visible. +-- * `additional_sel_alpha`: The alpha of additional selections. +-- * `additional_sel_back`: The background color of additional selections. +-- * `additional_sel_fore`: The foreground color of additional selections. +-- * `additional_selection_typing`: Flag indicating whether or not typing, +-- backspace, or delete works with multiple selections simultaneously. +-- * `anchor`: The position of the opposite end of the selection to the caret. +-- * `annotation_lines`: The number of lines annotating the indexed line. +-- (Read-only) +-- * `annotation_style`: The style of the annotated text at the indexed line. +-- * `annotation_style_offset`: The style number offset for annotations. This is +-- used to keep lexer and margin styles separate from annotation styles. +-- * `annotation_visible`: The annotation display mode.
+-- * 0: Annotations are not displayed. +-- * 1: Annotations are drawn left justified with no adornment. +-- * 2: Annotations are indented to match the text and are surrounded by a +-- box. +-- * `auto_c_auto_hide`: Flag indicating whether or not autocompletion is hidden +-- automatically when nothing matches. +-- * `auto_c_cancel_at_start`: Flag indicating whether or not autocompletion +-- should be cancelled if the user backspaces to a position before where it +-- was created. +-- * `auto_c_choose_single`: Flag indicating whether or not a single item in +-- autocompletion should be chosen automatically. +-- * `auto_c_drop_rest_of_word`: Flag indicating whether or not autocompletion +-- deletes any word characters after the inserted text upon completion. +-- * `auto_c_fill_ups`: A string of characters that when typed will cause the +-- autocompletion to choose the selected item. +-- * `auto_c_ignore_case`: Flag indicating whether or not case is significant +-- when performing autocompletion searches. +-- * `auto_c_max_height`: The maximum height in rows of autocompletion and user +-- lists. Default is 5. +-- * `auto_c_max_width`: The maximum width in characters of autocompletion and +-- user lists. +-- * `auto_c_type_separator`: The (integer) type separator character in the +-- string setting up an autocompletion list. +-- * `back_space_un_indents`: Flag indicating whether or not a backspace press +-- when the caret is within indentation unindents. +-- * `buffered_draw`: Flag indicating whether or not text is drawn into a buffer +-- first or directly onto the screen. +-- * `call_tip_back`: The background [color][color] for the call tip. +-- (Write-only) +-- * `call_tip_fore`: The foreground [color][color] for the call tip. +-- (Write-only) +-- * `call_tip_fore_hlt`: The foreground [color][color] for the highlighted part +-- of the call tip. +-- * `call_tip_use_style`: Call tip tab size in pixels. (Enables +-- `STYLE_CALLTIP`.) +-- * `caret_fore`: The foreground [color][color] of the caret. +-- * `caret_line_back`: The [color][color] of the background of the line +-- containing the caret. +-- * `caret_line_back_alpha`: The background alpha of the caret line. +-- * `caret_line_visible`: Flag indicating whether or not the background of the +-- line containing the caret is a different color. +-- * `caret_period`: The time in milliseconds that the caret is on and off. 0 is +-- a steady on. +-- * `caret_sticky`: Flag indicating whether or not the caret preferred x +-- position can only be changed by explicit movement commands. +-- * `caret_style`: The style of the caret to be drawn.
+-- * 0: invisible +-- * 1: line +-- * 2: block +-- * `caret_width`: The width of the insert mode caret in pixels. +-- * `char_at`: The character byte at given index position. (Read-only) +-- * `character_pointer`: The pointer to the first character in the document. +-- (Read-only) +-- * `code_page`: The code page used to interpret the bytes of the document as +-- characters. +-- * `column`: The column number of an index position, taking tab width into +-- account. +-- * `control_char_symbol`: The character used to display control characters. +-- (< 32 uses that control character) +-- * `current_pos`: The position of the caret. +-- * `cursor`: The cursor type.
+-- * -1: normal +-- * 4: wait. +-- * `direct_function`: The pointer to a function that processes messages for +-- this Scintilla. (Read-only) +-- * `direct_pointer`: The pointer value to use as the first function argument +-- when calling the function returned by direct_function. +-- * `eol_mode`: The end of line mode.
+-- * 0: `CRLF` +-- * 1: `CR` +-- * 2: `LF` +-- * `edge_colour`: The [color][color] used in edge indication. +-- * `edge_column`: The column number which text should be kept within. +-- * `edge_mode`: The edge highlight mode.
+-- * 0: None +-- * 1: Line +-- * 2: Background +-- * `end_at_last_line`: Flag indicating whether or not the maximum scroll +-- position has the last line at the bottom of the view. Default is true. +-- * `end_styled`: The position of the last correctly styled character. +-- (Read-only) +-- * `extra_ascent`: The extra space above lines. +-- * `extra_descent`: The extra space below lines. +-- * `first_visible_line`: The display line at the top of the display. +-- * `focus`: The internal focus flag. +-- * `fold_expanded`: Flag indicating whether or not an indexed (header) line +-- has been expanded. +-- * `fold_level`: The fold level of an indexed line.
+-- * 0x400: Base +-- * 0x1000: White +-- * 0x2000: Header +-- * 0x0FFF: Number mask +-- * `fold_parent`: The parent line of indexed (child) line. (Read-only) +-- * `font_quality`: The font quality (antialiasing method). (Windows only)
+-- * 0: Default +-- * 1: Non-antialiased +-- * 2: Antialiased +-- * 3: LCD Optimized +-- * `h_scroll_bar`: Flag indicating whether or not the horizontal scroll bar is +-- visible. +-- * `highlight_guide`: The highlighted indentation guide column. +-- * `hotspot_active_underline`: Flag indicating whether or not active hotspots +-- are underlined. +-- * `hotspot_single_line`: Flag indicating whether or not hotspots are limited +-- to a single line so hotspots on two lines do not merge. +-- * `indent`: The indentation size. +-- * `indentation_guides`: Flag indicating whether or not indentation guides are +-- visible. +-- * `indic_alpha`: The alpha transparency of an indexed indicator. This value +-- ranges from 0 (transparent) to 100 (opaque). +-- * `indic_fore`: The foreground [color][color] of an indexed indicator. +-- * `indic_style`: The style of an indexed indicator.
+-- * 0: Plain +-- * 1: Squiggle +-- * 2: TT +-- * 3: Diagonal +-- * 4: Strike +-- * 5: Hidden +-- * 6: Box +-- * 7: Roundbox. +-- * `indic_under`: Flag indicating whether or not an indexed indicator is drawn +-- over text. Default is `true`. +-- * `indicator_current`: The indicator used for `indicator_fill_range` and +-- `indicator_clear_range`. +-- * `indicator_value`: The value used for `indicator_fill_range`. +-- * `key_words`: Unused. +-- * `keys_unicode`: Flag indicating whether or not to treat character keys as +-- unicode. +-- * `layout_cache`: The degree of caching of layout information. +-- * `length`: The number of characters in the document. (Read-only). +-- * `lexer`: The (integer) lexing language of the document. +-- * `line_count`: The number of lines in the document (>= 1). (Read-only). +-- * `line_end_position`: The position after the last visible character on an +-- index line. (Read-only) +-- * `line_indent_position`: The position before the first non-indentation +-- character on an indexed line. (Read-only) +-- * `line_indentation`: The number of columns an indexed line is indented. +-- * `line_state`: Extra styling information of an indexed line. +-- * `line_visible`: Flag indicating whether or not the indexed line is visible. +-- (Read-only) +-- * `lines_on_screen`: The number of lines completely visible. (Read-only) +-- * `main_selection`: The main selection. +-- * `margin_left`: The size in pixels of the left margin. +-- * `margin_mask_n`: The marker mask of an indexed margin. +-- * `margin_right`: The size in pixels of the right margin. +-- * `margin_sensitive_n`: Flag indicating whether or not the indexed margin is +-- sensitive to mouse clicks. +-- * `margin_style`: The style of the margin text at the indexed line. +-- * `margin_style_offset`: The style number offset for margin text. This is +-- used to keep lexer and annotation styles separate from margin styles. +-- * `margin_type_n`: The type of an indexed margin.
+-- * 0: Symbolic +-- * 1: Numeric +-- * `margin_width_n`: The width of an indexed margin in pixels. +-- * `max_line_state`: The last line number that has a line state. (Read-only). +-- * `mod_event_mask`: Mask of modification events sent to the container. +-- * `modify`: Flag indicating whether or not the document is different from +-- when it was last saved. +-- * `mouse_down_captures`: Flag indicating whether or not the mouse is +-- captured when its button is pressed. +-- * `mouse_dwell_time`: The time in milliseconds the mouse must sit still to +-- generate a mouse dwell event. +-- * `multi_paste`: Flag indicating whether or not pasted text goes into each +-- multiple selection. +-- * `multiple_selection`: Flag indicating whether or not to enable multiple +-- selection. +-- * `overtype`: Flag indicating whether or not overtype mode is active. +-- * `paste_convert_endings`: Flag indicating whether or not line endings are +-- converted when pasting text. +-- * `position_cache`: The number of entries in the position cache. +-- * `print_colour_mode`: The print color mode.
+-- * 0: Normal +-- * 1: Invert the light value of each style +-- * 2: Force black on white +-- * 3: Force background to be white +-- * 4: Only default background is forced to be white +-- * `print_magnification`: The print magnification added to the point size. +-- * `print_wrap_mode`: Wrap mode.
+-- * 0: None +-- * 1: Word +-- * `property`: The (string) value for a given (string) key index. +-- * `property_int`: The (integer) value for a given (string) key index. +-- (Read-only) +-- * `read_only`: Flag indicating whether or not the document is read-only. +-- * `rectangular_selection_anchor`: The position of the rectangular selection +-- anchor. +-- * `rectangular_selection_anchor_virtual_space`: The amount of virtual space +-- for the rectangular selection anchor. +-- * `rectangular_selection_caret`: The position of the rectangular selection +-- caret. +-- * `rectangular_selection_caret_virtual_space`: The amount of virtual space +-- for the rectangular selection caret. +-- * `rectangular_selection_modifier`: The key used to indicate that a +-- rectangular selection should be created when combined with a mouse drag. +--
+-- * 2: Control +-- * 4: Alt +-- * 8: Super (Win) +-- * `scroll_width`: The document width assumed for scrolling. +-- * `scroll_width_tracking`: Flag indicating whether or not the maximum width +-- line displayed is used to set the scroll width. +-- * `search_flags`: The search flags used by `search_in_target`. +-- * `sel_alpha`: The alpha of the selection. +-- * `sel_eol_filled`: Flag indicating whether or not the selection end of line +-- is filled. +-- * `selection_end`: The position that ends the selection. (current_pos) +-- * `selection_is_rectangle`: Flag indicating whether or not the selection is +-- rectangular. (Read-only) +-- * `selection_mode`: The mode of the current selection.
+-- * 0: Stream +-- * 1: Rectangle +-- * 2: Lines +-- * `selection_n_anchor`: The position of the anchor for an existing selection. +-- * `selection_n_anchor_virtual_space`: The amount of virtual space for the +-- anchor for an existing selection. +-- * `selection_n_caret`: The position of the caret for an existing selection. +-- * `selection_n_caret_virtual_space`: The amount of virtual space for the +-- anchor for an existing selection. +-- * `selection_n_end`: The end position of an existing selection. +-- * `selection_n_start`: The start position of an existing selection. +-- * `selection_start`: The position that starts the selection. (anchor) +-- * `selections`: The number of selections currently active. (Read-only) +-- * `status`: error status. 0: OK. +-- * `style_at`: The style byte at the index position. (Read-only) +-- * `style_back`: The background [color][color] of an indexed style. +-- * `style_bits`: The number of bits in style bytes. +-- * `style_bits_needed`: The number of bits the current lexer needs for +-- styling. (Read-only) +-- * `style_bold`: Flag indicating whether or not the indexed style is bold. +-- * `style_case`: The case of an indexed style.
+-- * 0: Mixed +-- * 1: Upper +-- * 2: Lower +-- * `style_changeable`: Flag indicating whether or not the indexed style is +-- changeable. +-- * `style_character_set`: The character set of the font in the indexed style. +-- * `style_eol_filled`: Flag indicating whether or not the indexed style's end +-- of line is filled. +-- * `style_font`: The font of the indexed style. +-- * `style_fore`: The foreground [color][color] of the indexed style. +-- * `style_hot_spot`: Flag indicating whether or not the indexed style is a +-- hotspot. +-- * `style_italic`: Flag indicating whether or not the indexed style is italic. +-- * `style_size`: The font size of the indexed style. +-- * `style_underline`: Flag indicating whether or not the indexed style is +-- underlined. +-- * `style_visible`: Flag indicating whether or not the indexed style is +-- visible. +-- * `tab_indents`: Flag indicating whether or not a tab press when the caret +-- is within indentation indents. +-- * `tab_width`: The visible size of a tab in multiples of the width of a space +-- character. +-- * `target_end`: The position that ends the target which is used for updating +-- the document without affecting the scroll position. +-- * `target_start`: The position that starts the target which is used for +-- updating the document without affecting the scroll position. +-- * `text_length`: The number of characters in the document. (Read-only) +-- * `two_phase_draw`: Flag indicating whether or not drawing is performed in +-- two phases: background and then foreground. +-- * `undo_collection`: Flag indicating whether or not an undo history is being +-- collected. +-- * `use_palette`: Flag indicating whether or not Scintilla uses the env's +-- palette calls to display more colors. +-- * `use_tabs`: Flag indicating whether or not indentation uses tabs and spaces +-- or just spaces. +-- * `v_scroll_bar`: Flag indicating whether or not the vertical scroll bar is +-- visible. +-- * `view_eol`: Flag indicating whether or not end of line characters are +-- visible. +-- * `view_ws`: Flag indicating whether or not whitespace characters are visible. +-- * `virtual_space_options`: Options for enabling virtual space.
+-- * 0: Disabled. +-- * 1: Enabled only for rectangular selection. +-- * 2: Enabled. +-- * `whitespace_chars`: The set of characters making up whitespace when moving +-- or selecting by word. Should be called after setting word_chars. +-- (Write-only) +-- * `wrap_indent_mode`: The modes of wrapped sublines.
+-- * 0: Wrapped sublines aligned to left of window plus amount set by +-- `buffer.wrap_start_indent`. +-- * 1: Wrapped sublines are aligned to first subline indent. +-- * 2: Wrapped sublines are aligned to first subline indent plus one more +-- level of indentation. +-- * `whitespace_size`: The size of the dots used for marking space characters. +-- * `word_chars`: The set of characters making up words when moving or +-- selecting by word. (Write-only) +-- * `wrap_mode`: Flag indicating whether or not text is word wrapped. +-- * `wrap_start_indent`: The start indent for wrapped lines. +-- * `wrap_visual_flags`: The display mode of visual flags for wrapped lines. +--
+-- * 0: None +-- * 1: End +-- * 2: Start +-- * `wrap_visual_flags_location`: The location of visual flags for wrapped +-- lines.
+-- * 0: Default +-- * 1: End by text +-- * 2: Start by text +-- * `x_offset`: The horizontal scroll position. +-- * `zoom`: The zoom level added to all font sizes. +: magnify, -: reduce. +-- +-- [string_iconv]: ../modules/string.html#iconv +-- [color]: http://scintilla.org/ScintillaDoc.html#colour + +--- +-- Gets a range of text from the current buffer. +-- The indexed buffer must be the currently focused one. +-- @param start_pos The beginning position of the range of text to get. +-- @param end_pos The end position of the range of text to get. +function buffer:text_range(start_pos, end_pos) + +--- +-- Deletes the current buffer. +-- The indexed buffer must be the currently focused one. WARNING: this function +-- should NOT be called via scripts. io provides a close() function for buffers +-- to prompt for confirmation if necessary; this function does not. Activates +-- the 'buffer_deleted' signal. +function buffer:delete() + +--- Adds a new selection from anchor to caret as the main selection. All other +-- selections are retained as additional selections. +function buffer:add_selection(caret, anchor) +--- Adds text to the document at the current position. +function buffer:add_text(text) +--- Adds an action to the undo stack. +function buffer:add_undo_action(token, flags) +--- Enlarges the document to a particular size of text bytes +function buffer:allocate(bytes) +--- Clears all lines of annotations. +function buffer:annotation_clear_all() +--- Returns the styles of the annotation for the given line. +function buffer:annotation_get_styles(line) +--- Returns the annotation text for the given line. +function buffer:annotation_get_text(line) +--- Sets the styled annotation text for the given line. +function buffer:annotation_set_styles(line, styles) +--- Sets the annotation text for the given line. +function buffer:annotation_set_text(line, text) +--- Appends a string to the end of the document without changing the selection. +function buffer:append_text(text) +--- Returns a flag indicating whether or not an autocompletion list is visible. +function buffer:auto_c_active() +--- Removes the autocompletion list from the screen. +function buffer:auto_c_cancel() +--- Item selected; removes the list and insert the selection. +function buffer:auto_c_complete() +--- Returns the currently selected item position in the autocompletion list. +function buffer:auto_c_get_current() +--- Returns the currently selected text in the autocompletion list. +function buffer:auto_c_get_current_text() +--- Returns the position of the caret when the autocompletion list was shown. +function buffer:auto_c_pos_start() +--- Selects the item in the autocompletion list that starts with a string. +function buffer:auto_c_select(string) +--- Displays an autocompletion list. +-- @param len_entered The number of characters before the caret used to provide +-- the context. +-- @param item_list String if completion items separated by spaces. +function buffer:auto_c_show(len_entered, item_list) +--- Defines a set of characters that why typed cancel the autocompletion list. +function buffer:auto_c_stops(chars) +--- Dedents selected lines. +function buffer:back_tab() +--- Starts a sequence of actions that are undone/redone as a unit. +function buffer:begin_undo_action() +--- Highlights the character at a position indicating there's no matching brace. +function buffer:brace_bad_light(pos) +--- Highlights the characters at two positions as matching braces. +function buffer:brace_highlight(pos1, pos2) +--- Returns the position of a matching brace at a position or -1. +function buffer:brace_match(pos) +--- Returns a flag indicating whether or not a call tip is active. +function buffer:call_tip_active() +--- Removes the call tip from the screen. +function buffer:call_tip_cancel() +--- Returns the position where the caret was before showing the call tip. +function buffer:call_tip_pos_start() +--- Highlights a segment of a call tip. +function buffer:call_tip_set_hlt(start_pos, end_pos) +--- Shows a call tip containing text at or near a position. +function buffer:call_tip_show(pos, text) +--- Returns a flag indicating whether or not a paste will succeed. +function buffer:can_paste() +--- Returns a flag indicating whether or not there are redoable actions in the +-- undo history. +function buffer:can_redo() +--- Returns a flag indicating whether or not there are redoable actions in the +-- undo history. +function buffer:can_undo() +--- Cancels any modes such as call tip or autocompletion list display. +function buffer:cancel() +--- Moves the caret left one character. +function buffer:char_left() +--- Moves the caret left one character, extending the selection. +function buffer:char_left_extend() +--- Moves the caret left one character, extending the rectangular selection. +function buffer:char_left_rect_extend() +--- Finds the closest character to a point. +function buffer:char_position_from_point(x, y) +--- Finds the closest character to a point, but returns -1 if the given point is +-- outside the window or not close to any characters. +function buffer:char_position_from_point_close(x, y) +--- Moves the caret right one character. +function buffer:char_right() +--- Moves the caret right one character, extending the selection. +function buffer:char_right_extend() +--- Moves the caret right one character, extending the rectangular selection. +function buffer:char_right_rect_extend() +--- Sets the last x chosen value to be the caret x position. +function buffer:choose_caret_x() +--- Clears the selection. +function buffer:clear() +--- Deletes all text in the document. +function buffer:clear_all() +--- Drops all key mappings. +function buffer:clear_all_cmd_keys() +--- Sets all style bytes to 0, remove all folding information. +function buffer:clear_document_style() +--- Clears all the registered XPM images. +function buffer:clear_registered_images() +--- Clears all selections. +function buffer:clear_selections() +--- Colorizes a segment of the document using the current lexing language. +function buffer:colourise(start_pos, end_pos) +--- Converts all line endings in the document to one mode. +-- @param mode The line ending mode. 0: CRLF, 1: CR, 2: LF. +function buffer:convert_eo_ls(mode) +--- Copies the selection to the clipboard. +function buffer:copy() +--- Copies the selection to the clipboard or the current line. +function buffer:copy_allow_line() +--- Copies a range of text to the clipboard. +function buffer:copy_range(start_pos, end_pos) +--- Copies argument text to the clipboard. +function buffer:copy_text(text) +--- Cuts the selection to the clipboard. +function buffer:cut() +--- Deletes back from the current position to the start of the line. +function buffer:del_line_left() +--- Deletes forwards from the current position to the end of the line. +function buffer:del_line_right() +--- Deletes the word to the left of the caret. +function buffer:del_word_left() +--- Deletes the word to the right of the caret. +function buffer:del_word_right() +--- Deletes the word to the right of the caret to its end. +function buffer:del_word_right_end() +--- Deletes the selection or the character before the caret. +function buffer:delete_back() +--- Deletes the selection or the character before the caret. Will not delete the +-- character before at the start of a lone. +function buffer:delete_back_not_line() +--- Returns the document line of a display line taking hidden lines into +-- account. +function buffer:doc_line_from_visible() +--- Moves the caret to the last position in the document. +function buffer:document_end() +--- Moves the caret to the last position in the document, extending the +-- selection. +function buffer:document_end_extend() +--- Moves the caret to the first position in the document. +function buffer:document_start() +--- Moves the caret to the first position in the document, extending the +-- selection. +function buffer:document_start_extend() +--- Switches from insert to overtype mode or the reverse. +function buffer:edit_toggle_overtype() +--- Deletes the undo history. +function buffer:empty_undo_buffer() +--- Translates a UTF8 string into the document encoding and returns its length. +function buffer:encoded_from_utf8(string) +--- Ends a sequence of actions that is undone/redone as a unit. +function buffer:end_undo_action() +--- Ensures a particular line is visible by expanding any header line hiding it. +function buffer:ensure_visible(line) +--- Ensures a particular line is visible by expanding any header line hiding it. +-- Uses the currently set visible policy to determine which range to display. +function buffer:ensure_visible_enforce_policy(line) +--- Returns the position of the column on a line taking into account tabs and +-- multi-byte characters or the line end position. +function buffer:find_column(line, column) +--- Inserts a form feed character. +function buffer:form_feed() +--- Returns the text of the line containing the caret and the index of the caret +-- on the line. +function buffer:get_cur_line() +--- Returns the background color for active hotspots. +function buffer:get_hotspot_active_back() +--- Returns the foreground color for active hotspots. +function buffer:get_hotspot_active_fore() +--- Returns the last child line of a header line. +function buffer:get_last_child(header_line, level) +--- Returns the name of the lexing language used by the document. +function buffer:get_lexer_language() +--- Returns the contents of a line. +function buffer:get_line(line) +--- Returns the position of the end of the selection at the given line or -1. +function buffer:get_line_sel_end_position(line) +--- Returns the position of the start of the selection at the given line or -1. +function buffer:get_line_sel_start_position(line) +--- Returns the value of a property. +function buffer:get_property(property) +--- Returns the value of a property with "$()" variable replacement. +function buffer:get_property_expanded() +--- Returns the selected text. +function buffer:get_sel_text() +--- Returns the name of the style associated with a style number. +function buffer:get_style_name(style_num) +--- Returns the text matched by a tagged expression in a regexp search. +function buffer:get_tag(tag_num) +--- Returns all text in the document and its length. +function buffer:get_text() +--- Sets the caret to the start of a line and ensure it is visible. +function buffer:goto_line(line) +--- Sets the caret to a position and ensure it is visible. +function buffer:goto_pos(pos) +--- Sets the focus to this Scintilla widget. +function buffer:grab_focus() +--- Makes a range of lines invisible. +function buffer:hide_lines(start_line, end_line) +--- Draws the selection in normal style or with the selection highlighted. +function buffer:hide_selection(normal) +--- Moves the caret to the first position on the current line. +function buffer:home() +--- Moves the caret to the first position on the display line. +function buffer:home_display() +--- Moves the caret to the first position on the display line, extending the +-- selection. +function buffer:home_display_extend() +--- Moves the caret to the first position on the current line, extending the +-- selection. +function buffer:home_extend() +--- Moves the caret to the first position on the current line, extending the +-- rectangular selection. +function buffer:home_rect_extend() +--- Moves the caret to the start of the current display line and then the +-- document line. (If word wrap is enabled) +function buffer:home_wrap() +--- Moves the caret to the start of the current display line and then the +-- document line, extending the selection. (If word wrap is enabled) +function buffer:home_wrap_extend() +--- Returns a flag indicating whether or not any indicators are present at the +-- specified position. +function buffer:indicator_all_on_for(pos) +--- Turns an indicator off over a range. +function buffer:indicator_clear_range(pos, clear_length) +--- Returns the position where a particular indicator ends. +function buffer:indicator_end(indicator, pos) +--- Turns an indicator on over a range. +function buffer:indicator_fill_range(pos, fill_length) +--- Returns the position where a particular indicator starts. +function buffer:indicator_start(indicator, pos) +--- Returns the value of a particular indicator at the specified position. +function buffer:indicator_value_at(indicator, pos) +--- Inserts text at a position. -1 is the document's length. +function buffer:insert_text(pos, text) +--- Copies the line containing the caret. +function buffer:line_copy() +--- Cuts the line containing the caret. +function buffer:line_cut() +--- Deletes the line containing the caret. +function buffer:line_delete() +--- Moves the caret down one line. +function buffer:line_down() +--- Moves the caret down one line, extending the selection. +function buffer:line_down_extend() +--- Moves the caret down one line, extending the rectangular selection. +function buffer:line_down_rect_extend() +--- Duplicates the current line. +function buffer:line_duplicate() +--- Moves the caret to the last position on the current line. +function buffer:line_end() +--- Moves the caret to the last position on the display line. +function buffer:line_end_display() +--- Moves the caret to the last position on the display line, extending the +-- selection. +function buffer:line_end_display_extend() +--- Moves the caret to the last position on the current line, extending the +-- selection. +function buffer:line_end_extend() +--- Moves the caret to the last position on the current line, extending the +-- rectangular selection. +function buffer:line_end_rect_extend() +--- Moves the caret to the last position on the current display line and then +-- the document line. (If wrap mode is enabled) +function buffer:line_end_wrap() +--- Moves the caret to the last position on the current display line and then +-- the document line, extending the selection. (If wrap mode is enabled) +function buffer:line_end_wrap_extend() +--- Returns the line containing the position. +function buffer:line_from_position(pos) +--- Returns the length of the specified line including EOL characters. +function buffer:line_length(line) +--- Scrolls horizontally and vertically the number of columns and lines. +function buffer:line_scroll(columns, lines) +--- Scrolls the document down, keeping the caret visible. +function buffer:line_scroll_down() +--- Scrolls the document up, keeping the caret visible. +function buffer:line_scroll_up() +--- Switches the current line with the previous. +function buffer:line_transpose() +--- Moves the caret up one line. +function buffer:line_up() +--- Moves the caret up one line, extending the selection. +function buffer:line_up_extend() +--- Moves the caret up one line, extending the rectangular selection. +function buffer:line_up_rect_extend() +--- Joins the lines in the target. +function buffer:lines_join() +--- Splits lines in the target into lines that are less wide that pixel_width +-- where possible. +function buffer:lines_split(pixel_width) +--- Loads a lexer library (dll/so) +function buffer:load_lexer_library(path) +--- Transforms the selection to lower case. +function buffer:lower_case() +--- Returns the styled margin text for the given line. +function buffer:margin_get_styles(line) +--- Returns the margin text for the given line. +function buffer:margin_get_text(line) +--- Sets the styled margin text for the given line. +function buffer:margin_set_styles(line, styles) +--- Sets the margin text for the given line. +function buffer:margin_set_text(line, text) +--- Clears all margin text. +function buffer:margin_text_clear_all() +--- Adds a marker to a line, returning an ID which can be used to find or delete +-- the marker. +function buffer:marker_add(line, marker_num) +--- Adds a set of markers to a line. +function buffer:marker_add_set(line, set) +--- Sets the symbol used for a particular marker number. +function buffer:marker_define(marker_num, marker_symbol) +--- Defines a marker from a pixmap. +function buffer:marker_define_pixmap(marker_num, pixmap) +--- Deletes a marker from a line. +function buffer:marker_delete(line, marker_num) +--- Deletes all markers with a particular number from all lines. +function buffer:marker_delete_all(marker_num) +--- Deletes a marker. +function buffer:marker_delete_handle(handle) +--- Gets a bit mask of all the markers set on a line. +function buffer:marker_get(line) +--- Returns the line number at which a particular marker is located. +function buffer:marker_line_from_handle(handle) +--- Finds the next line after start_line that includes a marker in marker_mask. +function buffer:marker_next(start_line, marker_mask) +--- Finds the previous line after start_line that includes a marker in +-- marker_mask. +function buffer:marker_previous(start_line, marker_mask) +--- Sets the alpha used for a marker that is drawn in the text area, not the +-- margin. +function buffer:marker_set_alpha(marker_num, alpha) +--- Sets the background color used for a particular marker number. +function buffer:marker_set_back(marker_num, color) +--- Sets the foreground color used for a particular marker number. +function buffer:marker_set_fore(marker_num, color) +--- Returns the symbol defined for the given marker_number. +function buffer:marker_symbol_defined(marker_number) +--- Moves the caret inside the current view if it's not there already. +function buffer:move_caret_inside_view() +--- Inserts a new line depending on EOL mode. +function buffer:new_line() +--- Null operation +function buffer:null() +--- Moves the caret one page down. +function buffer:page_down() +--- Moves the caret one page down, extending the selection. +function buffer:page_down_extend() +--- Moves the caret one page down, extending the rectangular selection. +function buffer:page_down_rect_extend() +--- Moves the caret one page up. +function buffer:page_up() +--- Moves the caret one page up, extending the selection. +function buffer:page_up_extend() +--- Moves the caret one page up, extending the rectangular selection. +function buffer:page_up_rect_extend() +--- Moves the caret one paragraph down (delimited by empty lines). +function buffer:para_down() +--- Moves the caret one paragraph down (delimited by empty lines), extending the +-- selection. +function buffer:para_down_extend() +--- Moves the caret one paragraph up (delimited by empty lines). +function buffer:para_up() +--- Moves the caret one paragraph up (delimited by empty lines), extending the +-- selection. +function buffer:para_up_extend() +--- Pastes the contents of the clipboard into the document replacing the +-- selection. +function buffer:paste() +--- Returns the x value of the point in the window where a position is shown. +function buffer:point_x_from_position(pos) +--- Returns the y value of the point in the window where a position is shown. +function buffer:point_y_from_position(pos) +--- Returns the next position in the document taking code page into account. +function buffer:position_after(pos) +--- Returns the previous position in the document taking code page into account. +function buffer:position_before(pos) +--- Returns the position at the start of the specified line. +function buffer:position_from_line(line) +--- Returns the position from a point within the window. +function buffer:position_from_point(x, y) +--- Returns the position from a point within the window, but return -1 if not +-- close to text. +function buffer:position_from_point_close(x, y) +--- Redoes the next action in the undo history. +function buffer:redo() +--- Registers and XPM image for use in autocompletion lists. +function buffer:register_image(type, xmp_data) +--- Replaces the selected text with the argument text. +function buffer:replace_sel(text) +--- Replaces the target text with the argument text. +function buffer:replace_target(text) +--- Replaces the target text with the argument text after \d processing. +-- Looks for \d where d is 1-9 and replaces it with the strings captured by a +-- previous RE search. +function buffer:replace_target_re(text) +--- Makes the next selection the main selection. +function buffer:rotate_selection() +--- Ensures the caret is visible. +function buffer:scroll_caret() +--- Sets the current caret position to be the search anchor. +function buffer:search_anchor() +--- Searches for a string in the target and sets the target to the found range, +-- returning the length of the range or -1. +function buffer:search_in_target(text) +--- Finds some text starting at the search anchor. (Does not scroll selection) +-- @param flags Mask of search flags. 2: whole word, 4: match case, 0x00100000: +-- word start, 0x00200000 regexp, 0x00400000: posix. +function buffer:search_next(flags, text) +--- Finds some text starting at the search anchor and moving backwards. (Does +-- not scroll the selection) +-- @param flags Mask of search flags. 2: whole word, 4: match case, 0x00100000: +-- word start, 0x00200000 regexp, 0x00400000: posix. +function buffer:search_prev(flags, text) +--- Selects all the text in the document. +function buffer:select_all() +--- Duplicates the selection or the line containing the caret. +function buffer:selection_duplicate() +--- Resets the set of characters for whitespace and word characters to the +-- defaults. +function buffer:set_chars_default() +--- Sets some style options for folding. +-- @param flags Mask of fold flags. 0x0002: line before expanded, 0x0004: line +-- before contracted, 0x0008: line after expanded, 0x0010: line after +-- contracted, 0x0040: level numbers, 0x0001: box. +function buffer:set_fold_flags(flags) +--- Sets the background color used as a checkerboard pattern in the fold margin. +function buffer:set_fold_margin_colour(use_setting, color) +--- Sets the foreground color used as a checkerboard pattern in the fold margin. +function buffer:set_fold_margin_hi_colour(use_setting, color) +--- Sets a background color for active hotspots. +function buffer:set_hotspot_active_back(use_setting, color) +--- Sets a foreground color for active hotspots. +function buffer:set_hotspot_active_fore(use_setting, color) +--- Sets the length of the utf8 argument for calling encoded_from_utf8. +function buffer:set_length_for_encode(bytes) +--- Sets the lexer language to the specified name. +function buffer:set_lexer_language(language_name) +--- Remembers the current position in the undo history as the position at which +-- the document was saved. +function buffer:set_save_point() +--- Selects a range of text. +function buffer:set_sel(start_pos, end_pos) +--- Sets the background color of the selection and whether to use this setting. +function buffer:set_sel_back(use_setting, color) +--- Sets the foreground color of the selection and whether to use this setting. +function buffer:set_sel_fore(use_setting, color) +--- Set a single selection from anchor to caret as the only selection. +function buffer:set_selection(caret, anchor) +--- Changes the style from the current styling position for a length of +-- characters to a style and move the current styling position to after this +-- newly styled segment. +function buffer:set_styling(length, style) +--- Sets the styles for a segment of the document. +function buffer:set_styling_ex(length, styles) +--- Replaces the contents of the document with the argument text. +function buffer:set_text(text) +--- Sets the way the display area is determined when a particular line is to be +-- moved to by find, find_next, goto_line, etc. +-- @param visible_policy 0x01: slop, 0x04: strict. +-- @param visible_slop 0x01: slop, 0x04: strict. +function buffer:set_visible_policy(visible_policy, visible_slop) +--- Sets the background color of all whitespace and whether to use this setting. +function buffer:set_whitespace_back(use_setting, color) +--- Sets the foreground color of all whitespace and whether to use this setting. +function buffer:set_whitespace_fore(use_setting, color) +--- Sets the way the caret is kept visible when going side-ways. +-- @param caret_policy 0x01: slop, 0x04: strict, 0x10: jumps, 0x08: even. +function buffer:set_x_caret_policy(caret_policy, caret_slop) +--- Sets the way the line the caret is visible on is kept visible. +-- @param caret_policy 0x01: slop, 0x04: strict, 0x10: jumps, 0x08: even. +function buffer:set_y_caret_policy(caret_policy, caret_slop) +--- Makes a range of lines visible. +function buffer:show_lines(start_line, end_line) +--- Starts notifying the container of all key presses and commands. +function buffer:start_record() +--- Sets the current styling position to pos and the styling mask to mask. +function buffer:start_styling(position, mask) +--- Stops notifying the container of all key presses and commands. +function buffer:stop_record() +--- Moves caret to the bottom of the page, or one page down if already there. +function buffer:stuttered_page_down() +--- Moves caret to the bottom of the page, or one page down if already there, +-- extending the selection. +function buffer:stuttered_page_down_extend() +--- Moves caret to the top of the page, or one page up if already there. +function buffer:stuttered_page_up() +--- Moves caret to the top of the page, or one page up if already there, +-- extending the selection. +function buffer:stuttered_page_up_extend() +--- Resets all styles to the global default style. +function buffer:style_clear_all() +--- Returns the font name of a given style. +function buffer:style_get_font(style_num) +--- Resets the default style to its state at startup. +function buffer:style_reset_default() +--- Moves the caret to the opposite end of the main selection. +function buffer:swap_main_anchor_caret() +--- Inserts a tab character or indent multiple lines. +function buffer:tab() +--- Returns the target converted to utf8. +function buffer:target_as_utf8() +--- Makes the target range the same as the selection range. +function buffer:target_from_selection() +--- Returns the height of a particular line of text in pixels. +function buffer:text_height(line) +--- Returns the pixel width of some text in a particular style. +function buffer:text_width(style_num, text) +--- Switches the caret between sticky and non-sticky. +function buffer:toggle_caret_sticky() +--- Switches a header line between expanded and contracted. +function buffer:toggle_fold() +--- Undoes one action in the undo history. +function buffer:undo() +--- Transforms the selection to upper case. +function buffer:upper_case() +--- Sets whether a pop up menu is displayed automatically when the user presses +-- the right mouse button. +function buffer:use_pop_up(allow_popup) +--- Displays a list of strings and sends a notification when one is chosen. +function buffer:user_list_show(list_type, item_list_string) +--- Moves the caret to before the first visible character on the current line +-- or the first character on the line if already there. +function buffer:vc_home() +--- Moves the caret to before the first visible character on the current line +-- or the first character on the line if already there, extending the selection. +function buffer:vc_home_extend() +--- Moves the caret to before the first visible character on the current line +-- or the first character on the line if already there, extending the +-- rectangular selection. +function buffer:vc_home_rect_extend() +--- Moves the caret to the first visible character on the current display line +-- and then the document line. (If wrap mode is enabled) +function buffer:vc_home_wrap() +--- Moves the caret to the first visible character on the current display line +-- and then the document line, extending the selection. (If wrap mode is +-- enabled) +function buffer:vc_home_wrap_extend() +--- Returns the display line of a document line taking hidden lines into +-- account. +function buffer:visible_from_doc_line(line) +--- Returns the position of the end of a word. +function buffer:word_end_position(pos, only_word_chars) +--- Moves the caret left one word. +function buffer:word_left() +--- Moves the caret left one word, positioning the caret at the end of the word. +function buffer:word_left_end() +--- Moves the caret left one word, positioning the caret at the end of the word, +-- extending the selection. +function buffer:word_left_end_extend() +--- Moves the caret left one word, extending the selection. +function buffer:word_left_extend() +--- Moves the caret to the previous change in capitalization or underscore. +function buffer:word_part_left() +--- Moves the caret to the previous change in capitalization or underscore, +-- extending the selection. +function buffer:word_part_left_extend() +--- Moves the caret to the next change in capitalization or underscore. +function buffer:word_part_right() +--- Moves the caret to the next change in capitalization or underscore, +-- extending the selection. +function buffer:word_part_right_extend() +--- Moves the caret right one word. +function buffer:word_right() +--- Moves the caret right one word, positioning the caret at the end of the +-- word. +function buffer:word_right_end() +--- Moves the caret right one word, positioning the caret at the end of the +-- word, extending the selection. +function buffer:word_right_end_extend() +--- Moves the caret right one word, extending the selection. +function buffer:word_right_extend() +--- Returns the position of a start of a word. +function buffer:word_start_position(pos, only_word_chars) +--- Returns the number of display lines needed to wrap a document line. +function buffer:wrap_count(line) +--- Magnifies the displayed text by increasing the font sizes by 1 point. +function buffer:zoom_in() +--- Makes the displayed text smaller by decreasing the font sizes by 1 point. +function buffer:zoom_out() + +--- Reloads the file in a given buffer. +function buffer:reload() +--- +-- Sets the encoding for the buffer, converting its contents in the process. +-- @param encoding The encoding to set. Valid encodings are ones that GTK's +-- g_convert() function accepts (typically GNU iconv's encodings). +-- @usage buffer:set_encoding('ASCII') +function buffer:set_encoding() +--- Saves the current buffer to a file. +function buffer:save() +--- +-- Saves the current buffer to a file different than its filename property. +-- @param utf8_filename The new filepath to save the buffer to. Must be UTF-8 +-- encoded. +function buffer:save_as() +--- +-- Closes the current buffer. +-- If the buffer is dirty, the user is prompted to continue. The buffer is not +-- saved automatically. It must be done manually. +function buffer:close() diff --git a/core/.command_entry.lua b/core/.command_entry.lua deleted file mode 100644 index 93615f22..00000000 --- a/core/.command_entry.lua +++ /dev/null @@ -1,42 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.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 - ---- Focuses the command entry. -function focus() end diff --git a/core/.command_entry.luadoc b/core/.command_entry.luadoc new file mode 100644 index 00000000..93615f22 --- /dev/null +++ b/core/.command_entry.luadoc @@ -0,0 +1,42 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.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 + +--- Focuses the command entry. +function focus() end diff --git a/core/.find.lua b/core/.find.lua deleted file mode 100644 index 87cbf257..00000000 --- a/core/.find.lua +++ /dev/null @@ -1,80 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- global gui.find table. - ---- --- Textadept's integrated find/replace dialog. -module('gui.find') - --- Markdown: --- ## Fields --- --- * `find_entry_text`: The text in the find entry. --- * `replace_entry_text`: The text in the replace entry. --- * `match_case`: Flag indicating whether or not case-sensitive search is --- performed. --- * `whole_word`: Flag indicating whether or not only whole-word matches are --- allowed in searches. --- * `lua`: Flag indicating whether or not the text to find in a search is a Lua --- pattern. --- * `in_files`: Flag indicating whether or not to search for the text in a list --- of files. --- --- ## Overview --- --- In addition to offering standard find and replace, Textadept allows you to --- find with [Lua patterns][lua_patterns] and replace with Lua captures and even --- Lua code! Lua captures (`%n`) are only available from a Lua pattern search, --- but embedded Lua code enclosed in `%()` is always available. --- --- [lua_patterns]: http://www.lua.org/manual/5.1/manual.html#5.4.1 --- --- If any block of text is selected for 'Replace All', only matches found in --- that block are replaced. --- --- Find in Files will prompt for a directory to recursively search and display --- the results in a new buffer. Double-clicking a search result will jump to it --- in the file. Replace in Files is not supported. You will have to Find in --- Files first, and then 'Replace All' for each file a result is found in. --- The 'Match Case', 'Whole Word', and 'Lua pattern' flags still apply. --- --- Incremental search uses the Command Entry. --- --- ## Customizing Look and Feel --- --- There is no way to theme the dialog from within Textadept. Instead you can --- use [GTK Resource files][gtkrc]. The find and replace entries have widget --- names of `textadept-find-entry` and `textadept-replace-entry` respectively. --- --- [gtkrc]: http://library.gnome.org/devel/gtk/unstable/gtk-Resource-Files.html. - ---- Displays and focuses the find/replace dialog. -function focus() end - ---- --- Mimicks a press of the 'Find Next' button in the Find box. -function find_next() end - ---- --- Mimicks a press of the 'Find Prev' button in the Find box. -function find_prev() end - ---- --- Mimicks a press of the 'Replace' button in the Find box. -function replace() end - ---- --- Mimicks a press of the 'Replace All' button in the Find box. -function replace_all() end - ---- --- Goes to the next or previous file found relative to the file --- on the current line. --- @param next Flag indicating whether or not to go to the next file. -function goto_file_in_list(next) end - ---- --- Begins an incremental find using the Lua command entry. --- Lua command functionality will be unavailable until the search is finished --- (pressing 'Escape' by default). -function incremental() end diff --git a/core/.find.luadoc b/core/.find.luadoc new file mode 100644 index 00000000..87cbf257 --- /dev/null +++ b/core/.find.luadoc @@ -0,0 +1,80 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the +-- global gui.find table. + +--- +-- Textadept's integrated find/replace dialog. +module('gui.find') + +-- Markdown: +-- ## Fields +-- +-- * `find_entry_text`: The text in the find entry. +-- * `replace_entry_text`: The text in the replace entry. +-- * `match_case`: Flag indicating whether or not case-sensitive search is +-- performed. +-- * `whole_word`: Flag indicating whether or not only whole-word matches are +-- allowed in searches. +-- * `lua`: Flag indicating whether or not the text to find in a search is a Lua +-- pattern. +-- * `in_files`: Flag indicating whether or not to search for the text in a list +-- of files. +-- +-- ## Overview +-- +-- In addition to offering standard find and replace, Textadept allows you to +-- find with [Lua patterns][lua_patterns] and replace with Lua captures and even +-- Lua code! Lua captures (`%n`) are only available from a Lua pattern search, +-- but embedded Lua code enclosed in `%()` is always available. +-- +-- [lua_patterns]: http://www.lua.org/manual/5.1/manual.html#5.4.1 +-- +-- If any block of text is selected for 'Replace All', only matches found in +-- that block are replaced. +-- +-- Find in Files will prompt for a directory to recursively search and display +-- the results in a new buffer. Double-clicking a search result will jump to it +-- in the file. Replace in Files is not supported. You will have to Find in +-- Files first, and then 'Replace All' for each file a result is found in. +-- The 'Match Case', 'Whole Word', and 'Lua pattern' flags still apply. +-- +-- Incremental search uses the Command Entry. +-- +-- ## Customizing Look and Feel +-- +-- There is no way to theme the dialog from within Textadept. Instead you can +-- use [GTK Resource files][gtkrc]. The find and replace entries have widget +-- names of `textadept-find-entry` and `textadept-replace-entry` respectively. +-- +-- [gtkrc]: http://library.gnome.org/devel/gtk/unstable/gtk-Resource-Files.html. + +--- Displays and focuses the find/replace dialog. +function focus() end + +--- +-- Mimicks a press of the 'Find Next' button in the Find box. +function find_next() end + +--- +-- Mimicks a press of the 'Find Prev' button in the Find box. +function find_prev() end + +--- +-- Mimicks a press of the 'Replace' button in the Find box. +function replace() end + +--- +-- Mimicks a press of the 'Replace All' button in the Find box. +function replace_all() end + +--- +-- Goes to the next or previous file found relative to the file +-- on the current line. +-- @param next Flag indicating whether or not to go to the next file. +function goto_file_in_list(next) end + +--- +-- Begins an incremental find using the Lua command entry. +-- Lua command functionality will be unavailable until the search is finished +-- (pressing 'Escape' by default). +function incremental() end diff --git a/core/.gui.lua b/core/.gui.lua deleted file mode 100644 index 04869e70..00000000 --- a/core/.gui.lua +++ /dev/null @@ -1,84 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.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 diff --git a/core/.gui.luadoc b/core/.gui.luadoc new file mode 100644 index 00000000..04869e70 --- /dev/null +++ b/core/.gui.luadoc @@ -0,0 +1,84 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.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 diff --git a/core/.iconv.lua b/core/.iconv.lua deleted file mode 100644 index 86ca54c9..00000000 --- a/core/.iconv.lua +++ /dev/null @@ -1,15 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- string table. - ---- Extends Lua's string package to provide character set conversions. -module('string') - ---- --- Converts a string from one character set to another using iconv(). --- Valid character sets are ones GLib's g_convert() accepts, typically GNU --- iconv's character sets. --- @param text The text to convert. --- @param to The character set to convert to. --- @param from The character set to convert from. -function iconv(text, to, from) end diff --git a/core/.iconv.luadoc b/core/.iconv.luadoc new file mode 100644 index 00000000..86ca54c9 --- /dev/null +++ b/core/.iconv.luadoc @@ -0,0 +1,15 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the +-- string table. + +--- Extends Lua's string package to provide character set conversions. +module('string') + +--- +-- Converts a string from one character set to another using iconv(). +-- Valid character sets are ones GLib's g_convert() accepts, typically GNU +-- iconv's character sets. +-- @param text The text to convert. +-- @param to The character set to convert to. +-- @param from The character set to convert from. +function iconv(text, to, from) end diff --git a/core/.view.lua b/core/.view.lua deleted file mode 100644 index 010723da..00000000 --- a/core/.view.lua +++ /dev/null @@ -1,39 +0,0 @@ --- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. --- This is a DUMMY FILE used for making LuaDoc for built-in functions in the --- global view table. - ---- --- The currently focused view. --- It also represents the structure of any view table in 'views'. -module('view') - --- Markdown: --- ## Fields --- --- * `doc_pointer`: The pointer to the document associated with this view's --- buffer. (Used internally; read-only) --- * `size`: The integer position of the split resizer (if this view is part of --- a split view). - ---- --- Splits the indexed view vertically or horizontally and focuses the new view. --- @param vertical Flag indicating a vertical split. False for horizontal. --- @return old view and new view tables. -function view:split(vertical) end - ---- --- Unsplits the indexed view if possible. --- @return boolean if the view was unsplit or not. -function view:unsplit() end - ---- --- Goes to the specified buffer in the indexed view. --- Activates the 'buffer_*_switch' signals. --- @param n A relative or absolute buffer index. --- @param absolute Flag indicating if n is an absolute index or not. -function view:goto_buffer(n, absolute) end - ---- --- Focuses the indexed view if it hasn't been already. -function view:focus() end - diff --git a/core/.view.luadoc b/core/.view.luadoc new file mode 100644 index 00000000..010723da --- /dev/null +++ b/core/.view.luadoc @@ -0,0 +1,39 @@ +-- Copyright 2007-2010 Mitchell mitchellcaladbolg.net. See LICENSE. +-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the +-- global view table. + +--- +-- The currently focused view. +-- It also represents the structure of any view table in 'views'. +module('view') + +-- Markdown: +-- ## Fields +-- +-- * `doc_pointer`: The pointer to the document associated with this view's +-- buffer. (Used internally; read-only) +-- * `size`: The integer position of the split resizer (if this view is part of +-- a split view). + +--- +-- Splits the indexed view vertically or horizontally and focuses the new view. +-- @param vertical Flag indicating a vertical split. False for horizontal. +-- @return old view and new view tables. +function view:split(vertical) end + +--- +-- Unsplits the indexed view if possible. +-- @return boolean if the view was unsplit or not. +function view:unsplit() end + +--- +-- Goes to the specified buffer in the indexed view. +-- Activates the 'buffer_*_switch' signals. +-- @param n A relative or absolute buffer index. +-- @param absolute Flag indicating if n is an absolute index or not. +function view:goto_buffer(n, absolute) end + +--- +-- Focuses the indexed view if it hasn't been already. +function view:focus() end + -- cgit v1.2.3