2021-10-28 04:10:48 -05:00
|
|
|
package main
|
|
|
|
|
2021-10-31 03:50:22 -05:00
|
|
|
import "log"
|
|
|
|
|
2021-10-28 04:10:48 -05:00
|
|
|
import "git.wit.org/wit/gui"
|
|
|
|
|
2021-10-31 04:06:46 -05:00
|
|
|
func demoClick (n *gui.Node) {
|
|
|
|
log.Println("demoClick() Dumping node:")
|
|
|
|
n.Dump()
|
|
|
|
}
|
2021-10-31 03:50:22 -05:00
|
|
|
|
2021-10-28 04:10:48 -05:00
|
|
|
func addDemoTab(n *gui.Node, title string) {
|
|
|
|
newNode := n.AddTab(title, nil)
|
|
|
|
if (gui.Config.Debug) {
|
|
|
|
newNode.Dump()
|
|
|
|
}
|
|
|
|
newNode.ListChildren(false)
|
|
|
|
|
|
|
|
groupNode1 := newNode.AddGroup("group 1")
|
|
|
|
groupNode1.AddComboBox("demoCombo1", "foo", "bar", "stuff")
|
2021-10-31 03:50:22 -05:00
|
|
|
groupNode1.AddComboBox("demoCombo3", "foo 3", "bar", "stuff")
|
|
|
|
|
|
|
|
groupNode1.Dump()
|
|
|
|
|
2021-10-31 04:06:46 -05:00
|
|
|
butNode1 := groupNode1.AddButton("button1", demoClick)
|
|
|
|
butNode1.Dump()
|
|
|
|
|
|
|
|
butNode2 := groupNode1.AddButton("button2", demoClick)
|
|
|
|
butNode2.Dump()
|
2021-10-28 04:10:48 -05:00
|
|
|
|
|
|
|
groupNode2 := newNode.AddGroup("group 2")
|
|
|
|
groupNode2.AddComboBox("demoCombo2", "more 1", "more 2", "more 3")
|
|
|
|
}
|