Changed 'Tabbable/Focusable' logic to use Active

This commit is contained in:
2026-02-02 13:29:51 -06:00
parent 62ef3b5d44
commit 16a92c8f99
30 changed files with 377 additions and 322 deletions

View File

@@ -187,22 +187,25 @@ func (w *SimpleList) Draw(screen tcell.Screen) {
func (w *SimpleList) SetStyle(s tcell.Style) { w.style = s }
func (w *SimpleList) Active() bool { return w.active }
func (w *SimpleList) SetActive(a bool) { w.active = a }
func (w *SimpleList) Visible() bool { return w.visible }
func (w *SimpleList) SetVisible(a bool) { w.visible = a }
func (w *SimpleList) SetX(x int) { w.x = x }
func (w *SimpleList) SetY(y int) { w.y = y }
func (w *SimpleList) GetX() int { return w.x }
func (w *SimpleList) GetY() int { return w.y }
func (w *SimpleList) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *SimpleList) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *SimpleList) SetW(x int) { w.w = x }
func (w *SimpleList) SetH(y int) { w.h = y }
func (w *SimpleList) GetW() int { return w.w }
func (w *SimpleList) GetH() int { return w.y }
func (w *SimpleList) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *SimpleList) Focusable() bool { return w.focusable }
func (w *SimpleList) SetFocusable(b bool) { w.focusable = b }
func (w *SimpleList) SetActive(a bool) bool {
w.active = a
return w.active
}
func (w *SimpleList) Visible() bool { return w.visible }
func (w *SimpleList) SetVisible(a bool) { w.visible = a }
func (w *SimpleList) SetX(x int) { w.x = x }
func (w *SimpleList) SetY(y int) { w.y = y }
func (w *SimpleList) GetX() int { return w.x }
func (w *SimpleList) GetY() int { return w.y }
func (w *SimpleList) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *SimpleList) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *SimpleList) SetW(x int) { w.w = x }
func (w *SimpleList) SetH(y int) { w.h = y }
func (w *SimpleList) GetW() int { return w.w }
func (w *SimpleList) GetH() int { return w.y }
func (w *SimpleList) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *SimpleList) Focusable() bool { return w.focusable }
func (w *SimpleList) SetFocusable(b bool) { w.focusable = b }
func (w *SimpleList) WantW() int {
lng := wh.Longest(w.list)
if len(w.border) > 0 {