Checking in new window effect frame, so I can begin moving the guts into it. Also...
[ITKit.git] / ITTransientStatusWindow.h
index adaf75a..aa7e5f6 100755 (executable)
 
 
 #define DEFAULT_EXIT_DELAY  3.0
-#define DEFAULT_EFFECT_TIME 0.33
+#define DEFAULT_EFFECT_TIME 0.75
 
 
 @class ITTextField;
 @class ITGrayRoundedView;
+@class ITWindowEffect;
 
 
 typedef enum {
@@ -57,36 +58,33 @@ typedef enum {
     ITTransientStatusWindowOther
 } ITTransientStatusWindowPosition;
 
-typedef enum {                                      // Note: Entry effects described here.  Exit does the reverse.
-    ITTransientStatusWindowEffectNone,              // No effect, window just appears.
-    ITTransientStatusWindowEffectDissolve,          // Fades in.
-    ITTransientStatusWindowEffectSlideVertically,   // Slides vertically onto the screen from the nearest edge
-    ITTransientStatusWindowEffectSlideHorizontally, // Slides horizontally onto the screen from the nearest edge
-    ITTransientStatusWindowEffectPivot              // Rotate into place from perpendicular edge
-} ITTransientStatusWindowEffect;
-
-
 @interface ITTransientStatusWindow : NSWindow {
 
     ITTransientStatusWindowVisibilityState _visibilityState;
     ITTransientStatusWindowExitMode        _exitMode;
     float                                  _exitDelay;
     ITTransientStatusWindowBackgroundType  _backgroundType;
-    ITTransientStatusWindowEffect          _entryEffect;
-    ITTransientStatusWindowEffect          _exitEffect;
+    ITWindowEffect                        *_entryEffect;
+    ITWindowEffect                        *_exitEffect;
     float                                  _effectTime;
+    double                                 _effectProgress;
     ITTransientStatusWindowPosition        _verticalPosition;
     ITTransientStatusWindowPosition        _horizontalPosition;
+    int                                    _screenPadding;
 
     BOOL _reallyIgnoresEvents;
     
     NSTimer *_delayTimer;
-    NSTimer *_fadeTimer;
+    NSTimer *_effectTimer;
 
 //  NSView *_contentSubView;           
 }
 
-+ (ITTransientStatusWindow *)sharedWindow;
++ (id)sharedWindow;
+
+- (id)initWithContentView:(NSView *)contentView
+                 exitMode:(ITTransientStatusWindowExitMode)exitMode
+           backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType;
 
 - (ITTransientStatusWindowVisibilityState)visibilityState;
 
@@ -105,13 +103,11 @@ typedef enum {                                      // Note: Entry effects descr
 - (ITTransientStatusWindowPosition)horizontalPosition;
 - (void)setHorizontalPosition:(ITTransientStatusWindowPosition)newPosition;
 
-- (ITTransientStatusWindowEffect)entryEffect;
-- (void)setEntryEffect:(ITTransientStatusWindowEffect)newEffect;
-
-- (ITTransientStatusWindowEffect)exitEffect;
-- (void)setExitEffect:(ITTransientStatusWindowEffect)newEffect;
+- (ITWindowEffect *)entryEffect;
+- (void)setEntryEffect:(ITWindowEffect *)newEffect;
 
-- (void)setRotation:(float)angle;
+- (ITWindowEffect *)exitEffect;
+- (void)setExitEffect:(ITWindowEffect *)newEffect;
 
 
 @end