Documentation
¶
Overview ¶
Package frame is a pure frame builder: given content, it returns one string per terminal row, each exactly `width` visible cells wide. No IO — the caller decides how to paint, and tests assert on the result.
Go port of Ruby's lib/tui/frame.rb.
Index ¶
Constants ¶
const Cursor = "❯ "
Cursor is the selection glyph. Deliberately distinct from the collapsed-row marker ("▸ ") so a selected collapsed row reads "❯ ▸ title", not a doubled marker. One cell plus a trailing space = two cells, matching the marker column width.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Width, Height int
Header string
Rows []Row
// Selected is the absolute row index to highlight, or nil.
Selected *int
Popup *layout.Popup
Panel *Panel
Modal *layout.Modal
Layout *layout.Layout
Theme *theme.Theme
Truecolor bool
// PanelOffset is only consulted when Layout is nil.
PanelOffset int
}
Options describes one frame.