support for hidden widgets
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
3f3dee0ea5
commit
a9329f794f
8
main.go
8
main.go
|
@ -148,10 +148,10 @@ func dropdownWindow(p *gui.Node) {
|
||||||
|
|
||||||
// var last = ""
|
// var last = ""
|
||||||
for _, child := range p.Children() {
|
for _, child := range p.Children() {
|
||||||
log.Log(INFO, "\t\t", child.GetName())
|
log.Log(INFO, "\t\t", child.GetProgName())
|
||||||
dd.AddDropdownName(child.GetName())
|
dd.AddDropdownName(child.GetProgName())
|
||||||
// last = child.Name
|
// last = child.Name
|
||||||
mapWindows[child.GetName()] = child
|
mapWindows[child.GetProgName()] = child
|
||||||
if (activeWidget == nil) {
|
if (activeWidget == nil) {
|
||||||
activeWidget = child
|
activeWidget = child
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ func dropdownWindowWidgets(p *gui.Node) {
|
||||||
var addDropdowns func (*gui.Node)
|
var addDropdowns func (*gui.Node)
|
||||||
addDropdowns = func (n *gui.Node) {
|
addDropdowns = func (n *gui.Node) {
|
||||||
// s := n.dumpWidget(true)
|
// s := n.dumpWidget(true)
|
||||||
s := n.GetName()
|
s := n.GetProgName()
|
||||||
dd.AddDropdownName(s)
|
dd.AddDropdownName(s)
|
||||||
mapWindows[s] = n
|
mapWindows[s] = n
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ func debugAddWidgetButtons(n *gui.Node) {
|
||||||
a.AddText("make something for tim for qflow")
|
a.AddText("make something for tim for qflow")
|
||||||
a.AddText("and for riscv")
|
a.AddText("and for riscv")
|
||||||
a.Custom = func () {
|
a.Custom = func () {
|
||||||
log.Log(WARN, "custom dropdown() a =", a.ProgName(), a.GetText())
|
log.Log(WARN, "custom dropdown() a =", a.GetProgName(), a.GetText())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
n.NewButton("Combobox", func () {
|
n.NewButton("Combobox", func () {
|
||||||
|
@ -148,7 +148,7 @@ func debugAddWidgetButtons(n *gui.Node) {
|
||||||
a.AddText("mirrors.wit.com")
|
a.AddText("mirrors.wit.com")
|
||||||
a.AddText("go.wit.com")
|
a.AddText("go.wit.com")
|
||||||
a.Custom = func () {
|
a.Custom = func () {
|
||||||
log.Log(WARN, "custom combobox() a =", a.ProgName(), a.GetText())
|
log.Log(WARN, "custom combobox() a =", a.GetProgName(), a.GetText())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
n.NewButton("Grid", func () {
|
n.NewButton("Grid", func () {
|
||||||
|
@ -219,7 +219,7 @@ func debugAddWidgetButton(n *gui.Node) {
|
||||||
if (newY == -1) {
|
if (newY == -1) {
|
||||||
name = name + " (" + strconv.Itoa(activeWidget.NextW) + "," + strconv.Itoa(activeWidget.NextH) + ")"
|
name = name + " (" + strconv.Itoa(activeWidget.NextW) + "," + strconv.Itoa(activeWidget.NextH) + ")"
|
||||||
} else {
|
} else {
|
||||||
activeWidget.SetNext(newX, newY)
|
// activeWidget.SetNext(newX, newY)
|
||||||
name = name + " (" + strconv.Itoa(newX) + "," + strconv.Itoa(newY) + ")"
|
name = name + " (" + strconv.Itoa(newX) + "," + strconv.Itoa(newY) + ")"
|
||||||
}
|
}
|
||||||
log.Log(INFO, "New Name =", name)
|
log.Log(INFO, "New Name =", name)
|
||||||
|
|
Loading…
Reference in New Issue