MCPcopy
hub / github.com/lxn/walk / boxLayoutFlags

Function boxLayoutFlags

boxlayout.go:242–266  ·  view source on GitHub ↗
(orientation Orientation, children []LayoutItem)

Source from the content-addressed store, hash-verified

240}
241
242func 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.
269func boxLayoutItems(container ContainerLayoutItem, items []LayoutItem, orientation Orientation, alignment Alignment2D, bounds Rectangle, margins96dpi Margins, spacing96dpi int, hwnd2StretchFactor map[win.HWND]int) []LayoutResultItem {

Callers 2

LayoutFlagsMethod · 0.85
LayoutFlagsMethod · 0.85

Calls 2

shouldLayoutItemFunction · 0.85
LayoutFlagsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…