blob: 85afca145c869e6f49d4a0eabd20480d26ad0c93 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package gui
import (
"log"
// "fmt"
"github.com/andlabs/ui"
_ "github.com/andlabs/ui/winmanifest"
)
// import toolkit "git.wit.org/wit/gui/toolkit/andlabs"
func (n *Node) AddTabRaw(title string, uiC ui.Control) *Node {
log.Println("gui.Node.AddTabRaw()")
tab := n.uiTab
if (tab == nil) {
log.Println("gui.Node.AddTabRaw() FAIL tab == nil")
return n
}
if (uiC == nil) {
// hbox := ui.NewHorizontalBox()
// hbox.SetPadded(true)
// uiC = hbox
log.Println("gui.Node.AddTabRaw() FAIL *ui.Control == nil")
return n
}
tab.Append(title, uiC)
/*
newNode := parent.makeNode(title, 555, 600 + Config.counter)
newNode.uiTab = tab
newNode.uiBox = uiC
// panic("gui.AddTab() after makeNode()")
tabSetMargined(newNode.uiTab)
*/
return n
}
|