summaryrefslogtreecommitdiff
path: root/group.go
blob: a0fbe60a76dbef93a7a5d4da12dcd85c2ba66e39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package gui

import "log"

// TODO: which name is better. AddGroup or NewGroup ?
// first reaction is NewGroup
func (n *Node) NewGroup(name string) *Node {
	var newNode *Node

	if (GetDebug()) {
		log.Println("toolkit.NewGroup() START", name)
	}

	newNode = n.New(name)

	log.Println("gui.Node.NewGroup()", name)
	for _, aplug := range allPlugins {
		log.Println("gui.Node.NewGroup() toolkit plugin =", aplug.name)
		if (aplug.NewGroup == nil) {
			continue
		}
		aplug.NewGroup(&n.Widget, &newNode.Widget)
	}

	return newNode
}