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

Function PiuContainerFitVertically

modules/piu/All/piuContainer.c:185–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void PiuContainerFitVertically(void* it)
186{
187 PiuContainer* self = it;
188 PiuContent* content = (*self)->first;
189 PiuDimension height;
190 PiuContentFitVertically(it);
191 height = (*self)->bounds.height;
192 while (content) {
193 PiuCoordinates coordinates = &((*content)->coordinates);
194 if ((coordinates->vertical & piuTopBottom) == piuTopBottom)
195 (*content)->bounds.height = height - coordinates->top - coordinates->bottom;
196 else
197 (*content)->bounds.height = coordinates->height;
198 (*(*content)->dispatch->fitVertically)(content);
199 (*(*self)->dispatch->placeContentVertically)(self, content);
200 content = (*content)->next;
201 }
202 (*self)->flags |= piuContentsPlaced;
203}
204
205void* PiuContainerHit(void* it, PiuCoordinate x, PiuCoordinate y)
206{

Callers 3

PiuScrollerFitVerticallyFunction · 0.85
PiuLayoutFitVerticallyFunction · 0.85
PiuApplicationResizeFunction · 0.85

Calls 1

PiuContentFitVerticallyFunction · 0.85

Tested by

no test coverage detected