package tui type ViewTmpl struct { style *Style } var _ View = &ViewTmpl{} func (v *ViewTmpl) Draw(buf *ViewBuffer) { buf.Fill(Rune{' ', v.Style()}) } func (v *ViewTmpl) Layout() (prefWidth, prefHeight int) { return -1, -1 } func (v *ViewTmpl) OnKeyPressed(event *KeyEvent) (consumed bool) { return false } func (v *ViewTmpl) OnMouseClicked(event *MouseEvent) (consumed bool) { return false } func (v *ViewTmpl) SetStyle(s Style) { v.style = &s } func (v *ViewTmpl) Style() Style { if v.style == nil { return StyleDefault } return *v.style }