2022-11-14 14:30:28 -06:00
|
|
|
package main
|
2022-10-17 22:39:03 -05:00
|
|
|
|
2022-11-14 14:30:28 -06:00
|
|
|
import (
|
|
|
|
"github.com/andlabs/ui"
|
|
|
|
_ "github.com/andlabs/ui/winmanifest"
|
|
|
|
)
|
|
|
|
|
2023-04-27 09:47:31 -05:00
|
|
|
func (p *node) newGroup(n *node) {
|
|
|
|
log(debugToolkit, "NewGroup()", n.Name)
|
2022-11-14 14:30:28 -06:00
|
|
|
|
2023-04-27 09:47:31 -05:00
|
|
|
t := p.tk
|
2022-11-14 14:30:28 -06:00
|
|
|
if (t == nil) {
|
2023-04-27 09:47:31 -05:00
|
|
|
log(debugToolkit, "NewGroup() toolkit struct == nil. name=", n.Name)
|
2023-03-01 11:35:36 -06:00
|
|
|
listMap(debugToolkit)
|
2022-11-14 14:30:28 -06:00
|
|
|
}
|
2023-04-27 09:47:31 -05:00
|
|
|
newt := t.rawGroup(n.Name)
|
|
|
|
n.tk = newt
|
|
|
|
p.place(n)
|
2022-11-14 14:30:28 -06:00
|
|
|
}
|
2022-10-17 22:39:03 -05:00
|
|
|
|
|
|
|
// make new Group here
|
2023-03-03 14:41:38 -06:00
|
|
|
func (t *andlabsT) rawGroup(title string) *andlabsT {
|
2022-11-14 14:30:28 -06:00
|
|
|
var newt andlabsT
|
2023-03-03 14:41:38 -06:00
|
|
|
newt.Name = title
|
2022-10-19 13:23:22 -05:00
|
|
|
|
2023-03-03 14:41:38 -06:00
|
|
|
log(debugToolkit, "NewGroup() create", newt.Name)
|
2023-02-25 14:05:25 -06:00
|
|
|
|
2023-03-03 14:41:38 -06:00
|
|
|
g := ui.NewGroup(newt.Name)
|
2022-10-21 11:40:08 -05:00
|
|
|
g.SetMargined(margin)
|
2023-03-03 14:41:38 -06:00
|
|
|
newt.uiGroup = g
|
2023-03-23 12:35:12 -05:00
|
|
|
newt.uiControl = g
|
2022-11-06 12:59:24 -06:00
|
|
|
|
2022-10-19 13:23:22 -05:00
|
|
|
return &newt
|
2022-10-17 22:39:03 -05:00
|
|
|
}
|