diff options
| author | Jeff Carr <[email protected]> | 2023-12-15 17:18:48 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-15 17:18:48 -0600 |
| commit | dcce32583387be7fc4f6cd8c8dea62fd7dc42ecf (patch) | |
| tree | ffbedb095816a92c69546041271acbef5870481c /toolkit/gocui/plugin.go | |
| parent | 282119d970faed3f8a60d5105a2f26ee14681ff4 (diff) | |
make a common.go for the toolkitsv0.8.7
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/plugin.go')
| -rw-r--r-- | toolkit/gocui/plugin.go | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/toolkit/gocui/plugin.go b/toolkit/gocui/plugin.go index 6d597b4..eae811d 100644 --- a/toolkit/gocui/plugin.go +++ b/toolkit/gocui/plugin.go @@ -9,7 +9,7 @@ import ( func action(a *toolkit.Action) { log(logInfo, "action() START", a.WidgetId, a.ActionType, a.WidgetType, a.Name) n := me.rootNode.findWidgetId(a.WidgetId) - var w *cuiWidget + var w *guiWidget if (n != nil) { w = n.tk } @@ -98,20 +98,3 @@ func (n *node) Set(val any) { log(logError, "Set() unknown type =", val, v) } } - -// this passes the user event back from the plugin -func (n *node) doUserEvent() { - if (me.callback == nil) { - log(logError, "doUserEvent() no callback channel was configured") - return - } - var a toolkit.Action - a.WidgetId = n.WidgetId - a.Name = n.Name - a.Text = n.Text - a.B = n.B - a.ActionType = toolkit.User - log(logInfo, "doUserEvent() START: send a button click callback()", a.WidgetId, a.Name) - me.callback <- a - log(logInfo, "doUserEvent() END: sent a button click callback()", a.WidgetId, a.Name) -} |
