X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/8e4ab97ee8a6cce189f874e89b74d6f13a35a1cd..079b33aed3d1c849f1f46022040813d6394100f2:/ITTransientStatusWindow.h diff --git a/ITTransientStatusWindow.h b/ITTransientStatusWindow.h index adaf75a..90d74c6 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,28 +16,23 @@ #import - +#import "ITWindowPositioning.h" +#import "ITWindowEffect.h" #define DEFAULT_EXIT_DELAY 3.0 -#define DEFAULT_EFFECT_TIME 0.33 @class ITTextField; @class ITGrayRoundedView; +@class ITWindowEffect; typedef enum { - ITTransientStatusWindowHiddenState, - ITTransientStatusWindowEnteringState, - ITTransientStatusWindowVisibleState, - ITTransientStatusWindowExitingState -} ITTransientStatusWindowVisibilityState; - -typedef enum { - ITTransientStatusWindowExitOnOrderOut, + ITTransientStatusWindowExitOnCommand, ITTransientStatusWindowExitAfterDelay, } ITTransientStatusWindowExitMode; + typedef enum { ITTransientStatusWindowNoBackground, ITTransientStatusWindowRounded, @@ -47,48 +42,38 @@ 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 { + + ITWindowVisibilityState _visibilityState; ITTransientStatusWindowExitMode _exitMode; float _exitDelay; ITTransientStatusWindowBackgroundType _backgroundType; - ITTransientStatusWindowEffect _entryEffect; - ITTransientStatusWindowEffect _exitEffect; - float _effectTime; - ITTransientStatusWindowPosition _verticalPosition; - ITTransientStatusWindowPosition _horizontalPosition; + ITWindowEffect *_entryEffect; + ITWindowEffect *_exitEffect; + ITVerticalWindowPosition _verticalPosition; + ITHorizontalWindowPosition _horizontalPosition; + float _screenPadding; + int _screenNumber; BOOL _reallyIgnoresEvents; NSTimer *_delayTimer; - NSTimer *_fadeTimer; // 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; + +- (ITWindowVisibilityState)visibilityState; +- (void)setVisibilityState:(ITWindowVisibilityState)newState; - (ITTransientStatusWindowExitMode)exitMode; - (void)setExitMode:(ITTransientStatusWindowExitMode)newMode; @@ -99,19 +84,17 @@ typedef enum { // Note: Entry effects descr - (ITTransientStatusWindowBackgroundType)backgroundType; - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType; -- (ITTransientStatusWindowPosition)verticalPosition; -- (void)setVerticalPosition:(ITTransientStatusWindowPosition)newPosition; - -- (ITTransientStatusWindowPosition)horizontalPosition; -- (void)setHorizontalPosition:(ITTransientStatusWindowPosition)newPosition; +- (ITVerticalWindowPosition)verticalPosition; +- (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition; -- (ITTransientStatusWindowEffect)entryEffect; -- (void)setEntryEffect:(ITTransientStatusWindowEffect)newEffect; +- (ITHorizontalWindowPosition)horizontalPosition; +- (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition; -- (ITTransientStatusWindowEffect)exitEffect; -- (void)setExitEffect:(ITTransientStatusWindowEffect)newEffect; +- (ITWindowEffect *)entryEffect; +- (void)setEntryEffect:(ITWindowEffect *)newEffect; -- (void)setRotation:(float)angle; +- (ITWindowEffect *)exitEffect; +- (void)setExitEffect:(ITWindowEffect *)newEffect; @end