2024-01-01 16:11:54 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-01-17 21:31:49 -06:00
|
|
|
"go.wit.com/gui/toolkits/tree"
|
|
|
|
|
2024-01-15 16:11:40 -06:00
|
|
|
"go.wit.com/dev/andlabs/ui"
|
|
|
|
_ "go.wit.com/dev/andlabs/ui/winmanifest"
|
2024-01-01 16:11:54 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
// Grid numbering by (X,Y)
|
|
|
|
// -----------------------------
|
|
|
|
// -- (1,1) -- (2,1) -- (3,1) --
|
|
|
|
// -- (1,2) -- (2,1) -- (3,1) --
|
|
|
|
// -----------------------------
|
2024-01-17 21:31:49 -06:00
|
|
|
func newGrid(n *tree.Node) {
|
|
|
|
if notNew(n) { return }
|
2024-01-01 16:11:54 -06:00
|
|
|
var newt *guiWidget
|
|
|
|
newt = new(guiWidget)
|
|
|
|
|
|
|
|
c := ui.NewGrid()
|
|
|
|
newt.uiGrid = c
|
|
|
|
newt.uiControl = c
|
2024-01-15 16:11:40 -06:00
|
|
|
c.SetPadded(true)
|
2024-01-01 16:11:54 -06:00
|
|
|
|
2024-01-17 21:31:49 -06:00
|
|
|
n.TK = newt
|
|
|
|
place(n.Parent, n)
|
2024-01-01 16:11:54 -06:00
|
|
|
}
|