MCPcopy
hub / github.com/g3n/engine / Recalc

Method Recalc

gui/filllayout.go:23–38  ·  view source on GitHub ↗

Recalc is called by the panel which has this layout

(ipan IPanel)

Source from the content-addressed store, hash-verified

21
22// Recalc is called by the panel which has this layout
23func (f *FillLayout) Recalc(ipan IPanel) {
24
25 parent := ipan.GetPanel()
26 children := parent.Children()
27 if len(children) == 0 {
28 return
29 }
30 child := children[0].(IPanel).GetPanel()
31
32 if f.width {
33 child.SetWidth(parent.ContentWidth())
34 }
35 if f.height {
36 child.SetHeight(parent.ContentHeight())
37 }
38}

Callers

nothing calls this directly

Calls 6

SetWidthMethod · 0.80
ContentWidthMethod · 0.80
SetHeightMethod · 0.80
ContentHeightMethod · 0.80
GetPanelMethod · 0.65
ChildrenMethod · 0.65

Tested by

no test coverage detected