-- (void)performEffect
-{
- if ( _visibilityState == ITTransientStatusWindowHiddenState ) {
- _visibilityState = ITTransientStatusWindowEnteringState;
- } else if ( _visibilityState == ITTransientStatusWindowVisibleState ) {
- _visibilityState = ITTransientStatusWindowExitingState;
- } else {
- return;
- }
-
- if ( _entryEffect == ITTransientStatusWindowEffectDissolve ) {
- [self dissolveEffect];
- } else if ( _entryEffect == ITTransientStatusWindowEffectSlideVertically ) {
- [self slideVerticalEffect];
- } else if ( _entryEffect == ITTransientStatusWindowEffectSlideHorizontally ) {
- [self slideHorizontalEffect];
- } else if ( _entryEffect == ITTransientStatusWindowEffectPivot ) {
- [self pivotEffect];
- }
-}
-
-- (void)dissolveEffect
-{
- if ( _visibilityState == ITTransientStatusWindowEnteringState ) {
- [super orderFront:self];
- _visibilityState = ITTransientStatusWindowVisibleState;
- } else {
- [super orderOut:self];
- _visibilityState = ITTransientStatusWindowHiddenState;
- }
-}
-
-- (void)slideVerticalEffect
-{
- if ( _visibilityState == ITTransientStatusWindowEnteringState ) {
- [super orderFront:self];
- _visibilityState = ITTransientStatusWindowVisibleState;
- } else {
- [super orderOut:self];
- _visibilityState = ITTransientStatusWindowHiddenState;
- }
-}
-
-- (void)slideHorizontalEffect
-{
- if ( _visibilityState == ITTransientStatusWindowEnteringState ) {
- [super orderFront:self];
- _visibilityState = ITTransientStatusWindowVisibleState;
- } else {
- [super orderOut:self];
- _visibilityState = ITTransientStatusWindowHiddenState;
- }
-}
-
-- (void)pivotEffect
-{
- if ( _visibilityState == ITTransientStatusWindowEnteringState ) {
- [self setPivot:315.0];
- _effectProgress = 0.0;
- [self setAlphaValue:0.0];
- [super orderFront:self];
- _effectTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / EFFECT_FPS)
- target:self
- selector:@selector(pivotStep)
- userInfo:nil
- repeats:YES];
- } else {
- [super orderOut:self];
- _visibilityState = ITTransientStatusWindowHiddenState;
- }
-}
-
-- (void)pivotStep
-{
- if ( _visibilityState == ITTransientStatusWindowEnteringState ) {
- float interPivot = 0.0;
- _effectProgress += (1.0 / (EFFECT_FPS * _effectTime));
- _effectProgress = (_effectProgress < 1.0 ? _effectProgress : 1.0);
- interPivot = (( sin((_effectProgress * pi) - (pi / 2)) + 1 ) / 2);
- [self setPivot:((interPivot * 45) + 315)];
- [self setAlphaValue:interPivot];
- if ( _effectProgress >= 1.0 ) {
- [self pivotFinish];
- }
- } else {
- //backwards
- }
-}
-
-- (void)pivotFinish