2022-11-14 14:30:28 -06:00
|
|
|
package main
|
2022-10-21 11:40:08 -05:00
|
|
|
|
2023-03-01 11:35:36 -06:00
|
|
|
import (
|
|
|
|
"git.wit.org/wit/gui/toolkit"
|
|
|
|
)
|
|
|
|
|
2023-03-03 14:41:38 -06:00
|
|
|
func (t *andlabsT) commonChange(tw *toolkit.Widget) {
|
2023-03-23 12:35:12 -05:00
|
|
|
log(debugChange, "commonChange() START widget =", t.tw.Name, t.tw.Type)
|
2023-03-01 11:35:36 -06:00
|
|
|
if (tw == nil) {
|
|
|
|
log(true, "commonChange() What the fuck. there is no widget t.tw == nil")
|
2023-02-25 14:05:25 -06:00
|
|
|
return
|
|
|
|
}
|
2023-03-01 11:35:36 -06:00
|
|
|
if (tw.Custom == nil) {
|
|
|
|
log(debugChange, "commonChange() END Widget.Custom() = nil", t.tw.Name, t.tw.Type)
|
2023-02-25 14:05:25 -06:00
|
|
|
return
|
|
|
|
}
|
2023-03-01 11:35:36 -06:00
|
|
|
tw.Custom()
|
|
|
|
log(debugChange, "commonChange() END Widget.Custom()", t.tw.Name, t.tw.Type)
|
2022-10-21 11:40:08 -05:00
|
|
|
}
|
|
|
|
|
2023-03-03 14:41:38 -06:00
|
|
|
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)
|
|
|
|
}
|