Builds now. Also some moderate effect architecture changes.
[ITKit.git] / ITWindowEffect.m
1 #import "ITWindowEffect.h"
2
3
4 @implementation ITWindowEffect
5
6
7 - (id)initWithWindow:(NSWindow *)window
8 {
9     if ( (self = [super init]) ) {
10     
11         _window         = [window retain];
12         _effectTime     = DEFAULT_EFFECT_TIME;
13         _effectProgress = 0.00;
14         _effectTimer    = nil;
15
16         if ( [window conformsToProtocol:@protocol(ITWindowPositioning)] ) {
17             _verticalPosition   = (ITVerticalWindowPosition)[window verticalPosition];
18             _horizontalPosition = (ITHorizontalWindowPosition)[window horizontalPosition];
19         } else {
20             NSLog(@"ITWindowEffect - initWithWindow: - window does not conform to ITWindowPositioning.");
21             _verticalPosition   = ITWindowPositionBottom;
22             _horizontalPosition = ITWindowPositionLeft;
23         }
24     }
25     return self;
26 }
27
28 - (NSWindow *)window
29 {
30     return _window;
31 }
32
33 - (void)setWindow:(NSWindow *)newWindow
34 {
35     _window = newWindow;
36 }
37
38 - (void)performAppear
39 {
40     NSLog(@"ITWindowEffect does not implement performAppear.");
41 }
42
43 - (void)performVanish
44 {
45     NSLog(@"ITWindowEffect does not implement performVanish.");
46 }
47
48 - (void)dealloc
49 {
50         [_window release];
51         [super dealloc];
52 }
53
54
55 @end