// // AppController.m // test // // Created by H. Nikolaus Schaller on 02.10.07. // Copyright 2007 Golden Delicious Computers GmbH&Co. KG. All rights reserved. // #import "AppController.h" @implementation AppController - (void) awakeFromNib; { int i; NSData *data; NSPropertyListFormat format; NSString *error; #if 0 { NSAffineTransform *atm=[NSAffineTransform new]; NSSize sz; [atm scaleXBy:1.0 yBy:-1.0]; // flip y sz=NSMakeSize(-10.0, -30.0); // how is negative size handled? NSLog(@"%@ -> %@", NSStringFromSize(sz), NSStringFromSize([atm transformSize:sz])); sz=NSMakeSize(-10.0, 30.0); // how is positive size handled with flipping? NSLog(@"%@ -> %@", NSStringFromSize(sz), NSStringFromSize([atm transformSize:sz])); // result: it simply returns -1.0 * sz.height } #endif [button setTitle:@"QWERTY"]; [button setAlternateTitle:@"qwerty"]; [button setButtonType:7]; [button setBordered:YES]; [[button cell] setBezeled:YES]; [button setTransparent:NO]; [[button cell] setImageDimsWhenDisabled:YES]; [button setBezelStyle:10]; NSLog(@"highlightMask=%02x", [[button cell] highlightsBy]); NSLog(@"stateMask=%02x", [[button cell] showsStateBy]); #if 1 #ifdef __APPLE__ [[button cell] setHighlightsBy:0]; for(i=0; i<20; i++) { id plist; [[button cell] setShowsStateBy:i]; // NSLog(@"buttonType=%d", [button buttonType]); NSLog(@"i=%d", i); NSLog(@"highlightMask=%02x", [[button cell] highlightsBy]); NSLog(@"stateMask=%02x", [[button cell] showsStateBy]); data=[NSKeyedArchiver archivedDataWithRootObject:[button cell]]; plist=[NSPropertyListSerialization propertyListFromData:data mutabilityOption:0 format:&format errorDescription:&error]; // NSLog(@"plist=%@", plist); plist=[plist objectForKey:@"$objects"]; plist=[plist objectAtIndex:1]; //NSLog(@"button=%@", plist); NSLog(@"cflags=%08x cflags2=%08x, bflags=%08x bflags2=%08x", [[plist objectForKey:@"NSCellFlags"] intValue], [[plist objectForKey:@"NSCellFlags2"] intValue], [[plist objectForKey:@"NSButtonFlags"] intValue], [[plist objectForKey:@"NSButtonFlags2"] intValue]); } #endif #endif #if 1 #ifdef __APPLE__ for(i=0; i<8; i++) { id plist; int bit=1<