diff options
Diffstat (limited to 'cmds')
| -rw-r--r-- | cmds/gui-example/Makefile | 3 | ||||
| -rwxr-xr-x | cmds/helloworld/helloworld | bin | 0 -> 3097960 bytes | |||
| -rw-r--r-- | cmds/helloworld/main.go | 27 |
3 files changed, 29 insertions, 1 deletions
diff --git a/cmds/gui-example/Makefile b/cmds/gui-example/Makefile index 8718fd1..638cffc 100644 --- a/cmds/gui-example/Makefile +++ b/cmds/gui-example/Makefile @@ -2,4 +2,5 @@ run: build ./gui-example build: - go build + GO111MODULE="off" go -v get . + GO111MODULE="off" go build diff --git a/cmds/helloworld/helloworld b/cmds/helloworld/helloworld Binary files differnew file mode 100755 index 0000000..cc41f78 --- /dev/null +++ b/cmds/helloworld/helloworld diff --git a/cmds/helloworld/main.go b/cmds/helloworld/main.go new file mode 100644 index 0000000..1cb1bbd --- /dev/null +++ b/cmds/helloworld/main.go @@ -0,0 +1,27 @@ +// This creates a simple hello world window +package main + +import ( + "git.wit.org/wit/gui" +) + +func main() { + gui.Main(initGUI) +} + +// This initializes the first window +func initGUI() { + gui.Config.Title = "Hello World golang wit/gui Window" + gui.Config.Width = 640 + gui.Config.Height = 480 + node1 := gui.NewWindow() + addDemoTab(node1, "A Simple Tab Demo") + addDemoTab(node1, "A Second Tab") +} + +func addDemoTab(n *gui.Node, title string) { + newNode := n.AddTab(title, nil) + + groupNode1 := newNode.AddGroup("group 1") + groupNode1.AddComboBox("demoCombo2", "more 1", "more 2", "more 3") +} |
