old-gui/fakeout.go

38 lines
826 B
Go
Raw Permalink Normal View History

/*
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"
newgui "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
newgui.Watchdog()
}
// This creates a window
func helloworld() {
myGui := newgui.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")
})
}