summaryrefslogtreecommitdiff
path: root/cmds/helloworld
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2022-10-11 11:59:42 -0500
committerJeff Carr <[email protected]>2022-10-11 11:59:42 -0500
commit3c899365154e48aefbc0b5ee48cd089f49339cb2 (patch)
tree13f3c0aa281d17c55306ed2e0323aa5188087e04 /cmds/helloworld
parent2294e22484be61a934ca8b523f4aeb40d20d6196 (diff)
parent770fa06a18652b30db0cd4ee64e8e89d06d7de2e (diff)
Merge branch 'master' into develv0.3.1
Diffstat (limited to 'cmds/helloworld')
-rwxr-xr-xcmds/helloworld/helloworldbin0 -> 3097960 bytes
-rw-r--r--cmds/helloworld/main.go27
2 files changed, 27 insertions, 0 deletions
diff --git a/cmds/helloworld/helloworld b/cmds/helloworld/helloworld
new file mode 100755
index 0000000..cc41f78
--- /dev/null
+++ b/cmds/helloworld/helloworld
Binary files differ
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")
+}