#import "ITPivotWindowEffect.h"
#import "ITCoreGraphicsHacks.h"
+#import "ITTransientStatusWindow.h"
+
@interface ITPivotWindowEffect (Private)
- (void)setPivot:(float)angle;
-- (void)pivotFinish;
+- (void)appearFinish;
+- (void)vanishFinish;
@end
-@implementation ITPivotWindowEffect
+@implementation ITPivotWindowEffect
- (void)performAppear
{
+ // Cast so the compiler won't gripe
+ [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowAppearingState];
[self setPivot:315.0];
_effectProgress = 0.0;
[_window setAlphaValue:0.0];
- (void)performVanish
{
+ // Cast so the compiler won't gripe
+ [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowVanishingState];
[self setPivot:0.0];
_effectProgress = 1.0;
[_window setAlphaValue:1.0];
- (void)cancelAppear
{
- [self pivotFinish];
+ [self appearFinish];
[_window orderOut:self];
[self setPivot:0.0];
[_window setAlphaValue:1.0];
+ // Cast so the compiler won't gripe
+ [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowHiddenState];
}
- (void)cancelVanish
{
- [self pivotFinish];
+ [self vanishFinish];
[self setPivot:0.0];
[_window setAlphaValue:1.0];
[_window orderFront:self];
[_window display];
+ // Cast so the compiler won't gripe
+ [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowVisibleState];
}
- (void)appearStep
[_window setAlphaValue:interPivot];
if ( _effectProgress >= 1.0 ) {
- [self pivotFinish];
+ [self appearFinish];
}
}
[_window setAlphaValue:interPivot];
if ( _effectProgress <= 0.0 ) {
- [self pivotFinish];
+ [self vanishFinish];
}
}
-- (void)pivotFinish
+- (void)appearFinish
{
[_effectTimer invalidate];
_effectTimer = nil;
+ // Cast so the compiler won't gripe
+ [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowVisibleState];
}
+- (void)vanishFinish
+{
+ [_effectTimer invalidate];
+ _effectTimer = nil;
+ // Cast so the compiler won't gripe
+ [(ITTransientStatusWindow *)_window setVisibilityState:ITTransientStatusWindowHiddenState];
+}
- (void)setPivot:(float)angle
{