summaryrefslogtreecommitdiff
path: root/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'cmds')
-rw-r--r--cmds/consolemouse/main.go23
-rw-r--r--cmds/gui-demo/main.go2
-rw-r--r--cmds/helloworld/main.go9
3 files changed, 14 insertions, 20 deletions
diff --git a/cmds/consolemouse/main.go b/cmds/consolemouse/main.go
index 44ad18d..3f4ce58 100644
--- a/cmds/consolemouse/main.go
+++ b/cmds/consolemouse/main.go
@@ -32,26 +32,17 @@ func initGUI() {
addDemoTab(w, "A Second Tab")
}
-func addDemoTab(window *gui.Node, title string) {
+func addDemoTab(w *gui.Node, title string) {
var newNode, g *gui.Node
- newNode = window.AddTab(title, nil)
- log.Println("addDemoTab() newNode.Dump")
- log.Println("addDemoTab() newNode.Dump")
- log.Println("addDemoTab() newNode.Dump")
- log.Println("addDemoTab() newNode.Dump")
- newNode.Dump()
- newNode.Toolkit.Dump()
+ newNode = w.NewTab(title)
g = newNode.NewGroup("group 1")
- log.Println("addDemoTab() g.Dump")
- log.Println("addDemoTab() g.Dump")
- log.Println("addDemoTab() g.Dump")
- log.Println("addDemoTab() g.Dump")
- g.Dump()
- g.Toolkit.Dump()
- // myExit(nil)
- g.AddComboBox("demoCombo2", "more 1", "more 2", "more 3")
+
+ dd := g.NewDropdown("demoCombo2")
+ dd.AddDropdown("more 1")
+ dd.AddDropdown("less 2")
+ dd.AddDropdown("foo 3")
}
func myExit(n *gui.Node) {
diff --git a/cmds/gui-demo/main.go b/cmds/gui-demo/main.go
index d89b1b0..54ad449 100644
--- a/cmds/gui-demo/main.go
+++ b/cmds/gui-demo/main.go
@@ -10,6 +10,8 @@ import (
// This initializes the first window
//
+// BUG: THIS PROGRAM DOESN'T EXIT PROPERLY (NOT REALLY A BUG)
+//
// Then starts a goroutine to demonstrate how to
// inject things into the GUI
func main() {
diff --git a/cmds/helloworld/main.go b/cmds/helloworld/main.go
index 97af97b..bc1ea5a 100644
--- a/cmds/helloworld/main.go
+++ b/cmds/helloworld/main.go
@@ -37,13 +37,12 @@ func initGUI() {
func addDemoTab(window *gui.Node, title string) {
var newNode, g *gui.Node
- newNode = window.AddTab(title, nil)
+ newNode = window.NewTab(title)
log.Println("addDemoTab() newNode.Dump")
log.Println("addDemoTab() newNode.Dump")
log.Println("addDemoTab() newNode.Dump")
log.Println("addDemoTab() newNode.Dump")
newNode.Dump()
- newNode.Toolkit.Dump()
g = newNode.NewGroup("group 1")
log.Println("addDemoTab() g.Dump")
@@ -51,9 +50,11 @@ func addDemoTab(window *gui.Node, title string) {
log.Println("addDemoTab() g.Dump")
log.Println("addDemoTab() g.Dump")
g.Dump()
- g.Toolkit.Dump()
// os.Exit(0)
- g.AddComboBox("demoCombo2", "more 1", "more 2", "more 3")
+ dd := g.NewDropdown("demoCombo2")
+ dd.AddDropdown("more 1")
+ dd.AddDropdown("more 2")
+ dd.AddDropdown("more 3")
}
func myDefaultExit(n *gui.Node) {