Newer
Older
import "github.com/rivo/tview"
type view interface {
GetContent() tview.Primitive
}
type App struct {
app *tview.Application
}
func NewApp() *App {
a := &App{
app: tview.NewApplication(),
}
return a
}
a.app.SetRoot(v.GetContent(), true)
}
func (a *App) Run() error {
return a.app.Run()
}
func (a *App) SetFocus(v tview.Primitive) {
a.app.SetFocus(v)
}