23 lines
365 B
Go
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
|
|
}
|