debian/andlabs/widget.go

30 lines
463 B
Go
Raw Normal View History

2024-01-01 16:11:54 -06:00
package main
import (
"go.wit.com/gui/widget"
2024-01-01 16:11:54 -06:00
)
// 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 {
2024-01-01 16:11:54 -06:00
log(logInfo, "setupWidget() FOUND ROOT w.id =", n.WidgetId)
n.WidgetId = 0
me.rootNode = n
return w
}
if (n.WidgetType == widget.Box) {
2024-01-01 16:11:54 -06:00
if (n.B) {
n.horizontal = true
} else {
n.horizontal = false
}
}
return w
}