summaryrefslogtreecommitdiff
path: root/basicEntry.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-18 05:04:18 -0600
committerJeff Carr <[email protected]>2024-01-18 05:04:18 -0600
commita8d95fef8d0879a3e3ecdac76ab4df4fee658fcf (patch)
treed870cdb3147828e2a93bb99a84925b07b719216d /basicEntry.go
parent76d6da5505900c50b72e3c84e86a521d9bcbc6bd (diff)
lots of syntax changesv0.12.8
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'basicEntry.go')
-rw-r--r--basicEntry.go34
1 files changed, 17 insertions, 17 deletions
diff --git a/basicEntry.go b/basicEntry.go
index 29a0dd8..d20fe18 100644
--- a/basicEntry.go
+++ b/basicEntry.go
@@ -1,26 +1,26 @@
/*
- A Labeled Single Line Entry widget:
+A Labeled Single Line Entry widget:
- -----------------------------
- | | |
- | Food: | <type here> |
- | | |
- -----------------------------
+-----------------------------
+| | |
+| Food: | <type here> |
+| | |
+-----------------------------
*/
package gadgets
-import (
+import (
+ "go.wit.com/gui"
"go.wit.com/log"
- "go.wit.com/gui/gui"
)
type BasicEntry struct {
- parent *gui.Node // parent widget
- l *gui.Node // label widget
- v *gui.Node // value widget
+ parent *gui.Node // parent widget
+ l *gui.Node // label widget
+ v *gui.Node // value widget
- value string
- label string
+ value string
+ label string
Custom func()
}
@@ -42,14 +42,14 @@ func (n *BasicEntry) Set(value string) *BasicEntry {
func (n *BasicEntry) Enable() {
log.Log(INFO, "BasicEntry.Enable()")
- if (n.v != nil) {
+ if n.v != nil {
n.v.Enable()
}
}
func (n *BasicEntry) Disable() {
log.Log(INFO, "BasicEntry.Disable()")
- if (n.v != nil) {
+ if n.v != nil {
n.v.Disable()
}
}
@@ -65,9 +65,9 @@ func (n *BasicEntry) SetLabel(s string) *BasicEntry {
}
func NewBasicEntry(p *gui.Node, name string) *BasicEntry {
- d := BasicEntry {
+ d := BasicEntry{
parent: p,
- value: "",
+ value: "",
}
// various timeout settings