Finally fixed this piece of crap so it works on all monitors.
[ITKit.git] / ITTransientStatusWindow.h
old mode 100755 (executable)
new mode 100644 (file)
index 1d1a218..bd2af50
@@ -1,89 +1,76 @@
 /*
  *     ITKit
- *  ITTransientStatusWindow
- *    NSWindow subclass for quick display of status information.
- *    Similar to volume/brightness/eject bezel key windows.
+ *     ITTransientStatusWindow.h
  *
- *  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>
+ *     NSWindow subclass for quick display of status information, similar to
+ *             volume/brightness/eject bezel key windows.
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
+#import <ITKit/ITWindowPositioning.h>
+#import <ITKit/ITWindowEffect.h>
 
+#define DEFAULT_EXIT_DELAY 3.0
 
 @class ITTextField;
 @class ITGrayRoundedView;
 
-
-#define DEFAULT_EXIT_DELAY 3.0
-
-
 typedef enum {
-    ITTransientStatusWindowHiddenState,
-    ITTransientStatusWindowEnteringState,
-    ITTransientStatusWindowVisibleState,
-    ITTransientStatusWindowExitingState
-} ITTransientStatusWindowVisibilityState;
-
-typedef enum {
-    ITTransientStatusWindowExitOnOrderOut,
-    ITTransientStatusWindowExitAfterDelay,
+       ITTransientStatusWindowExitOnCommand,
+       ITTransientStatusWindowExitAfterDelay
 } ITTransientStatusWindowExitMode;
 
 typedef enum {
-    ITTransientStatusWindowNoBackground,
-    ITTransientStatusWindowRounded,
-    ITTransientStatusWindowSquare,
-    ITTransientStatusWindowMetal,
-    ITTransientStatusWindowMetalUtility,
-    ITTransientStatusWindowAquaUtility
+       ITTransientStatusWindowNoBackground,
+       ITTransientStatusWindowRounded,
+       ITTransientStatusWindowSquare,
+       ITTransientStatusWindowMetal,
+       ITTransientStatusWindowMetalUtility,
+       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
-} ITTransientStatusWindowEffect;
-
-
-@interface ITTransientStatusWindow : NSWindow {
-
-    ITTransientStatusWindowVisibilityState  _visibilityState;
-    ITTransientStatusWindowExitMode         _exitMode;
-    float                                   _exitDelay;
-    ITTransientStatusWindowBackgroundType   _backgroundType;
-    ITTransientStatusWindowEffect                      _entryEffect;
-    ITTransientStatusWindowEffect           _exitEffect;
-    ITTransientStatusWindowPosition                    _verticalPosition;
-    ITTransientStatusWindowPosition                    _horizontalPosition;
-    
-    NSTimer *_delayTimer;
-    NSTimer *_fadeTimer;
-
-//  NSView *_contentSubView;           
+       ITTransientStatusWindowRegular,
+       ITTransientStatusWindowSmall,
+       ITTransientStatusWindowMini
+} ITTransientStatusWindowSizing;
+
+@interface ITTransientStatusWindow : NSWindow <ITWindowPositioning, ITWindowMotility> {
+       ITWindowVisibilityState _visibilityState;
+       ITTransientStatusWindowExitMode _exitMode;
+       float _exitDelay;
+       ITTransientStatusWindowBackgroundType _backgroundType;
+       ITWindowEffect *_entryEffect;
+       ITWindowEffect *_exitEffect;
+       double _effectProgress;
+       ITVerticalWindowPosition _verticalPosition;
+       ITHorizontalWindowPosition _horizontalPosition;
+       ITTransientStatusWindowSizing _sizing;
+       float _screenPadding;
+       NSScreen *_screen;
+       BOOL _reallyIgnoresEvents;
+       NSTimer *_exitTimer;
+       NSView *_contentSubView;                
 }
 
-+ (ITTransientStatusWindow *)sharedWindow;
++ (id)sharedWindow;
+
+- (id)initWithContentView:(NSView *)contentView exitMode:(ITTransientStatusWindowExitMode)exitMode backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType;
 
-- (ITTransientStatusWindowVisibilityState)visibilityState;
+- (void)appear:(id)sender;
+- (void)vanish:(id)sender;
+
+- (void)setSizing:(ITTransientStatusWindowSizing)newSizing;
+- (ITTransientStatusWindowSizing)sizing;
+
+- (ITWindowVisibilityState)visibilityState;
+- (void)setVisibilityState:(ITWindowVisibilityState)newState;
 
 - (ITTransientStatusWindowExitMode)exitMode;
 - (void)setExitMode:(ITTransientStatusWindowExitMode)newMode;
@@ -94,16 +81,13 @@ typedef enum {                                     // Note: Entry effects descri
 - (ITTransientStatusWindowBackgroundType)backgroundType;
 - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType;
 
-- (ITTransientStatusWindowPosition)verticalPosition;
-- (void)setVerticalPosition:(ITTransientStatusWindowPosition)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
+@end
\ No newline at end of file