tui/views/view_grow.go

23 lines
370 B
Go
Raw Permalink Normal View History

2022-04-02 13:01:41 +02:00
package views
import (
"git.tordarus.net/Tordarus/tui"
)
2022-05-04 11:13:18 +02:00
// GrowView is a tui.Wrapper which always demands all available space
2022-04-02 13:01:41 +02:00
type GrowView struct {
2022-05-04 11:13:18 +02:00
tui.WrapperTmpl
2022-04-02 13:01:41 +02:00
}
var _ tui.View = &GrowView{}
2022-05-04 11:13:18 +02:00
func NewGrowView(view tui.View) *GrowView {
g := &GrowView{}
g.SetView(view)
return g
2022-04-02 13:01:41 +02:00
}
func (v *GrowView) Layout() (prefWidth, prefHeight int) {
return -1, -1
}