gui/redraw.go

29 lines
500 B
Go

package gui
import (
"go.wit.com/log"
"go.wit.com/widget"
)
// This recreates the whole GUI for a plugin
// func (n *Node) ListChildren(dump bool, dropdown *Node, mapNodes map[string]*Node) {
func (n *Node) redraw(p *aplug) {
if n == nil {
return
}
n.redo(p)
for _, child := range n.children {
child.redraw(p)
}
return
}
func (n *Node) redo(plug *aplug) {
log.Log(NOW, "redo()", plug.name, n.id, n.WidgetType, n.progname)
a := getNewAction(n, widget.Add)
plug.pluginChan <- *a
}