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 /textbox.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 'textbox.go')
| -rw-r--r-- | textbox.go | 22 |
1 files changed, 8 insertions, 14 deletions
@@ -1,20 +1,14 @@ package gui -func (n *Node) NewTextbox(name string) *Node { - newNode := n.New(name, "Textbox") - - newNode.Widget.Custom = func() { - log(debugGui, "wit/gui clicker()NewTextBox BUT IS EMPTY. FIXME", newNode.Widget) - } +import ( + "git.wit.org/wit/gui/toolkit" +) - for _, aplug := range allPlugins { - log(debugGui, "gui.NewTextbox() aplug =", aplug.name, "name =", newNode.Widget.Name) - if (aplug.NewTextbox == nil) { - log(debugGui, "\tgui.NewTextbox() aplug.NewTextbox = nil", aplug.name) - continue - } - aplug.NewTextbox(&n.Widget, &newNode.Widget) - } +func (n *Node) NewTextbox(name string) *Node { + newNode := n.New(name, toolkit.Textbox, func() { + log(debugGui, "wit/gui clicker()NewTextBox BUT IS EMPTY. FIXME name =", name) + }) + send(n, newNode) return newNode } |
