23 lines
370 B
Go
23 lines
370 B
Go
package views
|
|
|
|
import (
|
|
"git.tordarus.net/Tordarus/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
|
|
}
|