summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/debug.go b/debug.go
index 496fa72..9d70bb5 100644
--- a/debug.go
+++ b/debug.go
@@ -7,6 +7,7 @@ package gui
import (
"errors"
"strconv"
+ "strings"
"go.wit.com/log"
"go.wit.com/gui/widget"
@@ -55,13 +56,29 @@ func (n *Node) dumpWidget(b bool) string {
}
info = n.WidgetType.String()
- d = strconv.Itoa(n.id) + " " + info + " " + n.progname
var tabs string
for i := 0; i < listChildrenDepth; i++ {
tabs = tabs + defaultPadding
}
+ d = strconv.Itoa(n.id) + " " + info + " " + n.GetProgName() + strings.Join(n.Json(), " ")
logindent(b, listChildrenDepth, defaultPadding, d)
+ if b {
+ switch n.WidgetType {
+ case widget.Combobox:
+ logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.value)
+ logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.strings)
+ case widget.Dropdown:
+ logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.value)
+ logindent(b, listChildrenDepth, defaultPadding, " Dropdown", n.strings)
+ case widget.Grid:
+ logindent(b, listChildrenDepth, defaultPadding, " GridSize =", n.X, n.Y)
+ case widget.Box:
+ logindent(b, listChildrenDepth, defaultPadding, " Direction =", n.direction)
+ default:
+ }
+ }
+
return tabs + d
}