Some cleanup in the Auto Layout test.

This commit is contained in:
Pietro Gagliardi 2015-08-01 14:22:45 -04:00
parent c9da21e350
commit 63439daffc
5 changed files with 17 additions and 14 deletions

View File

@ -1,16 +1,13 @@
// 31 july 2015
#import "osxaltest.h"
@interface tBox : NSObject<tControl> {
@implementation tBox {
NSMutableArray *children;
NSView *sv;
BOOL vertical;
}
@end
@implementation tBox
- (id)initVertical:(BOOL)vert
- (id)tInitVertical:(BOOL)vert
{
self = [super init];
if (self) {
@ -21,7 +18,7 @@
return self;
}
- (void)addControl:(NSObject<tControl> *)c stretchy:(BOOL)s
- (void)tAddControl:(id<tControl>)c stretchy:(BOOL)s
{
// TODO
}

View File

@ -1,14 +1,11 @@
// 31 july 2015
#import "osxaltest.h"
@interface tButton : NSObject<tControl> {
@implementation tButton {
NSButton *b;
}
@end
@implementation tButton
- (id)initWithText:(NSString *)text
- (id)tInitWithText:(NSString *)text
{
self = [super init];
if (self) {

Binary file not shown.

View File

@ -9,8 +9,17 @@
@end
@interface tWindowDelegate : NSObject<NSWindowDelegate>
- (void)tSetControl:(NSObject<tControl> *)cc;
- (void)tSetControl:(id<tControl>)cc;
- (void)tRelayout;
@end
@interface tBox : NSObject<tControl>
- (id)tInitVertical:(BOOL)vert;
- (void)tAddControl:(id<tControl>)c stretchy:(BOOL)s;
@end
@interface tButton : NSObject<tControl>
- (id)tInitWithText:(NSString *)text;
@end
extern NSString *tAutoLayoutKey(uintmax_t);

View File

@ -2,7 +2,7 @@
#import "osxaltest.h"
@implementation tWindowDelegate {
NSObject<tControl> *c;
id<tControl> c;
}
- (id)init
@ -13,7 +13,7 @@
return self;
}
- (void)tSetControl:(NSObject<tControl> *)cc
- (void)tSetControl:(id<tControl>)cc
{
self->c = cc;
}