Added horizontal/vertical first/last flags. These flags are used by single controls for attachments. tBox will set them conditionally, so it can use the attachment values directly.
This commit is contained in:
parent
3e8aad0068
commit
f72b47c4dc
|
@ -53,11 +53,11 @@
|
|||
horzpred = predicate;
|
||||
}
|
||||
[p->horz addObject:[NSString stringWithFormat:@"[%@%@]", key, horzpred]];
|
||||
[p->horzAttachLeft addObject:@YES];
|
||||
[p->horzAttachRight addObject:@YES];
|
||||
[p->horzAttachLeft addObject:[NSNumtber numberWithBool:p->horzFirst]];
|
||||
[p->horzAttachRight addObject:[NSNumber numberWithBool:p->horzLast]];
|
||||
[p->vert addObject:[NSString stringWithFormat:@"[%@%@]", key, vertpred]];
|
||||
[p->vertAttachTop addObject:@YES];
|
||||
[p->vertAttachBottom addObject:@YES];
|
||||
[p->vertAttachTop addObject:[NSNumber numberWithBool:p->vertFirst]];
|
||||
[p->vertAttachBottom addObject:[NSNumber numberWithBool:p->vertLast]];
|
||||
[p->views setObject:self->b forKey:key];
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,13 @@ struct tAutoLayoutParams {
|
|||
NSMutableArray *horz;
|
||||
NSMutableArray *horzAttachLeft;
|
||||
NSMutableArray *horzAttachRight;
|
||||
BOOL horzFirst;
|
||||
BOOL horzLast;
|
||||
NSMutableArray *vert;
|
||||
NSMutableArray *vertAttachTop;
|
||||
NSMutableArray *vertAttachBottom;
|
||||
BOOL vertFirst;
|
||||
BOOL vertLast;
|
||||
NSMutableDictionary *views;
|
||||
uintmax_t n;
|
||||
BOOL stretchy;
|
||||
|
|
|
@ -95,11 +95,11 @@
|
|||
horzpred = predicate;
|
||||
}
|
||||
[p->horz addObject:[NSString stringWithFormat:@"[%@%@]", key, horzpred]];
|
||||
[p->horzAttachLeft addObject:@YES];
|
||||
[p->horzAttachRight addObject:@YES];
|
||||
[p->horzAttachLeft addObject:[NSNumtber numberWithBool:p->horzFirst]];
|
||||
[p->horzAttachRight addObject:[NSNumber numberWithBool:p->horzLast]];
|
||||
[p->vert addObject:[NSString stringWithFormat:@"[%@%@]", key, vertpred]];
|
||||
[p->vertAttachTop addObject:@YES];
|
||||
[p->vertAttachBottom addObject:@YES];
|
||||
[p->vertAttachTop addObject:[NSNumber numberWithBool:p->vertFirst]];
|
||||
[p->vertAttachBottom addObject:[NSNumber numberWithBool:p->vertLast]];
|
||||
[p->views setObject:self->c forKey:key];
|
||||
}
|
||||
|
||||
|
|
|
@ -55,9 +55,13 @@
|
|||
p.horz = [NSMutableArray new];
|
||||
p.horzAttachLeft = [NSMutableArray new];
|
||||
p.horzAttachRight = [NSMutableArray new];
|
||||
p.horzFirst = YES; // only control here
|
||||
p.horzLast = YES;
|
||||
p.vert = [NSMutableArray new];
|
||||
p.vertAttachTop = [NSMutableArray new];
|
||||
p.vertAttachBottom = [NSMutableArray new];
|
||||
p.vertFirst = YES;
|
||||
p.vertLast = YES;
|
||||
p.views = [NSMutableDictionary new];
|
||||
p.n = 0;
|
||||
[self->c tFillAutoLayout:&p];
|
||||
|
|
Loading…
Reference in New Issue