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

Function PiuContainer_insert

modules/piu/All/piuContainer.c:708–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708void PiuContainer_insert(xsMachine *the)
709{
710 PiuContainer* self = PIU(Container, xsThis);
711 PiuContent* content = PIU(Content, xsArg(0));
712 PiuContent* before = PIU(Content, xsArg(1));
713 PiuContent* previous;
714 xsAssert(self != NULL);
715 xsAssert(content != NULL);
716 xsAssert((*content)->container == NULL);
717 xsAssert((*content)->previous == NULL);
718 xsAssert((*content)->next == NULL);
719 xsAssert(before != NULL);
720 xsAssert((*before)->container == self);
721 previous = (*before)->previous;
722 (*before)->previous = content;
723 (*content)->next = before;
724 (*content)->previous = previous;
725 if (previous)
726 (*previous)->next = content;
727 else
728 (*self)->first = content;
729 (*content)->container = self;
730 PiuContainerBindContent(self, content);
731 PiuContentReflow(content, piuSizeChanged);
732}
733
734void PiuContainer_lastThat(xsMachine *the)
735{

Callers

nothing calls this directly

Calls 2

PiuContainerBindContentFunction · 0.85
PiuContentReflowFunction · 0.85

Tested by

no test coverage detected