diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-30 22:48:12 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-30 22:48:12 -0400 |
| commit | ffa1bbe0b91a8c812ddcea5c5d65e55f60d07f33 (patch) | |
| tree | 000fadd9af11843d92e7f0eee49fa90cca1379cd /label.go | |
| parent | 990d50e9a153681a091a23734f8962e728fde1b0 (diff) | |
Restored the previous new API. I'm going to change it so that events are callbacks rather than using a window handler, but other than that... yeah.
Diffstat (limited to 'label.go')
| -rw-r--r-- | label.go | 14 |
1 files changed, 0 insertions, 14 deletions
@@ -2,16 +2,11 @@ package ui -import ( - "sync" -) - // A Label is a static line of text used to mark other controls. // Label text is drawn on a single line; text that does not fit is truncated. // A Label can appear in one of two places: bound to a control or standalone. // This determines the vertical alignment of the label. type Label struct { - lock sync.Mutex created bool sysData *sysData initText string @@ -39,9 +34,6 @@ func NewStandaloneLabel(text string) *Label { // SetText sets the Label's text. func (l *Label) SetText(text string) { - l.lock.Lock() - defer l.lock.Unlock() - if l.created { l.sysData.setText(text) return @@ -51,9 +43,6 @@ func (l *Label) SetText(text string) { // Text returns the Label's text. func (l *Label) Text() string { - l.lock.Lock() - defer l.lock.Unlock() - if l.created { return l.sysData.text() } @@ -61,9 +50,6 @@ func (l *Label) Text() string { } func (l *Label) make(window *sysData) error { - l.lock.Lock() - defer l.lock.Unlock() - l.sysData.alternate = l.standalone err := l.sysData.make(window) if err != nil { |
