summaryrefslogtreecommitdiff
path: root/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-19 06:54:36 -0600
committerJeff Carr <[email protected]>2025-02-19 17:39:45 -0600
commitad34230d670a24840a3da54db319d9dd4b0d2479 (patch)
treeb77547a391265569ac9c6a568c98cc837fbf6d8a /structs.go
parent57b6efd8315bdb9df1a87439733c83757d993235 (diff)
Diffstat (limited to 'structs.go')
-rw-r--r--structs.go68
1 files changed, 35 insertions, 33 deletions
diff --git a/structs.go b/structs.go
index 45f7c0e..53449b9 100644
--- a/structs.go
+++ b/structs.go
@@ -21,6 +21,7 @@ import (
"go.wit.com/lib/protobuf/guipb"
log "go.wit.com/log"
"go.wit.com/toolkits/tree"
+ "go.wit.com/widget"
)
var initOnce sync.Once // run initPlugin() only once
@@ -182,39 +183,40 @@ type colorT struct {
}
type guiWidget struct {
- v *gocui.View // this is nil if the widget is not displayed
- cuiName string // what gocui uses to reference the widget (usually "TK <widgetId>"
- parent *guiWidget // mirrors the binary node tree
- children []*guiWidget // mirrors the binary node tree
- node *tree.Node // the pointer back to the tree
- pb *guipb.Widget // the guipb Widget
- windowFrame *guiWidget // this is the frame for a window widget
- internal bool // indicates the widget is internal to gocui and should be treated differently
- hasTabs bool // does the window have tabs?
- currentTab bool // the visible tab
- window window // holds information specific only to Window widgets
- value string // ?
- checked bool // ?
- labelN string // the actual text to display in the console
- vals []string // dropdown menu items
- enable bool // ?
- gocuiSize rectType // should mirror the real display size. todo: verify these are accurate. they are not yet
- full rectType // full size of children (used by widget.Window, etc)
- force rectType // force widget within these boundries (using this to debug window dragging)
- startW int // ?
- startH int // ?
- lastW int // used during mouse dragging
- lastH int // used during mouse dragging
- isFake bool // widget types like 'box' are 'false'
- widths map[int]int // how tall each row in the grid is
- heights map[int]int // how wide each column in the grid is
- tainted bool // ?
- frame bool // ?
- selectedTab *tree.Node // for a window, this is currently selected tab
- color *colorT // what color to use
- colorLast colorT // the last color the widget had
- defaultColor *colorT // the default colors // TODO: make a function for this instead
- isBG bool // means this is the background widget. There is only one of these
+ v *gocui.View // this is nil if the widget is not displayed
+ cuiName string // what gocui uses to reference the widget (usually "TK <widgetId>"
+ parent *guiWidget // mirrors the binary node tree
+ children []*guiWidget // mirrors the binary node tree
+ node *tree.Node // the pointer back to the tree
+ pb *guipb.Widget // the guipb Widget
+ wtype widget.WidgetType // used for Tables for now. todo: fix this correctly
+ windowFrame *guiWidget // this is the frame for a window widget
+ internal bool // indicates the widget is internal to gocui and should be treated differently
+ hasTabs bool // does the window have tabs?
+ currentTab bool // the visible tab
+ window window // holds information specific only to Window widgets
+ value string // ?
+ checked bool // ?
+ labelN string // the actual text to display in the console
+ vals []string // dropdown menu items
+ enable bool // ?
+ gocuiSize rectType // should mirror the real display size. todo: verify these are accurate. they are not yet
+ full rectType // full size of children (used by widget.Window, etc)
+ force rectType // force widget within these boundries (using this to debug window dragging)
+ startW int // ?
+ startH int // ?
+ lastW int // used during mouse dragging
+ lastH int // used during mouse dragging
+ isFake bool // widget types like 'box' are 'false'
+ widths map[int]int // how tall each row in the grid is
+ heights map[int]int // how wide each column in the grid is
+ tainted bool // ?
+ frame bool // ?
+ selectedTab *tree.Node // for a window, this is currently selected tab
+ color *colorT // what color to use
+ colorLast colorT // the last color the widget had
+ defaultColor *colorT // the default colors // TODO: make a function for this instead
+ isBG bool // means this is the background widget. There is only one of these
}
// THIS IS GO COMPILER MAGIC