summaryrefslogtreecommitdiff
path: root/toolkit/andlabs/common.go
blob: 5cfaaa5c9c0fcec2558c3e63cf491c4d22ba3a0d (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
package main

import (
	"git.wit.org/wit/gui/toolkit"
)

func (t *andlabsT) commonChange(tw *toolkit.Widget) {
	log(debugChange, "commonChange() START widget   =", t.tw.Name, t.tw.Type)
	if (tw == nil) {
		log(true, "commonChange() What the fuck. there is no widget t.tw == nil")
		return
	}
	if (tw.Custom == nil) {
		log(debugChange, "commonChange() END    Widget.Custom() = nil", t.tw.Name, t.tw.Type)
		return
	}
	tw.Custom()
	log(debugChange, "commonChange() END   Widget.Custom()", t.tw.Name, t.tw.Type)
}

func dump(p *toolkit.Widget, c *toolkit.Widget, b bool) {
	log(b, "Parent:")
	pt := mapToolkits[p]
	if (pt == nil) {
		log(b, "Trying to do something on a widget that doesn't work or doesn't exist or something", c)
		return
	}
	pt.Dump(b)

	log(b, "Child:")
	ct := mapToolkits[c]
	if (ct == nil) {
		log(b, "Trying to do something on a widget that doesn't work or doesn't exist or something", c)
		return
	}
	ct.Dump(b)
}