From 841e6252c95244f0ee7faf2c01d33f69a8ab483a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 17 Jan 2024 21:31:49 -0600 Subject: common tree package for toolkits This update provides *lots* of toolkit updates. This will allow the next step of debugging the gocui toolkit to make it work again. There are new common routines for handling the plugin channel communication Signed-off-by: Jeff Carr --- nocui/event.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'nocui/event.go') diff --git a/nocui/event.go b/nocui/event.go index 97f2aed..9bbafdb 100644 --- a/nocui/event.go +++ b/nocui/event.go @@ -1,11 +1,13 @@ package main +/* import ( "go.wit.com/log" "go.wit.com/gui/widget" + "go.wit.com/gui/toolkits/tree" ) -func (n *node) doWidgetClick() { +func doWidgetClick(n *tree.Node) { switch n.WidgetType { case widget.Root: // THIS IS THE BEGINING OF THE LAYOUT @@ -17,32 +19,33 @@ func (n *node) doWidgetClick() { // rootNode.dumpTree(true) case widget.Window: // setCurrentWindow(w) - n.doUserEvent() + // n.doUserEvent() case widget.Tab: // setCurrentTab(w) case widget.Group: // n.placeWidgets() // n.toggleTree() case widget.Checkbox: - if widget.GetBool(n.value) { + if n.Bool() { // n.setCheckbox(false) } else { // n.setCheckbox(true) } - n.doUserEvent() + // n.doUserEvent() case widget.Grid: // rootNode.hideWidgets() // n.placeGrid() // n.showWidgets() case widget.Box: // n.showWidgetPlacement(logNow, "drawTree()") - if widget.GetBool(n.value) { - log.Log(NOW, "BOX IS HORIZONTAL", n.progname) + if n.Bool() { + log.Log(NOW, "BOX IS HORIZONTAL", n.GetProgName()) } else { - log.Log(NOW, "BOX IS VERTICAL", n.progname) + log.Log(NOW, "BOX IS VERTICAL", n.GetProgName()) } case widget.Button: - n.doUserEvent() + // n.doUserEvent() default: } } +*/ -- cgit v1.2.3