diff options
author | mitchell <70453897+667e-11@users.noreply.github.com> | 2012-09-12 11:24:11 -0400 |
---|---|---|
committer | mitchell <70453897+667e-11@users.noreply.github.com> | 2012-09-12 11:24:11 -0400 |
commit | 9dc8ce16a1efc6482db6f1d5456d42958e79a06c (patch) | |
tree | e26ff636143fc74f92a6a3359a73e93194da6bc3 /core/.view.luadoc | |
parent | 4305f32ac153b7a45a1c001da2fcd412af905168 (diff) |
Documentation overhaul.
Rewrote most of the manual and Lua API to complement each other.
Key bindings reference moved from Appendix to modules/textadept/keys.lua LuaDoc.
Diffstat (limited to 'core/.view.luadoc')
-rw-r--r-- | core/.view.luadoc | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/core/.view.luadoc b/core/.view.luadoc index bea8efb8..c658ddfb 100644 --- a/core/.view.luadoc +++ b/core/.view.luadoc @@ -3,35 +3,42 @@ -- global view table. --- --- The currently focused view. --- It also represents the structure of any view table in `_G._VIEWS`. +-- A Textadept view object. -- @field size (number) -- The position of the split resizer (if this view is part of a split view). module('view') --- --- The buffer this view contains. (Read-only) +-- The [buffer](buffer.html) the view contains. (Read-only) -- @class table -- @name buffer local buffer --- --- Splits the indexed view vertically or horizontally and focuses the new view. +-- Splits the given view vertically or horizontally and focuses the new view. +-- Emits a `VIEW_NEW` event. +-- @param view The view to split. -- @param vertical Flag indicating a vertical split. The default value is -- `false` for horizontal. --- @return old view and new view tables. -function view:split(vertical) end +-- @return old view and new view. +-- @see events.VIEW_NEW +function split(view, vertical) end --- --- Unsplits the indexed view if possible. +-- Unsplits the given view if possible. +-- @param view The view to unsplit. -- @return boolean if the view was unsplit or not. -function view:unsplit() end +function view.unsplit(view) end --- --- Goes to the specified buffer in the indexed view. --- Generates `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events. --- @param n A relative or absolute buffer index. An absolute index of `-1` goes --- to the last buffer. +-- Goes to the specified buffer in the given view. +-- Emits `BUFFER_BEFORE_SWITCH` and `BUFFER_AFTER_SWITCH` events. +-- @param view The view to switch buffers in. +-- @param n A relative or absolute buffer index in `_G._BUFFERS`. An absolute +-- index of `-1` goes to the last buffer. -- @param relative Flag indicating if `n` is a relative index or not. The -- default value is `false`. -function view:goto_buffer(n, relative) end +-- @see _G._G._BUFFERS +-- @see events.BUFFER_BEFORE_SWITCH +-- @see events.BUFFER_AFTER_SWITCH +function goto_buffer(view, n, relative) end |