summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--main.go10
2 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ecbf8d4..c440f35 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
all: build
- ./helloworld
+ ./basicwindow
build:
- -rm -f helloworld
+ -rm -f basicwindow
go build -v -x
stderr: build
diff --git a/main.go b/main.go
index 2d3bcbf..7e85f49 100644
--- a/main.go
+++ b/main.go
@@ -4,6 +4,7 @@ package main
import (
"go.wit.com/log"
"go.wit.com/gui/gui"
+ "go.wit.com/gui/gadgets"
)
var myGui *gui.Node // This is the beginning of the binary tree of widgets
@@ -19,6 +20,15 @@ func main() {
// This initializes the first window, a group and a button
func helloworld() {
+ basicWin := gadgets.NewBasicWindow(myGui, "basic window test")
+ basicWin.Make()
+ basicWin.StandardExit()
+
+ box1 := basicWin.Box()
+ group1 := box1.NewGroup("choices")
+ group1.NewButton("hello", func() {})
+ basicWin.Draw()
+
window := myGui.NewWindow("hello world")
box := window.NewBox("vbox", false)