Added a framework for handling attachments to the frame. These are only handled by the shallowest control level (the immediate child of a tWindow).

This commit is contained in:
Pietro Gagliardi 2015-08-02 13:57:59 -04:00
parent 5bc53f937d
commit b508161d1e
3 changed files with 12 additions and 2 deletions

View File

@ -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];
}

View File

@ -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;

View File

@ -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];
}