go-gui-toolkits/main.go

30 lines
615 B
Go

package main
import (
"go.wit.com/log"
"go.wit.com/gui"
)
var myGui *gui.Node // This is the beginning of the binary tree of widgets
// go will sit here until the window exits
func main() {
myGui = gui.New().Default()
// myGui.LoadToolkit("nocui")
buildworld()
gui.Watchdog()
}
// This initializes the first window, a group and a button
func buildworld() {
window := myGui.NewWindow("build world")
box := window.NewBox("vbox", false)
group := box.NewGroup("groupy")
grid := group.NewGrid("gridiron", 2, 1)
grid.NewButton("build", func() {
log.Println("make something to build everything")
})
}