aboutsummaryrefslogtreecommitdiffhomepage
path: root/core/.view.luadoc
blob: 5aaa1e034fbcc8535362bd4b1feabb424cc3f850 (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
-- Copyright 2007-2012 Mitchell mitchell<att>caladbolg.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 `_G._VIEWS`.
module('view')

-- Markdown:
-- ## Fields
--
-- * `buffer` [table]: The buffer this view contains. (Read-only)
-- * `size` [number]: The 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. Defaults to `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.
-- 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.
-- @param relative Flag indicating if `n` is a relative index or not. Defaults
--   to `false`.
function view:goto_buffer(n, relative) end