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 /dropdown.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 'dropdown.go')
| -rw-r--r-- | dropdown.go | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/dropdown.go b/dropdown.go index 214cc5a..81746c6 100644 --- a/dropdown.go +++ b/dropdown.go @@ -6,41 +6,22 @@ import ( // add a new entry to the dropdown name func (n *Node) AddDropdownName(name string) { - for _, aplug := range allPlugins { - log(debugPlugin, "AddDropdownName() aplug =", aplug.name, "name =", name) - if (aplug.AddDropdownName == nil) { - log(debugPlugin, "\taplug.AddDropdownName() = nil") - continue - } - aplug.AddDropdownName(&n.widget, name) - } + n.Add(name) } // Set the dropdown menu to 'name' func (n *Node) SetDropdownName(name string) { - log(debugGui, "SetDropdownName() work. name =", name) - for _, aplug := range allPlugins { - log(debugPlugin, "SetDropdownName() aplug =", aplug.name, "name =", name) - if (aplug.SetDropdownName == nil) { - log(true, "\taplug.SetDropdownName() aplug = nil") - continue - } - aplug.SetDropdownName(&n.widget, name) - } + n.SetText(name) } func (n *Node) NewDropdown(name string) *Node { newNode := n.New(name, toolkit.Dropdown, nil) + send(n, newNode) + return newNode +} - for _, aplug := range allPlugins { - log(debugGui, "gui.NewDropdown() aplug =", aplug.name, "name =", newNode.widget.Name) - if (aplug.NewDropdown == nil) { - log(debugGui, "\tgui.NewDropdown() aplug.NewDropdown = nil", aplug.name) - continue - } - aplug.NewDropdown(&n.widget, &newNode.widget) - } - - // TODO, this doesn't work for some reason (over-written by plugin?) +func (n *Node) NewCombobox(name string) *Node { + newNode := n.New(name, toolkit.Combobox, nil) + send(n, newNode) return newNode } |
