Documentation
¶
Overview ¶
Package layout turns terminal dimensions into pane geometry, so views can ask what to draw rather than each recomputing breakpoints.
Index ¶
Constants ¶
View Source
const ( MediumMinWidth = 80 WideMinWidth = 120 // ShortHeight is the row count below which chrome collapses to essentials. ShortHeight = 20 )
Width thresholds, in columns.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Breakpoint ¶
type Breakpoint int
Breakpoint describes how many panes fit at the current width.
const ( // Compact shows one pane at a time with stack navigation. Compact Breakpoint = iota // Medium shows the thread list beside the reader. Medium // Wide adds the label sidebar. Wide )
type Layout ¶
type Layout struct {
Width int
Height int
Breakpoint Breakpoint
// Pane widths. Zero means the pane is not drawn at this size.
SidebarWidth int
ListWidth int
ReaderWidth int
// ContentHeight is the rows available to panes after chrome.
ContentHeight int
// ShowBanner is false when the terminal is too short or narrow for the
// full ASCII logo.
ShowBanner bool
// CompactBanner is true when the logo must fall back to its one-line form.
CompactBanner bool
}
Layout is the resolved geometry for one frame.
Click to show internal directories.
Click to hide internal directories.