Updating ITKit to be an Xcode project.
[ITKit.git] / ITTransientStatusWindow.h
index 0c60020..021c8a7 100755 (executable)
@@ -4,10 +4,10 @@
  *    NSWindow subclass for quick display of status information.
  *    Similar to volume/brightness/eject bezel key windows.
  *
- *  Original Author : Kent Sutherland <joseph.spiros@ithinksw.com>
  *  Original Author : Matt Judy <mjudy@ithinksw.com>
  *   Responsibility : Matt Judy <mjudy@ithinksw.com>
  *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *      Contributor : Kent Sutherland <joseph.spiros@ithinksw.com>
  *
  *  Copyright (c) 2002 - 2003 iThink Software.
  *  All Rights Reserved
 
 
 #import <Cocoa/Cocoa.h>
-
+#import "ITWindowPositioning.h"
+#import "ITWindowEffect.h"
 
 #define DEFAULT_EXIT_DELAY  3.0
-#define DEFAULT_EFFECT_TIME 0.75
 
 
 @class ITTextField;
 @class ITGrayRoundedView;
+@class ITWindowEffect;
 
 
 typedef enum {
-    ITTransientStatusWindowHiddenState,
-    ITTransientStatusWindowEnteringState,
-    ITTransientStatusWindowVisibleState,
-    ITTransientStatusWindowExitingState
-} ITTransientStatusWindowVisibilityState;
-
-typedef enum {
-    ITTransientStatusWindowExitOnOrderOut,
+    ITTransientStatusWindowExitOnCommand,
     ITTransientStatusWindowExitAfterDelay,
 } ITTransientStatusWindowExitMode;
 
+
 typedef enum {
     ITTransientStatusWindowNoBackground,
     ITTransientStatusWindowRounded,
@@ -47,44 +42,26 @@ typedef enum {
     ITTransientStatusWindowAquaUtility
 } ITTransientStatusWindowBackgroundType;
 
-typedef enum {
-    ITTransientStatusWindowPositionTop,
-    ITTransientStatusWindowPositionMiddle,
-    ITTransientStatusWindowPositionBottom,
-    ITTransientStatusWindowPositionLeft,
-    ITTransientStatusWindowPositionCenter,
-    ITTransientStatusWindowPositionRight,
-    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;
+
+@interface ITTransientStatusWindow : NSWindow <ITWindowPositioning , ITWindowMotility> {
+
+    ITWindowVisibilityState                _visibilityState;
     ITTransientStatusWindowExitMode        _exitMode;
     float                                  _exitDelay;
     ITTransientStatusWindowBackgroundType  _backgroundType;
-    ITTransientStatusWindowEffect          _entryEffect;
-    ITTransientStatusWindowEffect          _exitEffect;
-    float                                  _effectTime;
+    ITWindowEffect                        *_entryEffect;
+    ITWindowEffect                        *_exitEffect;
     double                                 _effectProgress;
-    ITTransientStatusWindowPosition        _verticalPosition;
-    ITTransientStatusWindowPosition        _horizontalPosition;
+    ITVerticalWindowPosition               _verticalPosition;
+    ITHorizontalWindowPosition             _horizontalPosition;
+    float                                  _screenPadding;
+    int                                    _screenNumber;
 
     BOOL _reallyIgnoresEvents;
     
-    NSTimer *_delayTimer;
-    NSTimer *_effectTimer;
+    NSTimer *_exitTimer;
 
-//  NSView *_contentSubView;           
+    NSView *_contentSubView;           
 }
 
 + (id)sharedWindow;
@@ -93,7 +70,11 @@ typedef enum {                                      // Note: Entry effects descr
                  exitMode:(ITTransientStatusWindowExitMode)exitMode
            backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType;
 
-- (ITTransientStatusWindowVisibilityState)visibilityState;
+- (void)appear:(id)sender;
+- (void)vanish:(id)sender;
+
+- (ITWindowVisibilityState)visibilityState;
+- (void)setVisibilityState:(ITWindowVisibilityState)newState;
 
 - (ITTransientStatusWindowExitMode)exitMode;
 - (void)setExitMode:(ITTransientStatusWindowExitMode)newMode;
@@ -104,17 +85,20 @@ typedef enum {                                      // Note: Entry effects descr
 - (ITTransientStatusWindowBackgroundType)backgroundType;
 - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType;
 
-- (ITTransientStatusWindowPosition)verticalPosition;
-- (void)setVerticalPosition:(ITTransientStatusWindowPosition)newPosition;
+- (ITVerticalWindowPosition)verticalPosition;
+- (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition;
+
+- (ITHorizontalWindowPosition)horizontalPosition;
+- (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition;
 
-- (ITTransientStatusWindowPosition)horizontalPosition;
-- (void)setHorizontalPosition:(ITTransientStatusWindowPosition)newPosition;
+- (float)effectProgress;
+- (void)setEffectProgress:(float)newProgress;
 
-- (ITTransientStatusWindowEffect)entryEffect;
-- (void)setEntryEffect:(ITTransientStatusWindowEffect)newEffect;
+- (ITWindowEffect *)entryEffect;
+- (void)setEntryEffect:(ITWindowEffect *)newEffect;
 
-- (ITTransientStatusWindowEffect)exitEffect;
-- (void)setExitEffect:(ITTransientStatusWindowEffect)newEffect;
+- (ITWindowEffect *)exitEffect;
+- (void)setExitEffect:(ITWindowEffect *)newEffect;
 
 
 @end