Some cleanup in the Auto Layout test.
This commit is contained in:
parent
c9da21e350
commit
63439daffc
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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.
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue