+ lockedWidth := 0
+ lockedHeight := 0
+ lockedChildren := 0
+ for _, node := range s.children {
+ if n, ok := node.(*LeafNode); ok {
+ if s.kind == VerticalSplit {
+ if n.view.lockWidth {
+ lockedWidth += n.view.width
+ lockedChildren++
+ }
+ } else {
+ if n.view.lockHeight {
+ lockedHeight += n.view.height
+ lockedChildren++
+ }
+ }
+ } else if n, ok := node.(*SplitTree); ok {
+ if s.kind == VerticalSplit {
+ if n.lockWidth {
+ lockedWidth += n.width
+ lockedChildren++
+ }
+ } else {
+ if n.lockHeight {
+ lockedHeight += n.height
+ lockedChildren++
+ }
+ }
+ }
+ }
+ x, y := 0, 0
+ for _, node := range s.children {