blob: 3d8ba408ae087e5324dab9aaff5946b5e4c634e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// This is a simple example
package main
import (
"log"
"git.wit.org/wit/gui"
)
func main() {
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")
myWindow.NewButton("hello", func () {
log.Println("world")
})
}
|