Discover Packages
github.com/wildneuro/tuigo
layout
package
Version:
v0.1.11
Opens a new window with list of versions in this module.
Published: Jul 5, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package layout computes pure Go flexbox geometry for an Element tree. It
never touches a terminal or mutates its input.
WrapText breaks text into lines no wider than width, breaking on spaces
where possible and hard-breaking a single word that's wider than width on
its own.
Node mirrors an Element with its computed Rect attached.
Layout computes the position and size of el and every descendant within a
width x height viewport. It is deterministic and never mutates el.
type Rect struct {
X, Y, W, H int
}
Rect is an axis-aligned region in terminal cells.
ContentRect returns the area inside a Box's border and padding.
Intersect returns the overlapping region of r and o, with zero width/height
if they don't overlap.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.