A lot of layout work

This commit is contained in:
2025-08-12 11:21:48 -05:00
parent b476c74683
commit 0c6f212e18
27 changed files with 739 additions and 270 deletions

View File

@@ -33,7 +33,6 @@ type Widget interface {
HandleKey(*tcell.EventKey) bool
HandleTime(*tcell.EventTime)
Draw(tcell.Screen)
DrawOffset(Coord, tcell.Screen)
Active() bool
SetActive(bool)
Visible() bool
@@ -73,21 +72,6 @@ func WidgetRight(w Widget) int {
return w.GetX() + w.GetW()
}
type Coord struct {
X, Y int
}
func (p *Coord) Add(o Coord) Coord {
return Coord{
X: p.X + o.X,
Y: p.Y + o.Y,
}
}
func (p *Coord) ResizeEvent() *tcell.EventResize {
return tcell.NewEventResize(p.X, p.Y)
}
// To validate that a struct satisfies this interface, you can do:
// var _ Widget - (*<struct>)(nil)
// where <struct> is the actual struct that you're validating.