summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-18 16:41:16 -0600
committerJeff Carr <[email protected]>2024-01-18 16:41:16 -0600
commit3c0e238cc7f3521d1a0a27e777b204f9c207b5ea (patch)
treec51ff76ef1918995805aaaaca3d9a7f0fdc2cf86
parenta33537c799c0ac2dad847fbffaeebabbff4f786f (diff)
make a go file so go get doesn't freak out
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--.gitignore1
-rw-r--r--Makefile1
-rw-r--r--main.go30
3 files changed, 32 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 6c5452f..f6742d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.swp
+build
# ignore compiled plugins
*.so
diff --git a/Makefile b/Makefile
index a32f525..cc59329 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
.PHONY: debian nocui gocui andlabs
all: build debian
+ go build -o build main.go
build: nocui gocui andlabs
diff --git a/main.go b/main.go
new file mode 100644
index 0000000..0cb35d9
--- /dev/null
+++ b/main.go
@@ -0,0 +1,30 @@
+// make a simple app to build everything
+package main
+
+import (
+ "go.wit.com/log"
+ "go.wit.com/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()
+ myGui.LoadToolkit("nocui")
+
+ buildworld()
+ gui.Watchdog()
+}
+
+// This initializes the first window, a group and a button
+func buildworld() {
+ window := myGui.NewWindow("build world")
+
+ box := window.NewBox("vbox", false)
+ group := box.NewGroup("groupy")
+ grid := group.NewGrid("gridiron", 2, 1)
+ grid.NewButton("build", func() {
+ log.Println("make something to build everything")
+ })
+}