diff options
| author | Jeff Carr <[email protected]> | 2023-03-01 11:35:36 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-03-01 11:35:36 -0600 |
| commit | 8dbf5a09097b7868e9218bf98716c57eac998a10 (patch) | |
| tree | ab3bdfeaf5a59a55de9d2a6661d2d824090491e5 /main.go | |
| parent | f3bb68396afa7452ecf1c8d4744c825a9d81057c (diff) | |
lots cleaner code between the pluginv0.6.1
Queue() around SetText is helping userspace crashing
merge forceDump(bool) into Dump()
debugging output configuration is pretty clean
keep cutting down duplicate things
--gui-verbose flag works
make label "standard" code
add debug.FreeOSMemory()
move the GO language internals to display in the GUI
update push to do tags and go to github.com/wit-go/
remove the other license file
it might be confusing golang.org and github
proper WidgetType
added a Quit() button
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 43 |
1 files changed, 27 insertions, 16 deletions
@@ -16,20 +16,31 @@ const Yaxis = 1 // stack things vertically var res embed.FS func init() { - debugGui = true - log(debugGui, "gui.init() has been run") + log("init() has been run") Config.counter = 0 Config.prefix = "wit" - - title := "guiBinaryTree" - w := 640 - h := 480 + Config.Width = 640 + Config.Height = 480 // Populates the top of the binary tree - Config.master = addNode(title, w, h) - // Config.master.Dump() - debugGui = false + Config.master = addNode("guiBinaryTree") + + go doGuiChan() +} + +func doGuiChan() { + for { + select { + case <-Config.ActionCh1: + log(true, "CHANNEL ACTION 1 !!!!!") + return + case <-Config.ActionCh2: + log(true, "CHANNEL ACTION 2 !!!!!") + return + default: + } + } } func InitPlugins(names []string) { @@ -116,21 +127,21 @@ func Queue(f func()) { } // The window is destroyed but the application does not quit -func StandardClose(n *Node) { +func (n *Node) StandardClose() { log(debugGui, "wit/gui Standard Window Close. name =", n.Name) - log(debugGui, "wit/gui Standard Window Close. n.custom exit =", n.custom) + log(debugGui, "wit/gui Standard Window Close. n.Custom exit =", n.Custom) } // The window is destroyed but the application does not quit -func StandardExit(n *Node) { - log(debugGui, "wit/gui Standard Window Exit. running os.Exit()") - log(debugGui, "gui.Node.StandardExit() attempt to exit each toolkit plugin") +func StandardExit() { + log("wit/gui Standard Window Exit. running os.Exit()") + log("gui.Node.StandardExit() attempt to exit each toolkit plugin") for i, aplug := range allPlugins { - log(debugGui, "gui.Node.NewButton()", i, aplug) + log("gui.Node.NewButton()", i, aplug) if (aplug.Quit != nil) { aplug.Quit() } } - exit("StandardExit") + exit(0) } |
