Documentation ¶
Index ¶
- Variables
- type Layout
- func (l *Layout) AddItem(i Placeable) *Layout
- func (l *Layout) CanGrow() bool
- func (l *Layout) GetHeight() int
- func (l *Layout) GetWidth() int
- func (l *Layout) Items() []Placeable
- func (l *Layout) SetHeight(height int)
- func (l *Layout) SetSize(width int, height int)
- func (l *Layout) SetWidth(width int)
- func (l *Layout) View() string
- type Option
- type Placeable
- type Sizeable
- type Styles
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultWidth = 80 DefaultHeight = 25 )
DefaultWidth and DefaultHeight define the default dimensions for a layout.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout struct {
// contains filtered or unexported fields
}
Layout represents a layout container for UI components.
type Option ¶
type Option func(*Layout)
Option is a type for functions that modify a Layout.
func WithStyles ¶
WithStyles sets the styles for the layout container.
type Placeable ¶
type Placeable interface { Sizeable // View returns the string representation of the component. View() string }
Placeable is an interface for components that can be placed within a layout. It extends the Sizeable interface, indicating that placeable items must be resizable.
Click to show internal directories.
Click to hide internal directories.