diff options
| author | Jeff Carr <[email protected]> | 2022-10-11 11:59:42 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2022-10-11 11:59:42 -0500 |
| commit | 3c899365154e48aefbc0b5ee48cd089f49339cb2 (patch) | |
| tree | 13f3c0aa281d17c55306ed2e0323aa5188087e04 /cmds/helloworld | |
| parent | 2294e22484be61a934ca8b523f4aeb40d20d6196 (diff) | |
| parent | 770fa06a18652b30db0cd4ee64e8e89d06d7de2e (diff) | |
Merge branch 'master' into develv0.3.1
Diffstat (limited to 'cmds/helloworld')
| -rwxr-xr-x | cmds/helloworld/helloworld | bin | 0 -> 3097960 bytes | |||
| -rw-r--r-- | cmds/helloworld/main.go | 27 |
2 files changed, 27 insertions, 0 deletions
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") +} |
