31 lines
517 B
Go
31 lines
517 B
Go
package main
|
|
|
|
import (
|
|
"go.wit.com/log"
|
|
"go.wit.com/gui/widget"
|
|
)
|
|
|
|
// this is specific to the nocui toolkit
|
|
func initWidget(n *node) *guiWidget {
|
|
var w *guiWidget
|
|
w = new(guiWidget)
|
|
// Set(w, "default")
|
|
|
|
if n.WidgetType == widget.Root {
|
|
log.Log(INFO, "setupWidget() FOUND ROOT w.id =", n.WidgetId)
|
|
n.WidgetId = 0
|
|
me.rootNode = n
|
|
return w
|
|
}
|
|
|
|
if (n.WidgetType == widget.Box) {
|
|
if (n.direction == widget.Horizontal) {
|
|
// n.horizontal = true
|
|
} else {
|
|
// n.horizontal = false
|
|
}
|
|
}
|
|
|
|
return w
|
|
}
|