| 11 self.rowspacing = spacing; |
11 self.rowspacing = spacing; |
| 12 |
12 |
| 13 return self; |
13 return self; |
| 14 } |
14 } |
| 15 |
15 |
| 16 - (void) addView:(NSView*)view { |
16 - (void) addView:(NSView*)view layout:(UiLayout*)layout { |
| 17 UiLayout layout = self.uilayout; |
|
| 18 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
17 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
| 19 layout.hexpand = TRUE; |
18 layout->hexpand = TRUE; |
| 20 layout.hfill = TRUE; |
19 layout->hfill = TRUE; |
| 21 } else { |
20 } else { |
| 22 layout.vexpand = TRUE; |
21 layout->vexpand = TRUE; |
| 23 layout.vfill = TRUE; |
22 layout->vfill = TRUE; |
| 24 self.newline = FALSE; |
|
| 25 } |
23 } |
| 26 self.uilayout = layout; |
24 [super addView:view layout:layout]; |
| 27 [super addView:view]; |
|
| 28 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
25 if(_orientation == NSUserInterfaceLayoutOrientationVertical) { |
| 29 self.newline = TRUE; |
26 self.container->newline = TRUE; |
| 30 } |
27 } |
| 31 } |
28 } |
| 32 |
29 |
| 33 @end |
30 @end |