summaryrefslogtreecommitdiff
path: root/toolkit/gocui/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-05 13:06:42 -0500
committerJeff Carr <[email protected]>2023-04-05 13:06:42 -0500
commit29efacf6f60d92231381699bc27d44d515a4063c (patch)
tree4116b76bb7c2dc300cb93f92ec2ea66d57eeccf0 /toolkit/gocui/structs.go
parent693a6f4398604e9932d714d24adc5c12472e750b (diff)
gocui: rework spacing logic
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/structs.go')
-rw-r--r--toolkit/gocui/structs.go25
1 files changed, 15 insertions, 10 deletions
diff --git a/toolkit/gocui/structs.go b/toolkit/gocui/structs.go
index b4a2ab6..6ab77cf 100644
--- a/toolkit/gocui/structs.go
+++ b/toolkit/gocui/structs.go
@@ -87,20 +87,29 @@ type cuiWidget struct {
vals []string // dropdown menu options
- visable bool // track if it's currently supposed to be shown
+ // visable bool // track if it's currently supposed to be shown
isFake bool // widget types like 'box' are 'false'
- realWidth int // the real width
- realHeight int // the real height
+
+ // where the widget should calculate it's existance from
+ startW int
+ startH int
+
+ // the widget size to reserve or things will overlap
+ realWidth int
+ realHeight int
+
realSize rectType // the display size of this widget
logicalSize rectType // the logical size. Includes all the child widgets
// used to track the size of grids
- logicalW map[int]int // how tall each row in the grid is
- logicalH map[int]int // how wide each column in the grid is
- // where in the parent grid this widget should go
+ widths map[int]int // how tall each row in the grid is
+ heights map[int]int // how wide each column in the grid is
+
+ // deprecate // where in the parent grid this widget should go
parentW int
parentH int
+ // deprecate
nextW int
nextH int
@@ -113,10 +122,6 @@ type cuiWidget struct {
width int
height int
- //deprecate
-// nextX int
-// nextY int
-
// horizontal=true means layout widgets like books on a bookshelf
// horizontal=false means layout widgets like books in a stack
horizontal bool `default:false`