From 3e8aad00687b027c2fc0e931f8898b5ed67a921f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 2 Aug 2015 14:49:10 -0400 Subject: [PATCH] Started converting tBox to the attachcment-based system. I think I'll need to introduce a few more parameters (first/last horz/vert). --- redo/osxaltest/box.m | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/redo/osxaltest/box.m b/redo/osxaltest/box.m index 6f37eaf8..4f6194c6 100644 --- a/redo/osxaltest/box.m +++ b/redo/osxaltest/box.m @@ -48,6 +48,8 @@ - (void)tFillAutoLayout:(tAutoLayoutParams *)p { NSMutableArray *subhorz, *subvert; + NSMutableArray *subhorzleft, *subhorzright; + NSMutableArray *subverttop, *subvertbottom; uintmax_t *first; NSUInteger i; NSMutableString *out; @@ -59,12 +61,18 @@ if (first == NULL) abort(); subhorz = [NSMutableArray new]; + subhorzleft = [NSMutableArray new]; + subhorzright = [NSMutableArray new]; subvert = [NSMutableArray new]; + subverttop = [NSMutableArray new]; + subvertbottom = [NSMutableArray new]; pp.horz = subhorz; + pp.horzAttachLeft = subhorzleft; + pp.horzAttachRight = subhorzright; pp.vert = subvert; - pp.extra = p->extra; - pp.extraVert = p->extraVert; + pp.vertAttachTop = subverttop; + pp.vertAttachBottom = subvertbottom; pp.views = p->views; pp.n = p->n; pp.stretchyVert = self->vertical; @@ -105,7 +113,11 @@ [secondaryout addObjectsFromArray:secondaryin]; [subhorz release]; + [subhorzleft release]; + [subhorzright release]; [subvert release]; + [subverttop release]; + [subvertbottom release]; free(first); }