2022-10-17 22:39:03 -05:00
|
|
|
package gui
|
|
|
|
|
2023-03-01 11:35:36 -06:00
|
|
|
import (
|
|
|
|
"git.wit.org/wit/gui/toolkit"
|
|
|
|
)
|
|
|
|
|
2023-03-23 12:35:12 -05:00
|
|
|
// TODO: make a "Group" a "Grid" ?
|
|
|
|
// probably since right now group is just a
|
|
|
|
// pre-canned andlabs/ui gtk,macos,windows thing
|
2022-10-17 22:39:03 -05:00
|
|
|
func (n *Node) NewGroup(name string) *Node {
|
2022-11-13 08:53:03 -06:00
|
|
|
var newNode *Node
|
2023-04-08 11:06:50 -05:00
|
|
|
newNode = n.newNode(name, toolkit.Group, nil)
|
2023-03-23 12:35:12 -05:00
|
|
|
|
|
|
|
var a toolkit.Action
|
2023-03-29 23:03:04 -05:00
|
|
|
a.ActionType = toolkit.Add
|
2023-04-03 10:26:47 -05:00
|
|
|
a.Name = name
|
|
|
|
a.Text = name
|
2023-03-23 12:35:12 -05:00
|
|
|
newaction(&a, newNode, n)
|
|
|
|
|
|
|
|
newBox := newNode.NewBox("group vBox", false)
|
|
|
|
return newBox
|
2022-10-17 22:39:03 -05:00
|
|
|
}
|