Implemented more of the tBox auto layout logic. Now we need to get rid of the methods I had before and implement tRelayout on all classes.
This commit is contained in:
parent
a06216eb34
commit
a2925e3b0b
|
@ -37,19 +37,6 @@
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (uintmax_t)tAddToAutoLayoutDictionary:(NSMutableDictionary *)views keyNumber:(uintmax_t)nn
|
|
||||||
{
|
|
||||||
__block uintmax_t n = nn;
|
|
||||||
|
|
||||||
[self->children enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {
|
|
||||||
id<tControl> c;
|
|
||||||
|
|
||||||
c = (id<tControl>) obj;
|
|
||||||
n = [c tAddToAutoLayoutDictionary:views keyNumber:n];
|
|
||||||
}];
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)tFillAutoLayoutHorz:(NSMutableArray *)horz
|
- (void)tFillAutoLayoutHorz:(NSMutableArray *)horz
|
||||||
vert:(NSMutableArray *)vert
|
vert:(NSMutableArray *)vert
|
||||||
extra:(NSMutableArray *)extra
|
extra:(NSMutableArray *)extra
|
||||||
|
@ -60,6 +47,7 @@
|
||||||
NSMutableArray *subhorz, *subvert;
|
NSMutableArray *subhorz, *subvert;
|
||||||
uintmax_t *first;
|
uintmax_t *first;
|
||||||
NSUInteger i;
|
NSUInteger i;
|
||||||
|
NSMutableString *out;
|
||||||
|
|
||||||
first = (uintmax_t *) malloc([self->children count] * sizeof (uintmax_t));
|
first = (uintmax_t *) malloc([self->children count] * sizeof (uintmax_t));
|
||||||
if (first == NULL)
|
if (first == NULL)
|
||||||
|
@ -75,7 +63,15 @@
|
||||||
extra:extra extraVert:extraVert
|
extra:extra extraVert:extraVert
|
||||||
views:views first:n];
|
views:views first:n];
|
||||||
}
|
}
|
||||||
// TODO combine subhorz/subvert
|
// TODO vertical
|
||||||
|
out = [NSMutableString new];
|
||||||
|
[subhorz enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop) {
|
||||||
|
//TODO if (index != 0)
|
||||||
|
//TODO [out appendString:@"-"];
|
||||||
|
[out appendString:((NSString *) obj)];
|
||||||
|
}];
|
||||||
|
[horz addObject:out];
|
||||||
|
[vert addObjectsFromArray:subvert];
|
||||||
[subhorz release];
|
[subhorz release];
|
||||||
[subvert release];
|
[subvert release];
|
||||||
free(first);
|
free(first);
|
||||||
|
|
Loading…
Reference in New Issue