From 6f91f5e080e06cdc0f34b13d23e5fd16ea37259a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 24 Mar 2023 20:14:18 -0500 Subject: starting to try safe chan and goroutines fix tab title's right before attempting to add chan goroutines removed "where" widget pointer box added to tab experiement with log as it's own repo Signed-off-by: Jeff Carr --- toolkit/widget.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'toolkit/widget.go') diff --git a/toolkit/widget.go b/toolkit/widget.go index 450cd8b..339690e 100644 --- a/toolkit/widget.go +++ b/toolkit/widget.go @@ -18,7 +18,6 @@ type ActionType int // Could a protobuf be used here? (Can functions be passed?) type Widget struct { Name string - // Action string // "New", "Delete", "Set", aka something to do Type WidgetType // This function is how you interact with the toolkit @@ -57,14 +56,17 @@ type Widget struct { type Action struct { Type ActionType + ActionT ActionType + WidgetT WidgetType + + WidgetId int + WhereId int + Title string // this should be the widget // if the action is New, Hide, Enable, etc Widget *Widget - - // this is the widget - // where the other one should be put on New, Move, etc - Where *Widget + Callback func(int) // This is how the values are passed back and forth // values from things like checkboxes & dropdown's -- cgit v1.2.3