start using window.Draw()

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-05 16:56:03 -06:00
parent 198f7eac88
commit ca189c9084
4 changed files with 6 additions and 4 deletions

View File

@ -20,6 +20,7 @@ func DebugGoChannels(p *gui.Node) *gadgets.BasicWindow {
var g *gui.Node var g *gui.Node
w = gadgets.NewBasicWindow(p, "Debug GO Channels") w = gadgets.NewBasicWindow(p, "Debug GO Channels")
w.Draw()
g = w.Box().NewGroup("Channel stuff").Pad() g = w.Box().NewGroup("Channel stuff").Pad()
// var debugWG sync.WaitGroup // var debugWG sync.WaitGroup

View File

@ -18,6 +18,7 @@ func DebugGolangWindow(p *gui.Node) *gadgets.BasicWindow {
var g, og, outputTextbox *gui.Node var g, og, outputTextbox *gui.Node
w = gadgets.NewBasicWindow(p, "GO") w = gadgets.NewBasicWindow(p, "GO")
w.Draw()
g = w.Box().NewGroup("Language Internals").Pad() g = w.Box().NewGroup("Language Internals").Pad()
g.NewButton("ReadModuleInfo()", func () { g.NewButton("ReadModuleInfo()", func () {

View File

@ -16,7 +16,6 @@ import (
func DebugWindow(p *gui.Node) { func DebugWindow(p *gui.Node) {
if (me != nil) { if (me != nil) {
log.Warn("Draw then Toggle() debuging window here") log.Warn("Draw then Toggle() debuging window here")
me.bugWin.Draw()
me.bugWin.Toggle() me.bugWin.Toggle()
return return
} }
@ -24,6 +23,7 @@ func DebugWindow(p *gui.Node) {
me.myGui = p me.myGui = p
me.bugWin = gadgets.NewBasicWindow(p,"go.wit.com/gui debug window") me.bugWin = gadgets.NewBasicWindow(p,"go.wit.com/gui debug window")
me.bugWin.Draw()
DebugWindow2(me.bugWin.Box(), "Debug Tab") DebugWindow2(me.bugWin.Box(), "Debug Tab")
// initialize the log settings window (does not display it) // initialize the log settings window (does not display it)
@ -46,7 +46,6 @@ func DebugWindow2(newB *gui.Node, title string) *gui.Node {
gr.NewButton("Widgets Window", func () { gr.NewButton("Widgets Window", func () {
if me.widgets == nil { if me.widgets == nil {
me.widgets = DebugWidgetWindow(me.myGui) me.widgets = DebugWidgetWindow(me.myGui)
me.widgets.Draw()
return return
} }
me.widgets.Toggle() me.widgets.Toggle()
@ -108,9 +107,9 @@ func DebugWindow2(newB *gui.Node, title string) *gui.Node {
gr.NewButton("GO Language Internals", func () { gr.NewButton("GO Language Internals", func () {
if me.golang == nil { if me.golang == nil {
me.golang = DebugGolangWindow(me.myGui) me.golang = DebugGolangWindow(me.myGui)
me.golang.Draw()
return return
} }
log.Warn("going to toggle golang window")
if me.golang.Ready() { if me.golang.Ready() {
me.golang.Toggle() me.golang.Toggle()
} }
@ -118,9 +117,9 @@ func DebugWindow2(newB *gui.Node, title string) *gui.Node {
gr.NewButton("GO Channels debug", func () { gr.NewButton("GO Channels debug", func () {
if me.gochan == nil { if me.gochan == nil {
me.gochan = DebugGoChannels(me.myGui) me.gochan = DebugGoChannels(me.myGui)
me.gochan.Draw()
return return
} }
log.Warn("going to toggle go channels window")
if me.gochan.Ready() { if me.gochan.Ready() {
me.gochan.Toggle() me.gochan.Toggle()
} }

View File

@ -33,6 +33,7 @@ func setActiveWidget(w *gui.Node) {
func DebugWidgetWindow(p *gui.Node) *gadgets.BasicWindow { func DebugWidgetWindow(p *gui.Node) *gadgets.BasicWindow {
var w *gadgets.BasicWindow var w *gadgets.BasicWindow
w = gadgets.NewBasicWindow(p, "Widgets") w = gadgets.NewBasicWindow(p, "Widgets")
w.Draw()
g := w.Box().NewGroup("widget:").Pad() g := w.Box().NewGroup("widget:").Pad()