X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/766d5d9af104b68f61f3b09abac3f4cc88839ce6..490cbda59abb52af3c07957ebc50f337799d6bf3:/ITTransientStatusWindow.h diff --git a/ITTransientStatusWindow.h b/ITTransientStatusWindow.h old mode 100755 new mode 100644 index e3ea9dc..da06c5c --- a/ITTransientStatusWindow.h +++ b/ITTransientStatusWindow.h @@ -1,95 +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 - * Original Author : Matt Judy - * Responsibility : Matt Judy - * Responsibility : Joseph Spiros + * 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 +#import +#import - -#define DEFAULT_EXIT_DELAY 3.0 -#define DEFAULT_EFFECT_TIME 1.0 - +#define DEFAULT_EXIT_DELAY 3.0 @class ITTextField; @class ITGrayRoundedView; - -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 - ITTransientStatusWindowEffectPivot // Rotate into place from perpendicular edge -} ITTransientStatusWindowEffect; - - -@interface ITTransientStatusWindow : NSWindow { - - ITTransientStatusWindowVisibilityState _visibilityState; - ITTransientStatusWindowExitMode _exitMode; - float _exitDelay; - ITTransientStatusWindowBackgroundType _backgroundType; - ITTransientStatusWindowEffect _entryEffect; - ITTransientStatusWindowEffect _exitEffect; - float _effectTime; - double _effectProgress; - ITTransientStatusWindowPosition _verticalPosition; - ITTransientStatusWindowPosition _horizontalPosition; - - BOOL _reallyIgnoresEvents; - - NSTimer *_delayTimer; - NSTimer *_effectTimer; - -// NSView *_contentSubView; + ITTransientStatusWindowRegular, + ITTransientStatusWindowSmall, + ITTransientStatusWindowMini +} ITTransientStatusWindowSizing; + +@interface ITTransientStatusWindow : NSWindow { + 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; -- (ITTransientStatusWindowVisibilityState)visibilityState; +- (id)initWithContentView:(NSView *)contentView exitMode:(ITTransientStatusWindowExitMode)exitMode backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType; + +- (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; @@ -100,17 +81,13 @@ typedef enum { // Note: Entry effects descr - (ITTransientStatusWindowBackgroundType)backgroundType; - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType; -- (ITTransientStatusWindowPosition)verticalPosition; -- (void)setVerticalPosition:(ITTransientStatusWindowPosition)newPosition; - -- (ITTransientStatusWindowPosition)horizontalPosition; -- (void)setHorizontalPosition:(ITTransientStatusWindowPosition)newPosition; - -- (ITTransientStatusWindowEffect)entryEffect; -- (void)setEntryEffect:(ITTransientStatusWindowEffect)newEffect; +- (float)effectProgress; +- (void)setEffectProgress:(float)newProgress; -- (ITTransientStatusWindowEffect)exitEffect; -- (void)setExitEffect:(ITTransientStatusWindowEffect)newEffect; +- (ITWindowEffect *)entryEffect; +- (void)setEntryEffect:(ITWindowEffect *)newEffect; +- (ITWindowEffect *)exitEffect; +- (void)setExitEffect:(ITWindowEffect *)newEffect; -@end +@end \ No newline at end of file