Removing the use of private CoreGraphics APIs to draw shadows, and replacing with...
[ITKit.git] / ITButton.m
1 #import "ITButton.h"
2 #import "ITButtonCell.h"
3
4 @implementation ITButton
5
6 + (void)initialize {
7         if (self == [ITButton class]) {
8                 [self setCellClass:[ITButtonCell class]];
9         }
10 }
11
12 + (Class)cellClass {
13         return [ITButtonCell class];
14 }
15
16 - (void)displayIfNeeded {
17         [super displayIfNeededIgnoringOpacity];
18 }
19
20 - (void)displayIfNeededInRect:(NSRect)aRect {
21         [super displayIfNeededInRectIgnoringOpacity:aRect];
22 }
23
24 - (void)displayRect:(NSRect)aRect {
25         [super displayRectIgnoringOpacity:aRect];
26 }
27
28 - (id)initWithCoder:(NSCoder *)coder {
29         if ((self = [super initWithCoder:coder])) {
30                 ITButtonCell *cell = [[ITButtonCell alloc] init];
31                 [self setCell:cell];
32         }
33         return self;
34 }
35
36 - (BOOL)isOpaque {
37         return NO;
38 }
39
40 @end