Add SetStyle Function

This commit is contained in:
2026-01-23 09:36:43 -06:00
parent d442b7d6a8
commit c1296b1dc1
31 changed files with 425 additions and 392 deletions

View File

@@ -139,25 +139,26 @@ func (w *AbsoluteLayout) Draw(screen tcell.Screen) {
}
}
func (w *AbsoluteLayout) Active() bool { return w.active }
func (w *AbsoluteLayout) SetActive(a bool) { w.active = a }
func (w *AbsoluteLayout) Visible() bool { return w.visible }
func (w *AbsoluteLayout) SetVisible(a bool) { w.visible = a }
func (w *AbsoluteLayout) Focusable() bool { return w.focusable }
func (w *AbsoluteLayout) SetFocusable(b bool) { w.focusable = b }
func (w *AbsoluteLayout) SetX(x int) { w.x = x }
func (w *AbsoluteLayout) SetY(y int) { w.y = y }
func (w *AbsoluteLayout) GetX() int { return w.x }
func (w *AbsoluteLayout) GetY() int { return w.y }
func (w *AbsoluteLayout) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *AbsoluteLayout) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *AbsoluteLayout) GetW() int { return w.w }
func (w *AbsoluteLayout) GetH() int { return w.h }
func (w *AbsoluteLayout) SetW(wd int) { w.w = wd }
func (w *AbsoluteLayout) SetH(h int) { w.h = h }
func (w *AbsoluteLayout) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *AbsoluteLayout) WantW() int { return w.w }
func (w *AbsoluteLayout) WantH() int { return w.h }
func (w *AbsoluteLayout) SetStyle(s tcell.Style) { w.style = s }
func (w *AbsoluteLayout) Active() bool { return w.active }
func (w *AbsoluteLayout) SetActive(a bool) { w.active = a }
func (w *AbsoluteLayout) Visible() bool { return w.visible }
func (w *AbsoluteLayout) SetVisible(a bool) { w.visible = a }
func (w *AbsoluteLayout) Focusable() bool { return w.focusable }
func (w *AbsoluteLayout) SetFocusable(b bool) { w.focusable = b }
func (w *AbsoluteLayout) SetX(x int) { w.x = x }
func (w *AbsoluteLayout) SetY(y int) { w.y = y }
func (w *AbsoluteLayout) GetX() int { return w.x }
func (w *AbsoluteLayout) GetY() int { return w.y }
func (w *AbsoluteLayout) GetPos() Coord { return Coord{X: w.x, Y: w.y} }
func (w *AbsoluteLayout) SetPos(c Coord) { w.x, w.y = c.X, c.Y }
func (w *AbsoluteLayout) GetW() int { return w.w }
func (w *AbsoluteLayout) GetH() int { return w.h }
func (w *AbsoluteLayout) SetW(wd int) { w.w = wd }
func (w *AbsoluteLayout) SetH(h int) { w.h = h }
func (w *AbsoluteLayout) SetSize(c Coord) { w.w, w.h = c.X, c.Y }
func (w *AbsoluteLayout) WantW() int { return w.w }
func (w *AbsoluteLayout) WantH() int { return w.h }
func (w *AbsoluteLayout) MinW() int {
// Find the highest value for x in all widgets GetX() + MinW()
var minW int