21 lines
265 B
Go
21 lines
265 B
Go
package tui
|
|
|
|
import "github.com/rivo/tview"
|
|
|
|
type ui struct {
|
|
Elements map[string]*view
|
|
}
|
|
|
|
func NewUI() *ui {
|
|
return &ui{
|
|
Elements: make(map[string]*view),
|
|
}
|
|
}
|
|
|
|
type view struct {
|
|
ID string
|
|
Title string
|
|
Root tview.Primitive
|
|
Children []*view
|
|
}
|