From 517d844b3c8257dd796244e6a151deceabedab42 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 2 Feb 2025 13:06:30 -0600 Subject: more work on the ever illusive floating stdout window --- plugin.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugin.go') diff --git a/plugin.go b/plugin.go index 469a606..a311930 100644 --- a/plugin.go +++ b/plugin.go @@ -40,6 +40,7 @@ func newAdd(n *tree.Node) { w.Show() } +// for gocui as a GUI plugin, SetTitle & SetLabel are identical to SetText func newSetTitle(n *tree.Node, s string) { newSetText(n, s) } @@ -48,6 +49,9 @@ func newSetLabel(n *tree.Node, s string) { newSetText(n, s) } +// newSetText() and newAddText() are simple. They take the event sent +// to the GO plugin from the application and lookup the plugin structure +// then pass that event to gocui. This is the transfer point func newSetText(n *tree.Node, s string) { if n == nil { log.Warn("Tree Error: Add() sent n == nil") @@ -180,6 +184,7 @@ func (w *guiWidget) SetText(text string) { } } +/* func (w *guiWidget) Set(val any) { if w == nil { log.Log(WARN, "Set() w == nil. val =", val) @@ -196,3 +201,4 @@ func (w *guiWidget) Set(val any) { w.labelN = widget.GetString(val) } } +*/ -- cgit v1.2.3