summaryrefslogtreecommitdiff
path: root/redo/basicctrls.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/basicctrls.go')
-rw-r--r--redo/basicctrls.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/redo/basicctrls.go b/redo/basicctrls.go
index a119fb8..f4f1297 100644
--- a/redo/basicctrls.go
+++ b/redo/basicctrls.go
@@ -63,6 +63,27 @@ func NewPasswordField() TextField {
return newPasswordField()
}
+// Tab is a Control that contains multiple pages of tabs, each containing a single Control.
+// You can add and remove tabs from the Tab at any time.
+//
+// [TODO if each tab of your Tab is going to have the same content Controls, then use LikeTab instead, to conserve resources]
+type Tab interface {
+ Control
+
+ // Append adds a new tab to Tab.
+ // The tab is added to the end of the current list of tabs.
+ Append(name string, control Control)
+
+ // Delete removes the given tab.
+ // It panics if index is out of range.
+// Delete(index int)
+//TODO
+}
+
+// NewTab creates a new Tab with no tabs.
+func NewTab() Tab {
+ return newTab()
+}
// Label is a Control that shows a static line of text.
// Label shows one line of text; any text that does not fit is truncated.