diff options
Diffstat (limited to 'andlabs/debug.go')
| -rw-r--r-- | andlabs/debug.go | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/andlabs/debug.go b/andlabs/debug.go index 51048d5..f974783 100644 --- a/andlabs/debug.go +++ b/andlabs/debug.go @@ -8,11 +8,11 @@ import ( var defaultBehavior bool = true var bookshelf bool // do you want things arranged in the box like a bookshelf or a stack? -var canvas bool // if set to true, the windows are a raw canvas -var menubar bool // for windows -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 canvas bool // if set to true, the windows are a raw canvas +var menubar bool // for windows +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 @@ -26,7 +26,7 @@ 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) { + 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 @@ -41,38 +41,38 @@ func setDefaultBehavior(s bool) { } func (t *guiWidget) Dump(b bool) { - if ! b { + if !b { return } log.Log(NOW, "Name = ", t.Width, t.Height) - if (t.uiBox != nil) { + if t.uiBox != nil { log.Log(NOW, "uiBox =", t.uiBox) } - if (t.uiButton != nil) { + if t.uiButton != nil { log.Log(NOW, "uiButton =", t.uiButton) } - if (t.uiCombobox != nil) { + if t.uiCombobox != nil { log.Log(NOW, "uiCombobox =", t.uiCombobox) } - if (t.uiWindow != nil) { + if t.uiWindow != nil { log.Log(NOW, "uiWindow =", t.uiWindow) } - if (t.uiTab != nil) { + if t.uiTab != nil { log.Log(NOW, "uiTab =", t.uiTab) } - if (t.uiGroup != nil) { + if t.uiGroup != nil { log.Log(NOW, "uiGroup =", t.uiGroup) } - if (t.uiEntry != nil) { + if t.uiEntry != nil { log.Log(NOW, "uiEntry =", t.uiEntry) } - if (t.uiMultilineEntry != nil) { + if t.uiMultilineEntry != nil { log.Log(NOW, "uiMultilineEntry =", t.uiMultilineEntry) } - if (t.uiSlider != nil) { + if t.uiSlider != nil { log.Log(NOW, "uiSlider =", t.uiSlider) } - if (t.uiCheckbox != nil) { + if t.uiCheckbox != nil { log.Log(NOW, "uiCheckbox =", t.uiCheckbox) } } @@ -86,7 +86,7 @@ func GetDebugToolkit () bool { func (n *node) dumpWidget(b bool) { var info, d string - if (n == nil) { + if n == nil { log.Log(ERROR, "dumpWidget() node == nil") return } @@ -98,14 +98,14 @@ func (n *node) dumpWidget(b bool) { for i := 0; i < listChildrenDepth; i++ { tabs = tabs + defaultPadding } - log.Log(NOW, tabs + d) + log.Log(NOW, tabs+d) } var defaultPadding string = " " var listChildrenDepth int = 0 func (n *node) listChildren(dump bool) { - if (n == nil) { + if n == nil { return } |
