-
Notifications
You must be signed in to change notification settings - Fork 1
/
EtchedText.m
42 lines (32 loc) · 982 Bytes
/
EtchedText.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* EtchedText */
// NOTE TO SELF: where did this come from?
#import <SproutedInterface/EtchedText.h>
#import <SproutedInterface/EtchedTextCell.h>
@implementation EtchedText
+ (Class)cellClass
{
return [EtchedTextCell class];
}
- initWithCoder: (NSCoder *)origCoder
{
if(![origCoder isKindOfClass: [NSKeyedUnarchiver class]]){
self = [super initWithCoder: origCoder];
} else {
NSKeyedUnarchiver *coder = (id)origCoder;
NSString *oldClassName = [[[self superclass] cellClass] className];
Class oldClass = [coder classForClassName: oldClassName];
if(!oldClass)
oldClass = [[super superclass] cellClass];
[coder setClass: [[self class] cellClass] forClassName: oldClassName];
self = [super initWithCoder: coder];
[coder setClass: oldClass forClassName: oldClassName];
[self setShadowColor:[NSColor whiteColor]];
}
return self;
}
-(void)setShadowColor:(NSColor *)color
{
EtchedTextCell *cell = [self cell];
[cell setShadowColor:color];
}
@end