diff options
| author | Jeff Carr <[email protected]> | 2023-03-03 14:41:38 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-03-03 14:41:38 -0600 |
| commit | 49202eeafdad8e5780fefdad3d2f87fd4354725e (patch) | |
| tree | 5d749b5d4835c7a0395bd1f87b5d2d1d91b14a08 /common.go | |
| parent | 80317ec89c94beadcbf3775f84c6010b5ceef302 (diff) | |
release as v0.6.5v0.6.5
good standard release
really clean interaction to plugin
really clean debug flags implementation
common doAppend() idea, but it probably won't work
re-implement combobox. this code base almost doesn't suck
slider & spinner set values now
tab set margin works
convert dropdown to Send()
lots of other changes to try to implement single line Entry()
I guess use golang file names even though internalally the go developers
use underscore chars in the actual go sources.
Maybe there is a reason for that?
go channel debug window does something
make a debug window for channels. add sample icons
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -8,6 +8,13 @@ import ( // functions for handling text related GUI elements +func (n *Node) Add(str string) { + log(debugGui, "gui.Add() value =", str) + n.widget.Action = "Add" + n.widget.S = str + send(n.parent, n) +} + func (n *Node) SetText(str string) bool { log(debugChange, "gui.SetText() value =", str) n.widget.Action = "Set" @@ -16,6 +23,23 @@ func (n *Node) SetText(str string) bool { return true } +func (n *Node) Set(a any) bool { + log(debugChange, "gui.Set() value =", a) + n.widget.Action = "Set" + switch v := a.(type) { + case bool: + n.widget.B = a.(bool) + case string: + n.widget.S = a.(string) + case int: + n.widget.I = a.(int) + default: + log(debugError, "gui.Set() unknown type =", v, "a =", a) + } + send(n.parent, n) + return true +} + func (n *Node) AppendText(str string) bool { n.widget.Action = "Set" tmp := n.widget.S + str |
