Documentation
¶
Index ¶
- type Layout
- func (l *Layout) GetActive() *PositionalElement
- func (l *Layout) Init() tea.Cmd
- func (l *Layout) NavigateDown()
- func (l *Layout) NavigateLeft()
- func (l *Layout) NavigateRight()
- func (l *Layout) NavigateUp()
- func (l *Layout) Resize(width, height int)
- func (l *Layout) SetActive(x, y int)
- func (l *Layout) UpdateActive(msg tea.Msg) tea.Cmd
- func (l *Layout) UpdateAll(msg tea.Msg) tea.Cmd
- func (l *Layout) View() string
- type LayoutModel
- type Position
- type PositionalElement
- type Row
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout struct {
// contains filtered or unexported fields
}
func (*Layout) GetActive ¶
func (l *Layout) GetActive() *PositionalElement
func (*Layout) NavigateDown ¶
func (l *Layout) NavigateDown()
func (*Layout) NavigateLeft ¶
func (l *Layout) NavigateLeft()
func (*Layout) NavigateRight ¶
func (l *Layout) NavigateRight()
func (*Layout) NavigateUp ¶
func (l *Layout) NavigateUp()
type LayoutModel ¶
type LayoutModel interface {
Init() tea.Cmd
Update(tea.Msg) (tea.Model, tea.Cmd)
View() string
IsActive() bool
SetActive() LayoutModel
UnsetActive() LayoutModel
OnAvailWidthChange(width int) LayoutModel
}
Extends the normal tea.Model
type PositionalElement ¶
type PositionalElement struct {
// contains filtered or unexported fields
}
func Fill ¶
func Fill(model *LayoutModel, position Position, width float64) PositionalElement
Fill width dynamically. position: left | center | right width: fraction of how much space to take, e.g. 0.5 for 50%
func FillAuto ¶
func FillAuto(model *LayoutModel, position Position) PositionalElement
Fill width dynamically. Split space equally among fill-auto elements position: left | center | right
func Fixed ¶
func Fixed(model *LayoutModel, position Position, width int) PositionalElement
Fixed width.
func (*PositionalElement) IsSelectable ¶
func (p *PositionalElement) IsSelectable() bool
func (PositionalElement) NotSelectable ¶
func (p PositionalElement) NotSelectable() PositionalElement
Element cannot be selected by user
Click to show internal directories.
Click to hide internal directories.