From a0c2b1caf03d0ed8b89de8402fcc14b003969e2c Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 20 Jan 2019 15:06:44 -0500 Subject: Implement the Container interface in lib/ui/ --- lib/ui/grid.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/ui/grid.go') diff --git a/lib/ui/grid.go b/lib/ui/grid.go index 3c375ee3..87b94bde 100644 --- a/lib/ui/grid.go +++ b/lib/ui/grid.go @@ -71,6 +71,14 @@ func (grid *Grid) Columns(spec []GridSpec) *Grid { return grid } +func (grid *Grid) Children() []Drawable { + children := make([]Drawable, len(grid.cells)) + for i, cell := range grid.cells { + children[i] = cell.Content + } + return children +} + func (grid *Grid) Draw(ctx *Context) { invalid := grid.invalid if invalid { -- cgit