diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-01-20 15:06:44 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-01-20 15:06:44 -0500 |
commit | a0c2b1caf03d0ed8b89de8402fcc14b003969e2c (patch) | |
tree | ef20eb601dcf9238b6d57aad7ae69e0f5c5d4d51 /lib/ui/tab.go | |
parent | 87fa305848a893b1c85472ea394f24486bd478b6 (diff) | |
download | aerc-a0c2b1caf03d0ed8b89de8402fcc14b003969e2c.tar.gz |
Implement the Container interface in lib/ui/
Diffstat (limited to 'lib/ui/tab.go')
-rw-r--r-- | lib/ui/tab.go | 8 |
1 files changed, 8 insertions, 0 deletions
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() |