(orientation Orientation, children []LayoutItem)
| 240 | } |
| 241 | |
| 242 | func boxLayoutFlags(orientation Orientation, children []LayoutItem) LayoutFlags { |
| 243 | if len(children) == 0 { |
| 244 | return ShrinkableHorz | ShrinkableVert | GrowableHorz | GrowableVert |
| 245 | } |
| 246 | |
| 247 | var flags LayoutFlags |
| 248 | for i := 0; i < len(children); i++ { |
| 249 | item := children[i] |
| 250 | |
| 251 | if _, ok := item.(*splitterHandleLayoutItem); ok || !shouldLayoutItem(item) { |
| 252 | continue |
| 253 | } |
| 254 | |
| 255 | if s, ok := item.(*spacerLayoutItem); ok { |
| 256 | if s.greedyLocallyOnly { |
| 257 | continue |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | f := item.LayoutFlags() |
| 262 | flags |= f |
| 263 | } |
| 264 | |
| 265 | return flags |
| 266 | } |
| 267 | |
| 268 | // boxLayoutItems lays out items. bounds parameter is in native pixels. |
| 269 | func boxLayoutItems(container ContainerLayoutItem, items []LayoutItem, orientation Orientation, alignment Alignment2D, bounds Rectangle, margins96dpi Margins, spacing96dpi int, hwnd2StretchFactor map[win.HWND]int) []LayoutResultItem { |
no test coverage detected
searching dependent graphs…