From 49202eeafdad8e5780fefdad3d2f87fd4354725e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 3 Mar 2023 14:41:38 -0600 Subject: release as v0.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 --- toolkit/andlabs/checkbox.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'toolkit/andlabs/checkbox.go') diff --git a/toolkit/andlabs/checkbox.go b/toolkit/andlabs/checkbox.go index 29a8e4d..16e4eed 100644 --- a/toolkit/andlabs/checkbox.go +++ b/toolkit/andlabs/checkbox.go @@ -6,8 +6,8 @@ import ( _ "github.com/andlabs/ui/winmanifest" ) -func (t andlabsT) NewCheckbox(w *toolkit.Widget) *andlabsT { - log(debugToolkit, "NewCheckbox()", w.Name, w.Type) +func (t *andlabsT) newCheckbox(w *toolkit.Widget) *andlabsT { + log(debugToolkit, "newCheckbox()", w.Name, w.Type) var newt andlabsT newt.tw = w @@ -15,13 +15,13 @@ func (t andlabsT) NewCheckbox(w *toolkit.Widget) *andlabsT { return nil } - c := ui.NewCheckbox(w.Name) - newt.uiCheckbox = c + newt.uiCheckbox = ui.NewCheckbox(w.Name) newt.uiBox = t.uiBox - t.uiBox.Append(c, stretchy) + // t.doAppend(&newt, *newt.uiCheckbox) + t.uiBox.Append(newt.uiCheckbox, stretchy) - c.OnToggled(func(spin *ui.Checkbox) { - newt.tw.B = newt.Checked() + newt.uiCheckbox.OnToggled(func(spin *ui.Checkbox) { + newt.tw.B = newt.checked() log(debugChange, "val =", newt.tw.B) newt.commonChange(newt.tw) }) @@ -29,7 +29,7 @@ func (t andlabsT) NewCheckbox(w *toolkit.Widget) *andlabsT { return &newt } -func (t andlabsT) Checked() bool { +func (t *andlabsT) checked() bool { if t.broken() { return false } @@ -37,15 +37,15 @@ func (t andlabsT) Checked() bool { return t.uiCheckbox.Checked() } -func NewCheckbox(parentW *toolkit.Widget, w *toolkit.Widget) { - log(debugToolkit, "NewCheckbox()", w.Name) +func newCheckbox(parentW *toolkit.Widget, w *toolkit.Widget) { + log(debugToolkit, "newCheckbox()", w.Name) t := mapToolkits[parentW] if (t == nil) { listMap(debugError) return } - newt := t.NewCheckbox(w) + newt := t.newCheckbox(w) mapWidgetsToolkits(w, newt) } @@ -54,7 +54,7 @@ func doCheckbox(p *toolkit.Widget, c *toolkit.Widget) { return } if (c.Action == "New") { - NewCheckbox(p, c) + newCheckbox(p, c) return } ct := mapToolkits[c] -- cgit v1.2.3