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

Function PiuContainer_add

modules/piu/All/piuContainer.c:565–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

563}
564
565void PiuContainer_add(xsMachine* the)
566{
567 PiuContainer* self = PIU(Container, xsThis);
568 PiuContent* content = PIU(Content, xsArg(0));
569 xsAssert(self != NULL);
570 xsAssert(content != NULL);
571 xsAssert((*content)->container == NULL);
572 xsAssert((*content)->previous == NULL);
573 xsAssert((*content)->next == NULL);
574 if ((*self)->first) {
575 (*content)->previous = (*self)->last;
576 (*((*self)->last))->next = content;
577 }
578 else
579 (*self)->first = content;
580 (*self)->last = content;
581 (*content)->container = self;
582 PiuContainerBindContent(self, content);
583 PiuContentReflow(content, piuSizeChanged);
584}
585
586void PiuContainer_content(xsMachine *the)
587{

Callers

nothing calls this directly

Calls 2

PiuContainerBindContentFunction · 0.85
PiuContentReflowFunction · 0.85

Tested by

no test coverage detected