So much work

This commit is contained in:
2025-08-06 16:15:08 -05:00
parent 1474caffaa
commit 81c7ec8324
20 changed files with 1386 additions and 376 deletions

View File

@@ -33,10 +33,11 @@ type Searcher struct {
id string
style tcell.Style
x, y int
w, h int
active bool
visible bool
x, y int
w, h int
active bool
visible bool
tabbable bool
title string
search *Field
@@ -77,6 +78,7 @@ func (w *Searcher) Init(id string, style tcell.Style) {
tcell.KeyPgDn: w.handleKeyPgDn,
tcell.KeyEnter: w.handleKeyEnter,
})
w.tabbable = true
}
func (w *Searcher) Id() string { return w.id }
@@ -222,13 +224,23 @@ func (w *Searcher) WantH() int {
return 2 + w.search.WantH() + len(w.filteredData) // Border + Field + Data
}
func (w *Searcher) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *Searcher) SetW(x int) { w.w = x }
func (w *Searcher) SetH(y int) { w.h = y }
func (w *Searcher) GetW() int { return w.w }
func (w *Searcher) GetH() int { return w.y }
func (w *Searcher) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *Searcher) Focusable() bool { return true }
func (w *Searcher) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *Searcher) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *Searcher) SetW(x int) { w.w = x }
func (w *Searcher) SetH(y int) { w.h = y }
func (w *Searcher) GetW() int { return w.w }
func (w *Searcher) GetH() int { return w.y }
func (w *Searcher) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *Searcher) Focusable() bool { return true }
func (w *Searcher) SetTabbable(b bool) { w.tabbable = b }
func (w *Searcher) Tabbable() bool { return w.tabbable }
func (w *Searcher) MinW() int {
return 2 + w.search.MinW()
}
func (w *Searcher) MinH() int {
return 2 + w.search.MinH() + 5
}
func (w *Searcher) SetHideOnSelect(t bool) { w.hideOnSelect = t }
func (w *Searcher) SetTitle(ttl string) { w.title = ttl }