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

import (
)

// This function should make a new node with the parent and
// the 'tab' as a child

func (n *Node) NewTab(text string) *Node {
	newNode := n.New(text, "Tab")

	for _, aplug := range allPlugins {
		log(debugGui, "gui.NewTab() aplug =", aplug.name, "name =", newNode.Widget.Name)
		if (aplug.NewTab == nil) {
			log(debugGui, "\tgui.NewTab() aplug.NewTab = nil", aplug.name)
			continue
		}
		aplug.NewTab(&n.Widget, &newNode.Widget)
	}

	return newNode
}