1 #import "ITWindowEffect.h"
2 #import "ITTransientStatusWindow.h"
5 @implementation ITWindowEffect
8 - (id)initWithWindow:(NSWindow *)window
10 if ( (self = [super init]) ) {
12 _window = [window retain];
13 _effectTime = DEFAULT_EFFECT_TIME;
14 _effectProgress = 0.00;
17 if ( [window conformsToProtocol:@protocol(ITWindowPositioning)] ) {
18 // Casts so the compiler won't gripe
19 _verticalPosition = (ITVerticalWindowPosition)[(ITTransientStatusWindow *)window verticalPosition];
20 _horizontalPosition = (ITHorizontalWindowPosition)[(ITTransientStatusWindow *)window horizontalPosition];
22 NSLog(@"ITWindowEffect - initWithWindow: - window does not conform to ITWindowPositioning.");
23 _verticalPosition = ITWindowPositionBottom;
24 _horizontalPosition = ITWindowPositionLeft;
35 - (void)setWindow:(NSWindow *)newWindow
37 [_window autorelease];
38 _window = [newWindow retain];
41 - (void)setWindowVisibility:(ITWindowVisibilityState)visibilityState
43 if ( [_window conformsToProtocol:@protocol(ITWindowVisibility)] ) {
44 // Cast so the compiler won't gripe
45 [(ITTransientStatusWindow *)_window setVisibilityState:visibilityState];
47 NSLog(@"ITWindowEffect - setWindowVisibility: - window does not conform to ITWindowVisibility.");
53 NSLog(@"ITWindowEffect does not implement performAppear.");
58 NSLog(@"ITWindowEffect does not implement performVanish.");
63 NSLog(@"ITWindowEffect does not implement cancelAppear.");
68 NSLog(@"ITWindowEffect does not implement cancelVanish.");