feat(tracker): add a preset explorer with search and filters

Closes #91
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-10-15 12:19:25 +03:00
parent 3f365707c2
commit 2336a135c6
128 changed files with 1147 additions and 405 deletions

View File

@ -8,6 +8,9 @@ import (
)
type TagYieldFunc func(level int, tag event.Tag) bool
type Tagged interface {
Tags(level int, yield TagYieldFunc) bool
}
// FocusNext navigates to the next focusable tag in the tracker. If stepInto is
// true, it will focus the next tag regardless of its depth; otherwise it will
@ -77,3 +80,12 @@ func (t *Tracker) findFocusedLevel(gtx C) (level int, ok bool) {
})
return level, ok
}
func firstTag(t Tagged) (tag event.Tag, ok bool) {
t.Tags(0, func(level int, t event.Tag) bool {
tag = t
ok = true
return false
})
return tag, ok
}