Documentation ¶
Index ¶
- func FullScreen(rm ResizingModel) tea.Model
- func Resize(m tea.Model, w, h int) tea.Model
- type BoxSize
- type Compositor
- func (c *Compositor) ClearOverlay()
- func (c *Compositor) HasOverlay() bool
- func (c *Compositor) Init() tea.Cmd
- func (c *Compositor) MoveOverlay(x, y int)
- func (c *Compositor) Resize(w, h int) ResizingModel
- func (c *Compositor) SetOverlay(m ResizingModel, x, y, w, h int)
- func (c *Compositor) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (c *Compositor) View() string
- type RequestLayout
- type ResizableModelHandler
- func (rmh ResizableModelHandler) Init() tea.Cmd
- func (rmh ResizableModelHandler) Resize(w, h int) ResizingModel
- func (rmh ResizableModelHandler) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (rmh ResizableModelHandler) View() string
- func (rmh ResizableModelHandler) WithResize(resizeFn func(m tea.Model, w, h int) tea.Model) ResizableModelHandler
- type ResizingModel
- type VBox
- type ZStack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullScreen ¶
func FullScreen(rm ResizingModel) tea.Model
FullScreen returns a model which will allocate the resizing model the entire height and width of the screen.
Types ¶
type BoxSize ¶
type BoxSize interface {
// contains filtered or unexported methods
}
func FirstChildFixedAt ¶
func LastChildFixedAt ¶
type Compositor ¶
type Compositor struct {
// contains filtered or unexported fields
}
func NewCompositor ¶
func NewCompositor(background tea.Model) *Compositor
func (*Compositor) ClearOverlay ¶
func (c *Compositor) ClearOverlay()
func (*Compositor) HasOverlay ¶
func (c *Compositor) HasOverlay() bool
func (*Compositor) Init ¶
func (c *Compositor) Init() tea.Cmd
func (*Compositor) MoveOverlay ¶
func (c *Compositor) MoveOverlay(x, y int)
func (*Compositor) Resize ¶
func (c *Compositor) Resize(w, h int) ResizingModel
func (*Compositor) SetOverlay ¶
func (c *Compositor) SetOverlay(m ResizingModel, x, y, w, h int)
func (*Compositor) View ¶
func (c *Compositor) View() string
type RequestLayout ¶
type RequestLayout struct{}
type ResizableModelHandler ¶
type ResizableModelHandler struct {
// contains filtered or unexported fields
}
func NewResizableModelHandler ¶
func NewResizableModelHandler(newModel func(w, h int) tea.Model) ResizableModelHandler
NewResizableModelHandler takes a tea model that requires a with and height during construction and has a resize method, and wraps it as a resizing model.
func (ResizableModelHandler) Init ¶
func (rmh ResizableModelHandler) Init() tea.Cmd
func (ResizableModelHandler) Resize ¶
func (rmh ResizableModelHandler) Resize(w, h int) ResizingModel
func (ResizableModelHandler) View ¶
func (rmh ResizableModelHandler) View() string
func (ResizableModelHandler) WithResize ¶
func (rmh ResizableModelHandler) WithResize(resizeFn func(m tea.Model, w, h int) tea.Model) ResizableModelHandler
type ResizingModel ¶
type ResizingModel interface { tea.Model Resize(w, h int) ResizingModel }
ResizingModel is a model that handles resizing events. The submodel will not get WindowSizeMessages but will guarantee to receive at least one resize event before the initial view.
func Model ¶
func Model(m tea.Model) ResizingModel
Model takes a tea-model and displays it as a resizing model. The model will be displayed with all the available space provided
type VBox ¶
type VBox struct {
// contains filtered or unexported fields
}
VBox is a model which will display its children vertically.
func NewVBox ¶
func NewVBox(boxSize BoxSize, children ...ResizingModel) VBox
func (VBox) Resize ¶
func (vb VBox) Resize(w, h int) ResizingModel
Click to show internal directories.
Click to hide internal directories.