diff options
| author | Jeff Carr <[email protected]> | 2024-01-19 02:52:57 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-19 02:52:57 -0600 |
| commit | c2a563ae37d11f8374df6c7f00661369f4d5a76f (patch) | |
| tree | 433cb4dd464882258e04a57330113a9f385a96b4 /debug.go | |
| parent | d9a04e92fc4211ae4c68e030a72510caadd4be66 (diff) | |
cleanups after node work
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug.go')
| -rw-r--r-- | debug.go | 60 |
1 files changed, 2 insertions, 58 deletions
@@ -13,6 +13,7 @@ var stretchy bool // expand things like buttons to the maximum size var padded bool // add space between things like buttons var margin bool // add space around the frames of windows +/* var debugToolkit bool = false var debugChange bool = false var debugPlugin bool = false @@ -21,23 +22,9 @@ var debugFlags bool = false var debugGrid bool = false var debugNow bool = true var debugError bool = true +*/ // This is important. This sets the defaults for the gui. Without this, there isn't correct padding, etc -func setDefaultBehavior(s bool) { - defaultBehavior = s - if defaultBehavior { - log.Log(NOW, "Setting this toolkit to use the default behavior.") - log.Log(NOW, "This is the 'guessing' part as defined by the wit/gui 'Principles'. Refer to the docs.") - stretchy = false - padded = true - menubar = true - margin = true - canvas = false - bookshelf = true // 99% of the time, things make a vertical stack of objects - } else { - log.Log(NOW, "This toolkit is set to ignore the default behavior.") - } -} func (t *guiWidget) Dump(b bool) { if !b { @@ -75,46 +62,3 @@ func (t *guiWidget) Dump(b bool) { log.Log(NOW, "uiCheckbox =", t.uiCheckbox) } } - -/* -func GetDebugToolkit () bool { - return debugToolkit -} -*/ - -func (n *node) dumpWidget(b bool) { - var info, d string - - if n == nil { - log.Log(ERROR, "dumpWidget() node == nil") - return - } - info = n.WidgetType.String() - - d = string(n.WidgetId) + " " + info + " " + n.progname - - var tabs string - for i := 0; i < listChildrenDepth; i++ { - tabs = tabs + defaultPadding - } - log.Log(NOW, tabs+d) -} - -var defaultPadding string = " " -var listChildrenDepth int = 0 - -func (n *node) listChildren(dump bool) { - if n == nil { - return - } - - n.dumpWidget(dump) - if len(n.children) == 0 { - return - } - for _, child := range n.children { - listChildrenDepth += 1 - child.listChildren(dump) - listChildrenDepth -= 1 - } -} |
