From f984dd3a9fe7cf319ea2f0837eb8d0fc2af37b70 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 5 Mar 2025 12:11:46 -0600 Subject: passes mouse clicks to gitpb --- structs.go | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) (limited to 'structs.go') diff --git a/structs.go b/structs.go index 704202e..128866d 100644 --- a/structs.go +++ b/structs.go @@ -25,27 +25,15 @@ import ( var me guiConfig -// Range(1, 10) includes the values 1 and 10 -// almost all toolkits use integers so there doesn't -// seem to be a good idea to use 'type any' here as it -// just makes things more complicated for no good reason -type RangeMovedToWidget struct { - Low int - High int -} - -// type List []string - type guiConfig struct { // a toolkit requirement. never allow more than one per program initOnce sync.Once - rootNode *Node // This is the master node. The Binary Tree starts here - widgets *guipb.Widgets // the protobuf. switch to this. deprecate rootNode - counter int // used to make unique WidgetId's - - // A node off of rootNode for passing debugging flags - // flag *Node + rootNode *Node // This is the master node. The Binary Tree starts here + tree *guipb.Tree // the protobuf. switch to this. deprecate rootNode + widgets *guipb.Widgets // don't use this I think + counter int // used to make unique WidgetId's + tables []*guipb.Tables // a list of active protobuf tables // sets the chan for the plugins to call back too guiChan chan widget.Action @@ -82,15 +70,18 @@ type guiConfig struct { */ +// TODO: MOVE MUCH OF THIS TO PROTOBUFS type Node struct { - widget *guipb.Widget // deprecate everything below and switch to this protobuf - id int // should be unique - hidden bool // don't update the toolkits when it's hidden - changed bool // do we need to inform the toolkit something changed? - enabled bool // if false, then the the user can't click on it - mu sync.Mutex - WidgetType widget.WidgetType - + widget *guipb.Widget // deprecate everything below and switch to this protobuf + id int // should be unique + hidden bool // don't update the toolkits when it's hidden + changed bool // do we need to inform the toolkit something changed? + enabled bool // if false, then the the user can't click on it + tablepb *guipb.Table // set in the parent if this is a tablepb + mu sync.Mutex // this is old and probably is wrong at this point + + // deprecate below here if possible + WidgetType widget.WidgetType // deprecate // most widgets need one value, this is current alue // value any defaultS string -- cgit v1.2.3