diff options
| author | Jeff Carr <[email protected]> | 2023-03-23 12:35:12 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-03-23 12:35:12 -0500 |
| commit | d4787a1ebdd08359746516dbb72f1feaf95be5b6 (patch) | |
| tree | cb81756d61096ccf74af7c8cc9a15e4e00fe1da7 /debugWindow.go | |
| parent | 6a848bf40474365cc1c0b4da9e2f7e3e10b4d627 (diff) | |
Squashed commit of the following:v0.7.3
boxes now exist and are tracked in the binary tree
create for group and grid works
gocui plugin no longer works. TODO: fix in next release
converted everything from plugin to Action()
can remove send()
tab and window are now action()
flags moved to action()
ready for new release
pad() margion() border() all work
move worked!
go.wit.com attept 578th try
adds an early grid widget. won't work until chan
andlabs/ui grid (X,Y) works right
actually can put things in places in a grid
Queue() means shit doesn't look right on grids
lots of fucking around. why am I wasting time on image?
wow. the crazy doAppend() thing is gone
implement Action Show() and Hide()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debugWindow.go')
| -rw-r--r-- | debugWindow.go | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/debugWindow.go b/debugWindow.go index be53957..2c85407 100644 --- a/debugWindow.go +++ b/debugWindow.go @@ -1,7 +1,7 @@ package gui import ( - "git.wit.org/wit/gui/toolkit" +// "git.wit.org/wit/gui/toolkit" ) // TODO: move all this shit into somewhere not global @@ -32,7 +32,6 @@ func (n *Node) DebugTab(title string) *Node { // time.Sleep(1 * time.Second) newN = n.NewTab(title) - newN.Dump() //////////////////////// main debug things ////////////////////////////////// gog = newN.NewGroup("Debugging Windows:") @@ -77,23 +76,11 @@ func (n *Node) DebugTab(title string) *Node { g2 := newN.NewGroup("node things") - g2.NewButton("Node.ListChildren(false)", func () { - g := debugGui - d := debugDump - debugGui = true - debugDump = true - activeWidget.ListChildren(false, nil, nil) - debugGui = g - debugDump = d - }) g2.NewButton("Node.ListChildren(true)", func () { - g := debugGui - d := debugDump - debugGui = true - debugDump = true - activeWidget.ListChildren(true, nil, nil) - debugGui = g - debugDump = d + if (activeWidget == nil) { + activeWidget = Config.master + } + activeWidget.ListChildren(true) }) return newN @@ -111,14 +98,15 @@ func dropdownWindow(p *Node) { log("The Window was set to", name) } log(debugGui, "dd =", dd) + if (activeWidget == nil) { + // the debug window doesn't exist yet so you can't display the change + // TODO: make a fake binary tree for this(?) + return + } // var last = "" for _, child := range Config.master.children { log(debugGui, "\t\t", child.id, child.Width, child.Height, child.Name) - // skip the fake "Flag" node - if (child.widget.Type == toolkit.Flag) { - continue - } dd.AddDropdownName(child.Name) // last = child.Name mapWindows[child.Name] = child @@ -141,5 +129,21 @@ func dropdownWindowWidgets(p *Node) { } log(debugGui, "dd =", dd) - activeWidget.ListChildren(true, dd, mapWindows) + // log("dumpWidget() ", b, listChildrenDepth, defaultPadding, n.id, info) + + var addDropdowns func (*Node) + addDropdowns = func (n *Node) { + s := n.dumpWidget(true) + dd.AddDropdownName(s) + mapWindows[s] = n + + for _, child := range n.children { + listChildrenDepth += 1 + addDropdowns(child) + listChildrenDepth -= 1 + } + } + + // list everything in the binary tree + addDropdowns(Config.master) } |
