From 0d6e4271e801b8db8e10c6b5f6ee79a988f7dc1b Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 16 Jan 2024 16:37:43 -0600 Subject: initial commit --- main.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 main.go (limited to 'main.go') diff --git a/main.go b/main.go new file mode 100644 index 0000000..e2ac93a --- /dev/null +++ b/main.go @@ -0,0 +1,27 @@ +// This creates a simple hello world window +package main + +import ( + "go.wit.com/log" + "go.wit.com/gui/gui" +) + +var myGui *gui.Node // This is the beginning of the binary tree of widgets + +// go will sit here until the window exits +func main() { + myGui = gui.New().Default() + + helloworld() + gui.Watchdog() +} + +// This initializes the first window, a group and a button +func helloworld() { + window := myGui.NewWindow("hello world") + + group := window.NewGroup("foo bar") + group.NewButton("hello", func() { + log.Println("world") + }) +} -- cgit v1.2.3