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

@@ -78,22 +78,25 @@ func (w *BufferWidget) Draw(screen tcell.Screen) { w.buffer.Draw(w.x, w.y,
func (w *BufferWidget) SetStyle(s tcell.Style) { w.style = s }
func (w *BufferWidget) Active() bool { return w.active }
func (w *BufferWidget) SetActive(a bool) { w.active = a }
func (w *BufferWidget) Visible() bool { return w.visible }
func (w *BufferWidget) SetVisible(a bool) { w.visible = a }
func (w *BufferWidget) Focusable() bool { return w.focusable }
func (w *BufferWidget) SetFocusable(b bool) { w.focusable = b }
func (w *BufferWidget) SetX(x int) { w.x = x }
func (w *BufferWidget) SetY(y int) { w.y = y }
func (w *BufferWidget) GetX() int { return w.x }
func (w *BufferWidget) GetY() int { return w.y }
func (w *BufferWidget) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *BufferWidget) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *BufferWidget) GetW() int { return w.buffer.Width() }
func (w *BufferWidget) GetH() int { return w.buffer.Height() }
func (w *BufferWidget) SetW(wd int) { w.w = wd }
func (w *BufferWidget) SetH(h int) { w.h = h }
func (w *BufferWidget) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *BufferWidget) SetActive(a bool) bool {
w.active = a
return w.active
}
func (w *BufferWidget) Visible() bool { return w.visible }
func (w *BufferWidget) SetVisible(a bool) { w.visible = a }
func (w *BufferWidget) Focusable() bool { return w.focusable }
func (w *BufferWidget) SetFocusable(b bool) { w.focusable = b }
func (w *BufferWidget) SetX(x int) { w.x = x }
func (w *BufferWidget) SetY(y int) { w.y = y }
func (w *BufferWidget) GetX() int { return w.x }
func (w *BufferWidget) GetY() int { return w.y }
func (w *BufferWidget) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *BufferWidget) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *BufferWidget) GetW() int { return w.buffer.Width() }
func (w *BufferWidget) GetH() int { return w.buffer.Height() }
func (w *BufferWidget) SetW(wd int) { w.w = wd }
func (w *BufferWidget) SetH(h int) { w.h = h }
func (w *BufferWidget) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *BufferWidget) WantW() int { return w.buffer.Width() }
func (w *BufferWidget) WantH() int { return w.buffer.Height() }