-
-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmux-tab.lua
More file actions
56 lines (53 loc) · 2.1 KB
/
Copy pathmux-tab.lua
File metadata and controls
56 lines (53 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---@meta
---@alias PaneDirection
---|"Down"
---|"Left"
---|"Next"
---|"Prev"
---|"Right"
---|"Up"
---@class MuxSize
---@field rows number
---@field cols number
---@field pixel_width number
---@field pixel_height number
---@field dpi number
-- `MuxTab` represents a tab that is managed by the multiplexer
---@class MuxTab
-- Activates (focuses) the tab
---@field activate fun(self: MuxTab)
-- A convenience accessor for returning the active pane in the tab
---@field active_pane fun(self): Pane
-- Returns pane adjacent to the active pane in tab in the direction direction
---@field get_pane_direction fun(self: MuxTab, direction: PaneDirection): MuxTab
-- Returns the overall size of the tab,
-- taking into account all of the contained panes
---@field get_size fun(self: MuxTab): MuxSize
-- Returns the tab title as set by `tab:set_title()`
---@field get_title fun(self: MuxTab): string
-- Returns an array table containing the set of Pane objects contained by this tab
---@field panes fun(self: MuxTab): Pane[]
-- Returns an array table containing an extended info entry
-- for each of the panes contained by this tab
---@field panes_with_info fun(self: MuxTab): PaneInformation[]
-- Rotates the panes in the clockwise direction
---@field rotate_clockwise fun(self: MuxTab)
-- Rotates the panes in the counter-clockwise direction
---@field rotate_counter_clockwise fun(self: MuxTab)
-- Sets the tab title to the provided string
---@field set_title fun(self: MuxTab, title: string)
-- Sets the zoomed state for the active pane within this tab.
--
-- A zoomed pane takes up all available space in the tab,
-- hiding all other panes while it is zoomed.
--
-- - Switching its zoom state off will restore the prior split arrangement
-- - Setting the zoom state to `true` zooms the pane if it wasn't already zoomed
-- - Setting the zoom state to `false` un-zooms the pane if it was zoomed
--
-- Returns the prior zoom state
---@field set_zoomed fun(self: MuxTab, state: boolean): boolean
-- Returns the tab id
---@field tab_id fun(self: MuxTab): number
-- Returns the MuxWindow object that contains this tab
---@field window fun(self: MuxTab): MuxWindow