summaryrefslogtreecommitdiff
path: root/action.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-25 18:16:51 -0600
committerJeff Carr <[email protected]>2024-01-25 18:16:51 -0600
commitb88cca4b0d5f8948e682d6c70752c23ec7808d53 (patch)
tree9eb643acc4f3a8f2e6b231a9a27e5afb0ac0db43 /action.go
parentacf5473cc5928f053b9ffe7be1e903398b76e86a (diff)
checkbox state works
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'action.go')
-rw-r--r--action.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/action.go b/action.go
index cc5a975..0eecda1 100644
--- a/action.go
+++ b/action.go
@@ -60,6 +60,13 @@ func sendAction(n *Node, atype widget.ActionType) {
defer n.mu.Unlock()
// log.Log(PLUG, "SENDING ACTION STRINGS n.Strings", n.strings, n.id, n.WidgetType, n.GetProgName())
+ if n.changed {
+ n.changed = false
+ } else {
+ // probably shouldn't even send this to the toolkits
+ // TODO: can't implement this yet
+ }
+
// this checks to see if the window is show in the toolkit. If it is not,
// then don't send any events. Unless it is a window widget, then send events
if n.WidgetType != widget.Window {
@@ -103,6 +110,8 @@ func sendAction(n *Node, atype widget.ActionType) {
a.State.Checked = n.checked
a.State.Visable = n.visable
+ // TODO: if visable == false here, return
+ a.State.Hidden = n.hidden
a.State.Pad = n.pad
a.State.Expand = n.expand
a.State.Borderless = n.borderless