From dcce32583387be7fc4f6cd8c8dea62fd7dc42ecf Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 15 Dec 2023 17:18:48 -0600 Subject: make a common.go for the toolkits Signed-off-by: Jeff Carr --- toolkit/andlabs/structs.go | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'toolkit/andlabs/structs.go') diff --git a/toolkit/andlabs/structs.go b/toolkit/andlabs/structs.go index 507a50c..c5f94ee 100644 --- a/toolkit/andlabs/structs.go +++ b/toolkit/andlabs/structs.go @@ -1,14 +1,22 @@ package main -import "git.wit.org/wit/gui/toolkit" +// import "git.wit.org/wit/gui/toolkit" import "github.com/andlabs/ui" import _ "github.com/andlabs/ui/winmanifest" // var andlabs map[int]*andlabsT // var callback func(int) bool -var callback chan toolkit.Action +// var callback chan toolkit.Action +// It's probably a terrible idea to call this 'me' +var me config + +type config struct { + rootNode *node // the base of the binary tree. it should have id == 0 +} + +/* type node struct { parent *node children []*node @@ -41,15 +49,16 @@ type node struct { // the internal plugin toolkit structure tk *andlabsT } +*/ // stores the raw toolkit internals -type andlabsT struct { +type guiWidget struct { Width int Height int // tw *toolkit.Widget - parent *andlabsT - children []*andlabsT + parent *guiWidget + children []*guiWidget // used to track if a tab has a child widget yet child bool -- cgit v1.2.3