diff options
| author | Jeff Carr <[email protected]> | 2024-01-17 23:54:19 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-17 23:54:19 -0600 |
| commit | b25f15ea7803e172204432082740d081e5f19f81 (patch) | |
| tree | 025146f42287e7b5d91850366f7fccf49d8ced9b /common.go | |
the golang way. everything in it's own repov0.0.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/common.go b/common.go new file mode 100644 index 0000000..ea981a9 --- /dev/null +++ b/common.go @@ -0,0 +1,61 @@ +package main + +import ( + "go.wit.com/lib/widget" +) + +type node struct { + parent *node + children []*node + + WidgetId int // widget ID + WidgetType widget.WidgetType + ParentId int // parent ID + + state widget.State + + // a reference name for programming and debuggign. Must be unique + progname string + + // the text used for button labesl, window titles, checkbox names, etc + label string + + // horizontal means layout widgets like books on a bookshelf + // vertical means layout widgets like books in a stack + // direction widget.Orientation + direction widget.Orientation + + // This is how the values are passed back and forth + // values from things like checkboxes & dropdown's + value any + + strings []string + + // This is used for things like a slider(0,100) + X int + Y int + + // This is for the grid size & widget position + W int + H int + AtW int + AtH int + + vals []string // dropdown menu items + + // horizontal bool `default:false` + + hasTabs bool // does the window have tabs? + currentTab bool // the visible tab + + // the internal plugin toolkit structure + // in the gtk plugin, it has gtk things like margin & border settings + // in the text console one, it has text console things like colors for menus & buttons + tk *guiWidget +} + +/* +func (n *node) doUserEvent() { + log.Log(ERROR, "doUserEvent() ERROR") +} +*/ |
