diff options
| author | Jeff Carr <[email protected]> | 2024-01-16 16:37:43 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-16 16:37:43 -0600 |
| commit | 0d6e4271e801b8db8e10c6b5f6ee79a988f7dc1b (patch) | |
| tree | 733b3f5eecf83dfc7a522d63ca3407ca3548b513 | |
initial commit
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | main.go | 27 |
3 files changed, 46 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..81830db --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!Makefile +!*.go +!go.* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fa93380 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +all: + go build -v -x + ./helloworld + +push: + git add --all + git commit -a + git push + +redomod: + rm -f go.* + GO111MODULE= go mod init + GO111MODULE= go mod tidy + @@ -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") + }) +} |
