From b508161d1ef5366cdac9672d239c35c357c3ca4a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 2 Aug 2015 13:57:59 -0400 Subject: [PATCH] Added a framework for handling attachments to the frame. These are only handled by the shallowest control level (the immediate child of a tWindow). --- redo/osxaltest/button.m | 4 ++++ redo/osxaltest/osxaltest.h | 6 ++++-- redo/osxaltest/spinbox.m | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/redo/osxaltest/button.m b/redo/osxaltest/button.m index 1bf0d8e2..e676c602 100644 --- a/redo/osxaltest/button.m +++ b/redo/osxaltest/button.m @@ -53,7 +53,11 @@ horzpred = predicate; } [p->horz addObject:[NSString stringWithFormat:@"[%@%@]", key, horzpred]]; + [p->horzAttachLeft addObject:@YES]; + [p->horzAttachRight addObject:@YES]; [p->vert addObject:[NSString stringWithFormat:@"[%@%@]", key, vertpred]]; + [p->vertAttachTop addObject:@YES]; + [p->vertAttachBottom addObject:@YES]; [p->views setObject:self->b forKey:key]; } diff --git a/redo/osxaltest/osxaltest.h b/redo/osxaltest/osxaltest.h index 1c01d796..76fa7361 100644 --- a/redo/osxaltest/osxaltest.h +++ b/redo/osxaltest/osxaltest.h @@ -6,9 +6,11 @@ typedef struct tAutoLayoutParams tAutoLayoutParams; struct tAutoLayoutParams { NSMutableArray *horz; + NSMutableArray *horzAttachLeft; + NSMutableArray *horzAttachRight; NSMutableArray *vert; - NSMutableArray *extra; // TODO make extraHorz and return BOOL NSNumber logic - NSMutableArray *extraVert; + NSMutableArray *vertAttachTop; + NSMutableArray *vertAttachBottom; NSMutableDictionary *views; uintmax_t n; BOOL stretchy; diff --git a/redo/osxaltest/spinbox.m b/redo/osxaltest/spinbox.m index 0ccdaf55..949ec974 100644 --- a/redo/osxaltest/spinbox.m +++ b/redo/osxaltest/spinbox.m @@ -95,7 +95,11 @@ horzpred = predicate; } [p->horz addObject:[NSString stringWithFormat:@"[%@%@]", key, horzpred]]; + [p->horzAttachLeft addObject:@YES]; + [p->horzAttachRight addObject:@YES]; [p->vert addObject:[NSString stringWithFormat:@"[%@%@]", key, vertpred]]; + [p->vertAttachTop addObject:@YES]; + [p->vertAttachBottom addObject:@YES]; [p->views setObject:self->c forKey:key]; }