summaryrefslogtreecommitdiff
path: root/toolkit/gocui/place.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-06 06:01:14 -0500
committerJeff Carr <[email protected]>2023-04-06 06:01:14 -0500
commit8e080579f3e4ba6927f2a35f8c5c87672d6ce290 (patch)
treeb35eca36659fecd39c793b063c0f249f9f8f1878 /toolkit/gocui/place.go
parent47bf784b59f922ef7446763bc3ac58f8c5bb4d02 (diff)
gocui: next step hide junk
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/place.go')
-rw-r--r--toolkit/gocui/place.go50
1 files changed, 3 insertions, 47 deletions
diff --git a/toolkit/gocui/place.go b/toolkit/gocui/place.go
index c6923b2..56ef281 100644
--- a/toolkit/gocui/place.go
+++ b/toolkit/gocui/place.go
@@ -5,33 +5,9 @@ import (
"git.wit.org/wit/gui/toolkit"
)
-var fakeStartWidth int = 40
-var fakeStartHeight int = 3
-func (w *cuiWidget) setFake() {
- if (w.isFake == false) {
- return
- }
- t := len(w.name)
- // setup fake labels for non-visable things off screen
- w.realWidth = t + 2
- w.realHeight = me.defaultHeight
-
- w.gocuiSize.width = t + 2
- w.gocuiSize.height = me.defaultHeight
- w.gocuiSize.startW = fakeStartWidth
- w.gocuiSize.startH = fakeStartHeight
-
- fakeStartHeight += 3
- if (fakeStartHeight > 24) {
- fakeStartHeight = 3
- fakeStartWidth += 20
- }
- w.setWH()
- w.showWidgetPlacement(logNow, "setFake()")
-}
-
+/*
// find the start (w,h) for child a inside a box widget
-func (w *cuiWidget) getBoxWH() {
+func (w *cuiWidget) setBoxWH() {
p := w.parent // the parent must be a box widget
// update parent gocuiSize
@@ -63,6 +39,7 @@ func (w *cuiWidget) getBoxWH() {
}
return
}
+*/
// find the start (w,h) for child a inside a Group widget
func (w *cuiWidget) getGroupWH() {
@@ -205,27 +182,6 @@ func (w *cuiWidget) moveTo(leftW int, topH int) {
w.showWidgetPlacement(logNow, "moveTo()")
}
-/*
-func (w *cuiWidget) updateLogicalSizes() {
- for _, child := range w.children {
- // if (w.isReal)
- child.updateLogicalSizes()
- if (w.logicalSize.w0 > child.logicalSize.w0) {
- w.logicalSize.w0 = child.logicalSize.w0
- }
- if (w.logicalSize.w1 < child.logicalSize.w1) {
- w.logicalSize.w1 = child.logicalSize.w1
- }
- if (w.logicalSize.h0 > child.logicalSize.h0) {
- w.logicalSize.h0 = child.logicalSize.h0
- }
- if (w.logicalSize.h1 < child.logicalSize.h1) {
- w.logicalSize.h1 = child.logicalSize.h1
- }
- }
-}
-*/
-
func (w *cuiWidget) drawGrid() {
w.showWidgetPlacement(logNow, "gridBounds:")