add SetParent()
This commit is contained in:
parent
2e66d10ffb
commit
2620425629
|
@ -128,10 +128,18 @@ func guiMain(w io.Writer, FRUITS string, FRUIT string) {
|
|||
fmt.Fprintln(w, " return sf")
|
||||
fmt.Fprintln(w, "}")
|
||||
fmt.Fprintln(w, "")
|
||||
fmt.Fprintln(w, "func (mt *"+FRUITS+"Table) SetParent(p *gui.Node) {")
|
||||
fmt.Fprintln(w, " mt.parent = p")
|
||||
fmt.Fprintln(w, "}")
|
||||
fmt.Fprintln(w, "")
|
||||
fmt.Fprintln(w, "func (mt *"+FRUITS+"Table) ShowTable() {")
|
||||
fmt.Fprintln(w, " // log.Info(\"ShowTable() SENDING TO GUI\")")
|
||||
fmt.Fprintln(w, " mt.MakeTable()")
|
||||
fmt.Fprintln(w, " gui.ShowTable(mt.pb)")
|
||||
fmt.Fprintln(w, " if mt.parent == nil {")
|
||||
fmt.Fprintln(w, " gui.ShowTable(mt.pb)")
|
||||
fmt.Fprintln(w, " return")
|
||||
fmt.Fprintln(w, " }")
|
||||
fmt.Fprintln(w, " mt.parent.ShowTable(mt.pb)")
|
||||
fmt.Fprintln(w, "}")
|
||||
fmt.Fprintln(w, "")
|
||||
fmt.Fprintln(w, "type "+FRUIT+"StringFunc struct {")
|
||||
|
@ -155,6 +163,7 @@ func guiMain(w io.Writer, FRUITS string, FRUIT string) {
|
|||
fmt.Fprintln(w, "type "+FRUITS+"Table struct {")
|
||||
fmt.Fprintln(w, " // gt *gui.NodeTable")
|
||||
fmt.Fprintln(w, " pb *guipb.Table")
|
||||
fmt.Fprintln(w, " parent *gui.Node")
|
||||
fmt.Fprintln(w, " x *"+FRUITS+"")
|
||||
fmt.Fprintln(w, " hostnames []string")
|
||||
fmt.Fprintln(w, " stringFuncs []*"+FRUIT+"StringFunc")
|
||||
|
|
Loading…
Reference in New Issue