2024-02-02 14:49:17 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"go.wit.com/widget"
|
|
|
|
)
|
|
|
|
|
2024-02-05 03:19:08 -06:00
|
|
|
// re-draws the buttons for each of the windows
|
2024-02-02 14:49:17 -06:00
|
|
|
func (w *guiWidget) redoWindows(nextW int, nextH int) {
|
|
|
|
var startW int = nextW
|
|
|
|
var startH int = nextH
|
|
|
|
|
|
|
|
for _, child := range w.children {
|
|
|
|
if child.node.WidgetType != widget.Window {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
child.frame = false
|
|
|
|
child.hasTabs = false
|
|
|
|
|
|
|
|
child.gocuiSetWH(nextW, nextH)
|
2024-02-05 03:05:37 -06:00
|
|
|
child.Hide()
|
|
|
|
|
2024-02-05 03:19:08 -06:00
|
|
|
child.drawView()
|
2024-02-02 14:49:17 -06:00
|
|
|
sizeW := child.gocuiSize.Width()
|
|
|
|
nextW += sizeW + 4
|
|
|
|
child.redoWindows(startW+3, startH+2)
|
|
|
|
}
|
|
|
|
}
|