about summary refs log tree commit diff stats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index a0e356a..a9be47e 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -283,6 +283,14 @@ func (aerc *Aerc) SelectedTab() ui.Drawable {
 	return aerc.tabs.Tabs[aerc.tabs.Selected].Content
 }
 
+func (aerc *Aerc) SelectedTabIndex() int {
+	return aerc.tabs.Selected
+}
+
+func (aerc *Aerc) NumTabs() int {
+	return len(aerc.tabs.Tabs)
+}
+
 func (aerc *Aerc) NewTab(clickable ui.Drawable, name string) *ui.Tab {
 	tab := aerc.tabs.Add(clickable, name)
 	aerc.tabs.Select(len(aerc.tabs.Tabs) - 1)
@@ -297,6 +305,10 @@ func (aerc *Aerc) ReplaceTab(tabSrc ui.Drawable, tabTarget ui.Drawable, name str
 	aerc.tabs.Replace(tabSrc, tabTarget, name)
 }
 
+func (aerc *Aerc) MoveTab(i int) {
+	aerc.tabs.MoveTab(i)
+}
+
 func (aerc *Aerc) NextTab() {
 	aerc.tabs.NextTab()
 }