summaryrefslogtreecommitdiff
path: root/cmds/helloworld/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2022-10-11 11:25:46 -0500
committerJeff Carr <[email protected]>2022-10-11 11:25:46 -0500
commit8358ca44efa625be9cd69fab870dfcf9c2a05df5 (patch)
tree82a012480818d6825f01ce9bc5b62847347629c1 /cmds/helloworld/main.go
parent45644ef9bc333f5def62d1c7f474dc96274e63fa (diff)
Change Node to Box
Diffstat (limited to 'cmds/helloworld/main.go')
-rw-r--r--cmds/helloworld/main.go27
1 files changed, 27 insertions, 0 deletions
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")
+}