Added multiple primary horizontal and vertical Auto Layout views. This will accomodate tSpinbox. Now we can go back to tBox.
This commit is contained in:
parent
4dc63828e4
commit
b528d1ff0c
|
@ -32,14 +32,14 @@
|
|||
return n;
|
||||
}
|
||||
|
||||
- (void)tFillAutoLayoutHorz:(NSMutableString *)horz
|
||||
vert:(NSMutableString *)vert
|
||||
- (void)tFillAutoLayoutHorz:(NSMutableArray *)horz
|
||||
vert:(NSMutableArray *)vert
|
||||
extra:(NSMutableArray *)extra
|
||||
extraVert:(NSMutableArray *)extraVert
|
||||
views:(NSMutableDictionary *)views
|
||||
{
|
||||
[horz setString:@"[view0]"];
|
||||
[vert setString:@"[view0]"];
|
||||
[horz addObject:@"[view0]"];
|
||||
[vert addObject:@"[view0]"];
|
||||
[views setObject:self->b forKey:@"view0"];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
@required
|
||||
- (void)tAddToView:(NSView *)v;
|
||||
//TODO- (uintmax_t)tAddToAutoLayoutDictionary:(NSMutableDictionary *)views keyNumber:(uintmax_t)n;
|
||||
- (void)tFillAutoLayoutHorz:(NSMutableString *)horz
|
||||
vert:(NSMutableString *)vert
|
||||
- (void)tFillAutoLayoutHorz:(NSMutableArray *)horz
|
||||
vert:(NSMutableArray *)vert
|
||||
extra:(NSMutableArray *)extra
|
||||
extraVert:(NSMutableArray *)extraVert
|
||||
views:(NSMutableDictionary *)views;
|
||||
|
|
|
@ -43,14 +43,15 @@
|
|||
return n;
|
||||
}
|
||||
|
||||
- (void)tFillAutoLayoutHorz:(NSMutableString *)horz
|
||||
vert:(NSMutableString *)vert
|
||||
- (void)tFillAutoLayoutHorz:(NSMutableArray *)horz
|
||||
vert:(NSMutableArray *)vert
|
||||
extra:(NSMutableArray *)extra
|
||||
extraVert:(NSMutableArray *)extraVert
|
||||
views:(NSMutableDictionary *)views
|
||||
{
|
||||
[horz setString:@"[view0]-[view1]"];
|
||||
[vert setString:@"[view0]"];
|
||||
[horz addObject:@"[view0]-[view1]"];
|
||||
[vert addObject:@"[view0]"];
|
||||
[vert addObject:@"[view1]"];
|
||||
[views setObject:self->t forKey:@"view0"];
|
||||
[views setObject:self->s forKey:@"view1"];
|
||||
}
|
||||
|
|
|
@ -42,18 +42,18 @@
|
|||
- (void)tRelayout
|
||||
{
|
||||
NSView *contentView;
|
||||
NSMutableString *horz, *vert;
|
||||
NSMutableArray *horz, *vert;
|
||||
NSMutableArray *extra, *extraVert;
|
||||
NSMutableDictionary *views;
|
||||
NSInteger i;
|
||||
NSUInteger i;
|
||||
NSString *margin;
|
||||
|
||||
if (self->c == nil)
|
||||
return;
|
||||
contentView = [self->w contentView];
|
||||
[contentView removeConstraints:[contentView constraints]];
|
||||
horz = [NSMutableString new];
|
||||
vert = [NSMutableString new];
|
||||
horz = [NSMutableArray new];
|
||||
vert = [NSMutableArray new];
|
||||
extra = [NSMutableArray new];
|
||||
extraVert = [NSMutableArray new];
|
||||
views = [NSMutableDictionary new];
|
||||
|
@ -61,10 +61,14 @@
|
|||
margin = @"";
|
||||
if (self->margined)
|
||||
margin = @"-";
|
||||
[extra addObject:[NSString stringWithFormat:@"|%@%@%@|", margin, horz, margin]];
|
||||
[horz enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {
|
||||
[extra addObject:[NSString stringWithFormat:@"|%@%@%@|", margin, obj, margin]];
|
||||
[extraVert addObject:@NO];
|
||||
[extra addObject:[NSString stringWithFormat:@"|%@%@%@|", margin, vert, margin]];
|
||||
}];
|
||||
[vert enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {
|
||||
[extra addObject:[NSString stringWithFormat:@"|%@%@%@|", margin, obj, margin]];
|
||||
[extraVert addObject:@YES];
|
||||
}];
|
||||
for (i = 0; i < [extra count]; i++) {
|
||||
NSString *constraint;
|
||||
NSNumber *vertical;
|
||||
|
|
Loading…
Reference in New Issue