diff options
Diffstat (limited to 'examples/helloworld/main.go')
| -rw-r--r-- | examples/helloworld/main.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/helloworld/main.go b/examples/helloworld/main.go new file mode 100644 index 0000000..3d8ba40 --- /dev/null +++ b/examples/helloworld/main.go @@ -0,0 +1,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") + }) +} |
