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/tab.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/ui/tab.go') diff --git a/lib/ui/tab.go b/lib/ui/tab.go index 8f08978..ecd48eb 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -107,6 +107,14 @@ func (strip *TabStrip) OnInvalidate(onInvalidate func(d Drawable)) { strip.onInvalidateStrip = onInvalidate } +func (content *TabContent) Children() []Drawable { + children := make([]Drawable, len(content.Tabs)) + for i, tab := range content.Tabs { + children[i] = tab.Content + } + return children +} + func (content *TabContent) Draw(ctx *Context) { if content.Selected >= len(content.Tabs) { width := ctx.Width() -- cgit v1.2.3