summaryrefslogtreecommitdiff
path: root/toolkit/gocui
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-05-10 14:28:30 -0500
committerJeff Carr <[email protected]>2023-05-10 14:28:30 -0500
commit19e6ea76f3c09fe3a5d9a4d4caff7d14571f4ba5 (patch)
tree6e1c9e86c9a591d6b0a7ca686026d783de1d67ac /toolkit/gocui
parentcb0e8a7146c055b47f42d0a1005b93e08492e6ca (diff)
andlabs: debugging flags working againv0.8.6
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui')
-rw-r--r--toolkit/gocui/click.go2
-rw-r--r--toolkit/gocui/common.go2
-rw-r--r--toolkit/gocui/place.go2
-rw-r--r--toolkit/gocui/structs.go10
4 files changed, 12 insertions, 4 deletions
diff --git a/toolkit/gocui/click.go b/toolkit/gocui/click.go
index a4246a6..8802674 100644
--- a/toolkit/gocui/click.go
+++ b/toolkit/gocui/click.go
@@ -260,7 +260,7 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error {
if (found == nil) {
found = me.rootNode
}
- found.setRealSize()
+ // ? TODO: found.setRealSize()
me.ctrlDown.gocuiSize.w0 = found.startW
me.ctrlDown.gocuiSize.h0 = found.startH
me.ctrlDown.gocuiSize.w1 = me.ctrlDown.gocuiSize.w0 + found.realWidth
diff --git a/toolkit/gocui/common.go b/toolkit/gocui/common.go
index 94b63b1..325a556 100644
--- a/toolkit/gocui/common.go
+++ b/toolkit/gocui/common.go
@@ -15,10 +15,10 @@ func makeWidget(a *toolkit.Action) *cuiWidget {
w.b = a.B
w.i = a.I
w.s = a.S
+
w.X = a.X
w.Y = a.Y
-
t := len(w.text)
w.gocuiSize.w1 = w.gocuiSize.w0 + t + me.PadW
w.gocuiSize.h1 = w.gocuiSize.h0 + me.DefaultHeight + me.PadH
diff --git a/toolkit/gocui/place.go b/toolkit/gocui/place.go
index bcb273b..0919308 100644
--- a/toolkit/gocui/place.go
+++ b/toolkit/gocui/place.go
@@ -257,5 +257,7 @@ func (w *cuiWidget) placeGrid() {
w.showWidgetPlacement(logNow, "grid3:")
}
+/*
func (w *cuiWidget) setRealSize() {
}
+*/
diff --git a/toolkit/gocui/structs.go b/toolkit/gocui/structs.go
index b2a8b20..1fa6692 100644
--- a/toolkit/gocui/structs.go
+++ b/toolkit/gocui/structs.go
@@ -93,7 +93,7 @@ var (
// this is the standard binary tree structure for toolkits
type node struct {
- parent *node
+ parent *node
children []*node
WidgetId int // widget ID
@@ -115,6 +115,12 @@ type node struct {
X int
Y int
+ // This is for the grid size & widget position
+ W int
+ H int
+ AtW int
+ AtH int
+
// the internal plugin toolkit structure
tk *cuiWidget
}
@@ -199,7 +205,7 @@ type cuiWidget struct {
v *gocui.View
frame bool
- parent *cuiWidget
+ parent *cuiWidget
children []*cuiWidget
}