summaryrefslogtreecommitdiff
path: root/examples/helloworld/main.go
blob: 06c1da5c2669c4187a7d6b02ee91d2af2b89cdcf (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"
	"go.wit.com/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")
	})
}