summaryrefslogtreecommitdiff
path: root/redo/controls.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-26 06:43:59 -0400
committerPietro Gagliardi <[email protected]>2014-07-26 06:43:59 -0400
commit52e75e6ccea69025eb807c82beec700f827b7dba (patch)
tree83b29ad32c56f1bf1c2eea1d47243711664fed14 /redo/controls.go
parent3db16ffcf68014e82cbdcfd4c515ed7af557f6dc (diff)
Renamed LineEdit to TextField.
Diffstat (limited to 'redo/controls.go')
-rw-r--r--redo/controls.go17
1 files changed, 12 insertions, 5 deletions
diff --git a/redo/controls.go b/redo/controls.go
index cf94339..f047e7f 100644
--- a/redo/controls.go
+++ b/redo/controls.go
@@ -53,16 +53,23 @@ func NewCheckbox(text string) Checkbox {
return newCheckbox(text)
}
-// LineEdit blah blah blah TODO write this
-// TODO change name
-type LineEdit interface {
+// TextField is a Control in which the user can enter a single line of text.
+type TextField interface {
Control
// TODO figure out what events are appropriate
- // Text and SetText are Requests that get and set the Checkbox's label text.
+ // Text and SetText are Requests that get and set the TextField's text.
Text() string
SetText(text string)
}
-// TODO NewLineEdit, NewPasswordEdit, ...
+// NewTextField creates a new TextField.
+func NewTextField() TextField {
+ return newTextField()
+}
+
+// NewPasswordField creates a new TextField for entering passwords; that is, it hides the text being entered.
+func NewPasswordField() TextField {
+ return newPasswordField()
+}