diff options
| author | Jeff Carr <[email protected]> | 2024-01-13 22:02:12 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-13 22:02:12 -0600 |
| commit | 47b15946de10a75cda026a7317a90d4857b453c8 (patch) | |
| tree | ab6a8c085226263982d3b19f2913e540707af2a1 /plugin.go | |
| parent | 4ef8409eeadcd4a359b7593b5ea35f9f523bfb64 (diff) | |
work on hiding widgetsv0.12.5
When widgets are hidden, their state works exactly the same
as normal, but updates are not sent to the toolkits
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'plugin.go')
| -rw-r--r-- | plugin.go | 42 |
1 files changed, 0 insertions, 42 deletions
@@ -214,48 +214,6 @@ func initToolkit(name string, filename string) *aplug { return newPlug } -// 2024/01/11 finally moving to type any. simplify to just 'value' -// 2023/05/09 pretty clean -// 2023/04/06 Queue() is also being used and channels are being used. -func newAction(n *Node, atype widget.ActionType) *widget.Action { - var a widget.Action - a.ActionType = atype - if (n == nil) { - return &a - } - a.WidgetId = n.id - a.ProgName = n.progname - a.Value = n.value - - a.X = n.X - a.Y = n.Y - - a.AtW = n.AtW - a.AtH = n.AtH - - if (n.parent != nil) { - a.ParentId = n.parent.id - } - a.WidgetType = n.WidgetType - return &a -} - -// sends the action/event to each toolkit via a golang plugin channel -func sendAction(a *widget.Action) { - for _, aplug := range allPlugins { - log.Log(PLUG, "Action() aplug =", aplug.name, "Action type=", a.ActionType) - if (aplug.pluginChan == nil) { - log.Info("Action() retrieving the aplug.PluginChannel()", aplug.name) - aplug.pluginChan = aplug.PluginChannel() - log.Info("Action() retrieved", aplug.pluginChan) - } - log.Info("Action() SEND to pluginChan", aplug.name) - aplug.pluginChan <- *a - // added during debugging. might be a good idea in general for a tactile experience - log.Sleep(.02) // this delay makes it so SetText() works on initial widget creation - } -} - func (n *Node) InitEmbed(resFS embed.FS) *Node { me.resFS = resFS return n |
