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 /stack.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 'stack.go')
| -rw-r--r-- | stack.go | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -4,7 +4,6 @@ package ui import ( "fmt" - "sync" ) type orientation bool @@ -20,7 +19,6 @@ const ( // Any extra space at the end of a Stack is left blank. // Some controls may be marked as "stretchy": when the Window they are in changes size, stretchy controls resize to take up the remaining space after non-stretchy controls are laid out. If multiple controls are marked stretchy, they are alloted equal distribution of the remaining space. type Stack struct { - lock sync.Mutex created bool orientation orientation controls []Control @@ -51,9 +49,6 @@ func NewVerticalStack(controls ...Control) *Stack { // SetStretchy marks a control in a Stack as stretchy. This cannot be called once the Window containing the Stack has been created. // It panics if index is out of range. func (s *Stack) SetStretchy(index int) { - s.lock.Lock() - defer s.lock.Unlock() - if s.created { panic("call to Stack.SetStretchy() after Stack has been created") } @@ -64,9 +59,6 @@ func (s *Stack) SetStretchy(index int) { } func (s *Stack) make(window *sysData) error { - s.lock.Lock() - defer s.lock.Unlock() - for i, c := range s.controls { err := c.make(window) if err != nil { |
