MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / PiuContainerAdjustVertically

Function PiuContainerAdjustVertically

modules/piu/All/piuContainer.c:81–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void PiuContainerAdjustVertically(void* it)
82{
83 PiuContainer* self = it;
84 PiuContent* content = (*self)->first;
85 PiuCoordinates coordinates;
86 (*self)->flags &= ~piuContentsVerticallyChanged;
87 while (content) {
88 if ((*content)->flags & piuHeightChanged) {
89 PiuContentInvalidate(content, NULL);
90 (*(*content)->dispatch->measureVertically)(content);
91 coordinates = &((*content)->coordinates);
92 if ((coordinates->vertical & piuTopBottom) == piuTopBottom)
93 (*content)->bounds.height = (*self)->bounds.height - coordinates->top - coordinates->bottom;
94 else
95 (*content)->bounds.height = coordinates->height;
96 (*(*content)->dispatch->fitVertically)(content);
97 (*content)->flags |= piuYChanged;
98 }
99 else if ((*content)->flags & piuContentsVerticallyChanged)
100 PiuContainerAdjustVertically(content);
101 if ((*content)->flags & piuYChanged)
102 (*(*self)->dispatch->placeContentVertically)(self, content);
103 content = (*content)->next;
104 }
105}
106
107void PiuContainerBind(void* it, PiuApplication* application, PiuView* view)
108{

Callers 1

PiuApplicationAdjustFunction · 0.85

Calls 1

PiuContentInvalidateFunction · 0.85

Tested by

no test coverage detected