diff options
| author | Jeff Carr <[email protected]> | 2025-03-05 12:11:46 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-05 12:42:50 -0600 |
| commit | f984dd3a9fe7cf319ea2f0837eb8d0fc2af37b70 (patch) | |
| tree | feeded637a6ab8ab6ceda7a53fa79d783bb0ea8c /structs.go | |
| parent | e93d9586929b5ac50628180b45e010bf898ec7bb (diff) | |
passes mouse clicks to gitpb
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 39 |
1 files changed, 15 insertions, 24 deletions
@@ -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 |
