tui/views/view_grow.go
2023-04-24 11:55:04 +02:00

23 lines
365 B
Go

package views
import (
"git.milar.in/milarin/tui"
)
// GrowView is a tui.Wrapper which always demands all available space
type GrowView struct {
tui.WrapperTmpl
}
var _ tui.View = &GrowView{}
func NewGrowView(view tui.View) *GrowView {
g := &GrowView{}
g.SetView(view)
return g
}
func (v *GrowView) Layout() (prefWidth, prefHeight int) {
return -1, -1
}