| 706 | } |
| 707 | |
| 708 | void 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 | |
| 734 | void PiuContainer_lastThat(xsMachine *the) |
| 735 | { |
nothing calls this directly
no test coverage detected