golazy.dev
–
golazy.dev
/
lazytui
/
window
Index
|
Files
package window ¶
import "golazy.dev/lazytui/window"
Variables ¶
var ErrInvalidGeometry ¶
var ErrInvalidGeometry = errors.New("invalid terminal window geometry")
Types ¶
type Rect ¶
Rect is a 1-based terminal-cell rectangle.
type Rect struct {
Row int
Col int
Rows int
Cols int
}
func SplitSideBySide ¶
SplitSideBySide returns two pane rectangles inside total, after subtracting horizontal and vertical padding from the outside edges.
func SplitSideBySide(total tty.Size, paddingCols int, paddingRows int) ([2]Rect, error)
func (r Rect) Size ¶
Size returns the rectangle's terminal size.
func (r Rect) Size() tty.Size
Package window defines terminal window geometry helpers.