summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/plugin.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-03 14:41:38 -0600
committerJeff Carr <[email protected]>2023-03-03 14:41:38 -0600
commit49202eeafdad8e5780fefdad3d2f87fd4354725e (patch)
tree5d749b5d4835c7a0395bd1f87b5d2d1d91b14a08 /toolkit/andlabs/plugin.go
parent80317ec89c94beadcbf3775f84c6010b5ceef302 (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 'toolkit/andlabs/plugin.go')
-rw-r--r--toolkit/andlabs/plugin.go38
1 files changed, 35 insertions, 3 deletions
diff --git a/toolkit/andlabs/plugin.go b/toolkit/andlabs/plugin.go
index 5bc40a0..8b75766 100644
--- a/toolkit/andlabs/plugin.go
+++ b/toolkit/andlabs/plugin.go
@@ -26,6 +26,12 @@ func Send(p *toolkit.Widget, c *toolkit.Widget) {
}
log(debugPlugin, "Send() child =", c.Name, ",", c.Action, ",", c.Type)
+ if (c.Action == "SetMargin") {
+ log(true, "need to implement SetMargin here")
+ setMargin(p, c, c.B)
+ return
+ }
+
switch c.Type {
case toolkit.Window:
newWindow(c)
@@ -45,10 +51,36 @@ func Send(p *toolkit.Widget, c *toolkit.Widget) {
newSlider(p, c)
case toolkit.Spinner:
newSpinner(p, c)
+ case toolkit.Dropdown:
+ doDropdown(p, c)
+ case toolkit.Combobox:
+ doCombobox(p, c)
+ case toolkit.Grid:
+ doGrid(p, c)
+ case toolkit.Flag:
+ log(debugFlag, "plugin Send() flag parent =", p.Name, p.Type)
+ log(debugFlag, "plugin Send() flag child =", c.Name, c.Type)
+ log(debugFlag, "plugin Send() flag child.Action =", c.Action)
+ log(debugFlag, "plugin Send() flag child.S =", c.S)
+ log(debugFlag, "plugin Send() flag child.B =", c.B)
+ log(debugFlag, "plugin Send() what to flag?")
+ // should set the checkbox to this value
+ switch c.S {
+ case "Error":
+ debugError = c.B
+ case "Toolkit":
+ debugToolkit = c.B
+ case "Change":
+ debugChange = c.B
+ case "Show":
+ ShowDebug()
+ default:
+ log(debugError, "Can't set unknown flag", c.S)
+ }
default:
- log(true, "unknown parent =", p.Name, p.Type)
- log(true, "unknown child =", c.Name, c.Type)
- log(true, "Don't know how to do", c.Type, "yet")
+ log(true, "plugin Send() unknown parent =", p.Name, p.Type)
+ log(true, "plugin Send() unknown child =", c.Name, c.Type)
+ log(true, "plugin Send() Don't know how to do", c.Type, "yet")
}
}