diff options
Diffstat (limited to 'basicEntry.go')
| -rw-r--r-- | basicEntry.go | 34 |
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 |
