Incremental checkin.
[ITKit.git] / ITTransientStatusWindow.h
index aa7e5f6..90d74c6 100755 (executable)
@@ -4,10 +4,10 @@
  *    NSWindow subclass for quick display of status information.
  *    Similar to volume/brightness/eject bezel key windows.
  *
  *    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>
  *  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
  *
  *  Copyright (c) 2002 - 2003 iThink Software.
  *  All Rights Reserved
 
 
 #import <Cocoa/Cocoa.h>
 
 
 #import <Cocoa/Cocoa.h>
-
+#import "ITWindowPositioning.h"
+#import "ITWindowEffect.h"
 
 #define DEFAULT_EXIT_DELAY  3.0
 
 #define DEFAULT_EXIT_DELAY  3.0
-#define DEFAULT_EFFECT_TIME 0.75
 
 
 @class ITTextField;
 
 
 @class ITTextField;
 
 
 typedef enum {
 
 
 typedef enum {
-    ITTransientStatusWindowHiddenState,
-    ITTransientStatusWindowEnteringState,
-    ITTransientStatusWindowVisibleState,
-    ITTransientStatusWindowExitingState
-} ITTransientStatusWindowVisibilityState;
-
-typedef enum {
-    ITTransientStatusWindowExitOnOrderOut,
+    ITTransientStatusWindowExitOnCommand,
     ITTransientStatusWindowExitAfterDelay,
 } ITTransientStatusWindowExitMode;
 
     ITTransientStatusWindowExitAfterDelay,
 } ITTransientStatusWindowExitMode;
 
+
 typedef enum {
     ITTransientStatusWindowNoBackground,
     ITTransientStatusWindowRounded,
 typedef enum {
     ITTransientStatusWindowNoBackground,
     ITTransientStatusWindowRounded,
@@ -48,34 +42,23 @@ typedef enum {
     ITTransientStatusWindowAquaUtility
 } ITTransientStatusWindowBackgroundType;
 
     ITTransientStatusWindowAquaUtility
 } ITTransientStatusWindowBackgroundType;
 
-typedef enum {
-    ITTransientStatusWindowPositionTop,
-    ITTransientStatusWindowPositionMiddle,
-    ITTransientStatusWindowPositionBottom,
-    ITTransientStatusWindowPositionLeft,
-    ITTransientStatusWindowPositionCenter,
-    ITTransientStatusWindowPositionRight,
-    ITTransientStatusWindowOther
-} ITTransientStatusWindowPosition;
-
-@interface ITTransientStatusWindow : NSWindow {
-
-    ITTransientStatusWindowVisibilityState _visibilityState;
+
+@interface ITTransientStatusWindow : NSWindow <ITWindowPositioning , ITWindowVisibility> {
+
+    ITWindowVisibilityState                _visibilityState;
     ITTransientStatusWindowExitMode        _exitMode;
     float                                  _exitDelay;
     ITTransientStatusWindowBackgroundType  _backgroundType;
     ITWindowEffect                        *_entryEffect;
     ITWindowEffect                        *_exitEffect;
     ITTransientStatusWindowExitMode        _exitMode;
     float                                  _exitDelay;
     ITTransientStatusWindowBackgroundType  _backgroundType;
     ITWindowEffect                        *_entryEffect;
     ITWindowEffect                        *_exitEffect;
-    float                                  _effectTime;
-    double                                 _effectProgress;
-    ITTransientStatusWindowPosition        _verticalPosition;
-    ITTransientStatusWindowPosition        _horizontalPosition;
-    int                                    _screenPadding;
+    ITVerticalWindowPosition               _verticalPosition;
+    ITHorizontalWindowPosition             _horizontalPosition;
+    float                                  _screenPadding;
+    int                                    _screenNumber;
 
     BOOL _reallyIgnoresEvents;
     
     NSTimer *_delayTimer;
 
     BOOL _reallyIgnoresEvents;
     
     NSTimer *_delayTimer;
-    NSTimer *_effectTimer;
 
 //  NSView *_contentSubView;           
 }
 
 //  NSView *_contentSubView;           
 }
@@ -86,7 +69,11 @@ typedef enum {
                  exitMode:(ITTransientStatusWindowExitMode)exitMode
            backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType;
 
                  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;
 
 - (ITTransientStatusWindowExitMode)exitMode;
 - (void)setExitMode:(ITTransientStatusWindowExitMode)newMode;
@@ -97,11 +84,11 @@ typedef enum {
 - (ITTransientStatusWindowBackgroundType)backgroundType;
 - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType;
 
 - (ITTransientStatusWindowBackgroundType)backgroundType;
 - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType;
 
-- (ITTransientStatusWindowPosition)verticalPosition;
-- (void)setVerticalPosition:(ITTransientStatusWindowPosition)newPosition;
+- (ITVerticalWindowPosition)verticalPosition;
+- (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition;
 
 
-- (ITTransientStatusWindowPosition)horizontalPosition;
-- (void)setHorizontalPosition:(ITTransientStatusWindowPosition)newPosition;
+- (ITHorizontalWindowPosition)horizontalPosition;
+- (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition;
 
 - (ITWindowEffect *)entryEffect;
 - (void)setEntryEffect:(ITWindowEffect *)newEffect;
 
 - (ITWindowEffect *)entryEffect;
 - (void)setEntryEffect:(ITWindowEffect *)newEffect;