X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/22a86e1af594d77fde7f056cf5152478f14dafbf..bdd55e54cd41b9deceb02c64d9345e91246f61d4:/ITTransientStatusWindow.h?ds=inline diff --git a/ITTransientStatusWindow.h b/ITTransientStatusWindow.h index af6d277..9fbd1fc 100755 --- a/ITTransientStatusWindow.h +++ b/ITTransientStatusWindow.h @@ -4,10 +4,10 @@ * NSWindow subclass for quick display of status information. * Similar to volume/brightness/eject bezel key windows. * - * Original Author : Kent Sutherland * Original Author : Matt Judy * Responsibility : Matt Judy * Responsibility : Joseph Spiros + * Contributor : Kent Sutherland * * Copyright (c) 2002 - 2003 iThink Software. * All Rights Reserved @@ -16,23 +16,23 @@ #import +#import "ITWindowPositioning.h" +#import "ITWindowEffect.h" +#define DEFAULT_EXIT_DELAY 3.0 -#define DEFAULT_EXIT_DELAY 3.0 +@class ITTextField; +@class ITGrayRoundedView; +@class ITWindowEffect; -typedef enum { - ITTransientStatusWindowHiddenState, - ITTransientStatusWindowEnteringState, - ITTransientStatusWindowVisibleState, - ITTransientStatusWindowExitingState -} ITTransientStatusWindowVisibilityState; typedef enum { - ITTransientStatusWindowExitOnOrderOut, + ITTransientStatusWindowExitOnCommand, ITTransientStatusWindowExitAfterDelay, } ITTransientStatusWindowExitMode; + typedef enum { ITTransientStatusWindowNoBackground, ITTransientStatusWindowRounded, @@ -42,44 +42,39 @@ 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 -} ITTransientStatusWindowEffect; - - -@interface ITTransientStatusWindow : NSWindow { - - ITTransientStatusWindowVisibilityState _visibilityState; - ITTransientStatusWindowExitMode _exitMode; - float _exitDelay; - ITTransientStatusWindowBackgroundType _backgroundType; - ITTransientStatusWindowEffect _entryEffect; - ITTransientStatusWindowEffect _exitEffect; - ITTransientStatusWindowPosition _verticalPosition; - ITTransientStatusWindowPosition _horizontalPosition; + +@interface ITTransientStatusWindow : NSWindow { + + ITWindowVisibilityState _visibilityState; + ITTransientStatusWindowExitMode _exitMode; + float _exitDelay; + ITTransientStatusWindowBackgroundType _backgroundType; + ITWindowEffect *_entryEffect; + ITWindowEffect *_exitEffect; + double _effectProgress; + ITVerticalWindowPosition _verticalPosition; + ITHorizontalWindowPosition _horizontalPosition; + float _screenPadding; + int _screenNumber; + + BOOL _reallyIgnoresEvents; - NSTimer *_delayTimer; - NSTimer *_fadeTimer; + NSTimer *_exitTimer; // NSView *_contentSubView; } -+ (ITTransientStatusWindow *)sharedWindow; ++ (id)sharedWindow; + +- (id)initWithContentView:(NSView *)contentView + exitMode:(ITTransientStatusWindowExitMode)exitMode + backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType; + +- (void)appear:(id)sender; +- (void)vanish:(id)sender; -- (ITTransientStatusWindowVisibilityState)visibilityState; +- (ITWindowVisibilityState)visibilityState; +- (void)setVisibilityState:(ITWindowVisibilityState)newState; - (ITTransientStatusWindowExitMode)exitMode; - (void)setExitMode:(ITTransientStatusWindowExitMode)newMode; @@ -90,16 +85,20 @@ typedef enum { // Note: Entry effects descri - (ITTransientStatusWindowBackgroundType)backgroundType; - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType; -- (ITTransientStatusWindowPosition)verticalPosition; -- (void)setVerticalPosition:(ITTransientStatusWindowPosition)newPosition; +- (ITVerticalWindowPosition)verticalPosition; +- (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition; + +- (ITHorizontalWindowPosition)horizontalPosition; +- (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition; + +- (float)effectProgress; +- (void)setEffectProgress:(float)newProgress; -- (ITTransientStatusWindowPosition)horizontalPosition; -- (void)setHorizontalPosition:(ITTransientStatusWindowPosition)newPosition; +- (ITWindowEffect *)entryEffect; +- (void)setEntryEffect:(ITWindowEffect *)newEffect; -- (ITTransientStatusWindowEffect)entryEffect; -- (void)setEntryEffect:(ITTransientStatusWindowEffect)newEffect; +- (ITWindowEffect *)exitEffect; +- (void)setExitEffect:(ITWindowEffect *)newEffect; -- (ITTransientStatusWindowEffect)exitEffect; -- (void)setExitEffect:(ITTransientStatusWindowEffect)newEffect; @end