old-gui/fakeout.go

38 lines
815 B
Go

/*
this is not a real package anymore
at one time, gui was
"go.wit.com/gui" but I wanted to move it to
"go.wit.com/gui/gui to make other things.
that turned into a mess because there was old packages here
and I couldn't figure out how to avoid that so I did this
hopefully this doesn't cause more problems. --jcarr 2024/01/18
*/
package "gui"
import (
"log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
)
func test() {
helloworld()
// This is just a optional goroutine to watch that things are alive
gui.Watchdog()
}
// This creates a window
func helloworld() {
myGui := gui.New().Default()
myWindow := myGui.NewWindow("helloworld golang wit/gui window")
gadgets.NewBasicWindow(myGui, "helloworld golang wit/gui window")
myWindow.NewButton("hello", func () {
log.Println("world")
})
}