start passing guipb.Widget

This commit is contained in:
Jeff Carr 2025-03-05 20:14:40 -06:00
parent 6e9ac22c12
commit d3832dc7bb
1 changed files with 8 additions and 8 deletions

View File

@ -12,22 +12,22 @@ package guipb
import "go.wit.com/log"
func (pb *Tables) Custom(id int) {
log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", id)
func (pb *Tables) Custom(w *Widget) {
log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", w)
if mycustom != nil {
mycustom(id)
mycustom(w)
}
}
func (pb *Table) Custom(id int) {
log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", id)
func (pb *Table) Custom(w *Widget) {
log.Info("got to guipb.Custom() for pb", pb.GetUuid(), "widget id", w)
if mycustom != nil {
mycustom(id)
mycustom(w)
}
}
var mycustom func(int)
var mycustom func(*Widget)
func (pb *Table) RegisterCustom(f func(int)) {
func (pb *Table) RegisterCustom(f func(*Widget)) {
mycustom = f
}