aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/.view.luadoc
blob: 949ee997d27e5b5f4840651297eb336fb698e421 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
-- Copyright 2007-2013 Mitchell mitchell.att.foicica.com. See LICENSE.
-- This is a DUMMY FILE used for making LuaDoc for built-in functions in the
-- global view table.

---
-- 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](buffer.html) the view contains. (Read-only)
-- @class table
-- @name buffer
local buffer

---
-- Splits the view into top and bottom views, unless *vertical* is `true`,
-- focuses the new view, and returns both the old and new views.
-- If *vertical* is `false`, splits the view vertically into left and
-- right views.
-- Emits a `VIEW_NEW` event.
-- @param view The view to split.
-- @param vertical Optional flag indicating whether or not to split the view
--   vertically. The default value is `false`, for horizontal.
-- @return old view and new view.
-- @see events.VIEW_NEW
function split(view, vertical) end

---
-- Unsplits the view if possible, returning `true` on success.
-- @param view The view to unsplit.
-- @return boolean if the view was unsplit or not.
function unsplit(view) end

---
-- Goes to buffer number *n* in the view.
-- If *relative* is `true`, *n* is an index relative to the index of the current
-- buffer in `_G._BUFFERS` instead of an absolute index.
-- 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 Optional flag indicating whether *n* is a relative or
--   absolute index. The default value is `false`, for an absolute index.
-- @see _G._G._BUFFERS
-- @see events.BUFFER_BEFORE_SWITCH
-- @see events.BUFFER_AFTER_SWITCH
function goto_buffer(view, n, relative) end