* ITKit
* ITChasingArrowsView
* Animating Asynchronous Arrows Widget
- * *** DEPRECATED: NSProgressIndicator now offers an async widget. MLJ - 01/14/2003
+ * *** DEPRECATED: NSProgressIndicator now offers an async mode. MLJ - 01/14/2003
*
* Original Author : Doug Brown <...>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* ITBevelView
* NSView subclass which draws a bevel.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2003 iThink Software.
* All Rights Reserved
+/*
+ * ITKit
+ * ITButton
+ * Stylized button for use in Status Windows.
+ *
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *
+ * Copyright (c) 2002 - 2003 iThink Software.
+ * All Rights Reserved
+ *
+ */
+
+
#import <Cocoa/Cocoa.h>
+/*
+ * ITKit
+ * ITButtonCell
+ * Cell used by the ITButton control.
+ *
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *
+ * Copyright (c) 2002 - 2003 iThink Software.
+ * All Rights Reserved
+ *
+ */
+
+
#import <Cocoa/Cocoa.h>
* Category which extends NSMenu
*
* Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* Category which extends NSView
*
* Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* ITCoreGraphicsHacks
* Header to import to work with private CoreGraphics API
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
* ITCutWindowEffect
* Effect subclass which performs a simple cut in or out, with no transition.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
- (void)performAppear
{
- CGAffineTransform transform;
- NSPoint appearPoint;
-
- //Set the location on the screen
- if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) {
- appearPoint.x = -( 32.0 + [[_window screen] visibleFrame].origin.x );
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionRight ) {
- appearPoint.x = -(([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) - 32.0 - [_window frame].size.width);
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionCenter ) {
- appearPoint.x = ( [_window frame].size.width - [[_window screen] visibleFrame].size.width ) / 2;
- }
-
- if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) {
- appearPoint.y = ( 64.0 + [[_window screen] visibleFrame].origin.y - [_window frame].size.height );
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) {
- appearPoint.y = -( [[_window screen] frame].size.height - ( [_window frame].size.height + 32.0 + [[_window screen] visibleFrame].origin.y) );
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionMiddle ) {
- appearPoint.y = ( [_window frame].size.height - [[_window screen] visibleFrame].size.height) / 2;
- }
-
- transform = CGAffineTransformMakeTranslation(appearPoint.x, appearPoint.y);
- CGSSetWindowTransform([NSApp contextID],
- (CGSWindowID)[_window windowNumber],
- transform);
-
[_window orderFront:self];
[self setWindowVisibility:ITWindowVisibleState];
}
* ITDissolveWindowEffect
* Effect subclass which performs a dissolve fade effect on a window.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
- (void)performAppear
{
- CGAffineTransform transform;
- NSPoint appearPoint;
__idle = NO;
- //Set the location on the screen
- if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) {
- appearPoint.x = -( 32.0 + [[_window screen] visibleFrame].origin.x );
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionRight ) {
- appearPoint.x = -(([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) - 32.0 - [_window frame].size.width);
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionCenter ) {
- appearPoint.x = ( [_window frame].size.width - [[_window screen] visibleFrame].size.width ) / 2;
- }
-
- if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) {
- appearPoint.y = ( 64.0 + [[_window screen] visibleFrame].origin.y - [_window frame].size.height );
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) {
- appearPoint.y = -( [[_window screen] frame].size.height - ( [_window frame].size.height + 32.0 + [[_window screen] visibleFrame].origin.y) );
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionMiddle ) {
- appearPoint.y = ( [_window frame].size.height - [[_window screen] visibleFrame].size.height) / 2;
- }
-
- transform = CGAffineTransformMakeTranslation(appearPoint.x, appearPoint.y);
- CGSSetWindowTransform([NSApp contextID],
- (CGSWindowID)[_window windowNumber],
- transform);
-
[self setWindowVisibility:ITWindowAppearingState];
[self performAppearFromProgress:0.0 effectTime:_effectTime];
}
-//
-// ITHotKey.h
-//
-// Created by Quentin Carnicelli on Sat Aug 02 2003.
-// Copyright (c) 2003 iThink Software. All rights reserved.
-//
+/*
+ * ITKit
+ * ITHotKey
+ *
+ * Original Author : Quentin Carnicelli <...>
+ * Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *
+ * Copyright (c) 2002 - 2003 iThink Software.
+ * All Rights Reserved
+ *
+ */
-#import <Foundation/Foundation.h>
+#import <Foundation/Foundation.h>
#import "ITKeyCombo.h"
+
@interface ITHotKey : NSObject
{
NSString* mName;
-//
-// ITHotKeyCenter.h
-//
-// Created by Quentin Carnicelli on Sat Aug 02 2003.
-// Copyright (c) 2003 iThink Software. All rights reserved.
-//
+/*
+ * ITKit
+ * ITHotKeyCenter
+ *
+ * Original Author : Quentin Carnicelli <...>
+ * Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *
+ * Copyright (c) 2002 - 2003 iThink Software.
+ * All Rights Reserved
+ *
+ */
+
#import <AppKit/AppKit.h>
+
@class ITHotKey;
+
@interface ITHotKeyCenter : NSObject
{
NSMutableDictionary* mHotKeys; //Keys are NSValue of EventHotKeyRef
- (void)sendEvent: (NSEvent*)event;
+
@end
/*
* ITKit
* ITImageCell
- * NSImageCell subclass which adds new features.
+ * Cell used by the ITImageView control.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2003 iThink Software.
* All Rights Reserved
/*
* ITKit
* ITImageView
- * NSImageView subclass which adds new features.
+ * NSImageView subclass which adds new features, such as smooth scaling.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2003 iThink Software.
* All Rights Reserved
-//
-// ITKeyBroadcaster.h
-//
-// Created by Quentin Carnicelli on Sun Aug 03 2003.
-// Copyright (c) 2003 iThink Software. All rights reserved.
-//
+/*
+ * ITKit
+ * ITHotKeyBroadcaster
+ *
+ * Original Author : Quentin Carnicelli <...>
+ * Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *
+ * Copyright (c) 2002 - 2003 iThink Software.
+ * All Rights Reserved
+ *
+ */
+
#import <AppKit/AppKit.h>
+ (long)cocoaModifiersAsCarbonModifiers: (long)cocoaModifiers;
+
@end
+
__private_extern__ NSString* ITKeyBroadcasterKeyEvent; //keys: keyCombo as ITKeyCombo
\ No newline at end of file
-//
-// ITKeyCombo.h
-//
-// Created by Quentin Carnicelli on Sat Aug 02 2003.
-// Copyright (c) 2003 iThink Software. All rights reserved.
-//
+/*
+ * ITKit
+ * ITKeyCombo
+ *
+ * Original Author : Quentin Carnicelli <...>
+ * Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *
+ * Copyright (c) 2002 - 2003 iThink Software.
+ * All Rights Reserved
+ *
+ */
+
#import <Foundation/Foundation.h>
- (BOOL)isClearCombo;
- (BOOL)isValidHotKeyCombo;
+
@end
+
@interface ITKeyCombo (UserDisplayAdditions)
- (NSString*)description;
-//
-// ITKeyComboPanel.h
+/*
+ * ITKit
+ * ITKeyComboPanel
+ *
+ * Original Author : Quentin Carnicelli <...>
+ * Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *
+ * Copyright (c) 2002 - 2003 iThink Software.
+ * All Rights Reserved
+ *
+ */
-//
-// Created by Quentin Carnicelli on Sun Aug 03 2003.
-// Copyright (c) 2003 iThink Software. All rights reserved.
-//
#import <AppKit/AppKit.h>
+
@class ITKeyBroadcaster;
@class ITKeyCombo;
@class ITHotKey;
+
@interface ITKeyComboPanel : NSWindowController
{
IBOutlet NSTextField* mTitleField;
- (IBAction)ok: (id)sender;
- (IBAction)cancel: (id)sender;
- (IBAction)clear: (id)sender;
+
+
@end
* ITKit
* iThink Software's custom extensions to Apple's AppKit framework
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* ITPivotWindowEffect
* Effect subclass which pivots (rotates) a window into position on the screen.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
[self setPivot:315.0];
[_window setAlphaValue:0.0];
}
-
+
[_window orderFront:self];
_effectTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / EFFECT_FPS)
target:self
- (void)appearStep
{
float interPivot = 0.0;
- [_window setEffectProgress:([_window effectProgress] + _effectSpeed)];
- [_window setEffectProgress:( ([_window effectProgress] < 1.0) ? [_window effectProgress] : 1.0)];
- interPivot = (( sin(([_window effectProgress] * pi) - (pi / 2)) + 1 ) / 2);
- [self setPivot:((interPivot * 45) + 315)];
+ float progress = ([_window effectProgress] + _effectSpeed);
+
+ progress = ( (progress < 1.0) ? progress : 1.0 );
+
+ [_window setEffectProgress:progress];
+
+ interPivot = (( sin((progress * pi) - (pi / 2)) + 1 ) / 2);
+ [self setPivot:(315 + (interPivot * 45))];
[_window setAlphaValue:interPivot];
-
- if ( [_window effectProgress] >= 1.0 ) {
+
+ if ( progress >= 1.0 ) {
[self appearFinish];
}
}
[_effectTimer invalidate];
_effectTimer = nil;
[self setWindowVisibility:ITWindowVisibleState];
-
+
__idle = YES;
-
+
if ( __shouldReleaseWhenIdle ) {
[self release];
}
- (void)cancelAppear
{
[self setWindowVisibility:ITWindowVanishingState];
-
+
[_effectTimer invalidate];
_effectTimer = nil;
-
+
[self performVanishFromProgress:[_window effectProgress] effectTime:(_effectTime / 3.5)];
}
[self setPivot:0.0];
[_window setAlphaValue:1.0];
}
-
+
[_window orderFront:self];
_effectTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / EFFECT_FPS)
target:self
- (void)vanishStep
{
float interPivot = 1.0;
- [_window setEffectProgress:([_window effectProgress] - _effectSpeed)];
- [_window setEffectProgress:( ([_window effectProgress] > 0.0) ? [_window effectProgress] : 0.0)];
+ float progress = ([_window effectProgress] - _effectSpeed);
+
+ progress = ( (progress > 0.0) ? progress : 0.0);
+
+ [_window setEffectProgress:progress];
+
interPivot = (( sin(([_window effectProgress] * pi) - (pi / 2)) + 1 ) / 2);
- [self setPivot:((interPivot * 45) + 315)];
+ [self setPivot:(315 + (interPivot * 45))];
[_window setAlphaValue:interPivot];
-
- if ( [_window effectProgress] <= 0.0 ) {
+
+ if ( progress <= 0.0 ) {
[self vanishFinish];
}
}
[_window setAlphaValue:1.0];
[self setPivot:0.0];
[self setWindowVisibility:ITWindowHiddenState];
-
+
__idle = YES;
-
+
if ( __shouldReleaseWhenIdle ) {
[self release];
}
- (void)cancelVanish
{
[self setWindowVisibility:ITWindowAppearingState];
-
+
[_effectTimer invalidate];
_effectTimer = nil;
-
+
[self performAppearFromProgress:[_window effectProgress] effectTime:(_effectTime / 3.5)];
}
- (void)setPivot:(float)angle
{
float degAngle;
- NSPoint appearPoint;
CGAffineTransform transform;
+ NSRect windowFrame = [_window frame];
+ NSRect screenFrame = [[_window screen] frame];
+ int hPos = [_window horizontalPosition];
+ int vPos = [_window verticalPosition];
+ float translateX;
+ float translateY;
- if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) {
- if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) {
- degAngle = (angle * (pi / 180));
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) {
- degAngle = (-angle * (pi / 180));
+ if ( vPos == ITWindowPositionBottom ) {
+ if ( hPos == ITWindowPositionLeft ) {
+ angle = angle;
+ } else if ( hPos == ITWindowPositionRight ) {
+ angle = ( 45 - -(315 - angle) );
}
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionRight ) {
- if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) {
- degAngle = (angle * (pi / 180));
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) {
- degAngle = (angle * (pi / 180));
+ } else if ( vPos == ITWindowPositionTop ) {
+ if ( hPos == ITWindowPositionLeft ) {
+ angle = ( 45 - -(315 - angle) );
+ } else if ( hPos == ITWindowPositionRight ) {
+ angle = angle;
}
}
+ degAngle = (angle * (pi / 180));
transform = CGAffineTransformMakeRotation(degAngle);
- // Set pivot rotation point
- //transform.tx = -( 32.0 + [[_window screen] visibleFrame].origin.x );
- transform.ty = ( [_window frame].size.height + 32.0 + [[_window screen] visibleFrame].origin.y );
-
- if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) {
- appearPoint.x = -( 32.0 + [[_window screen] visibleFrame].origin.x );
- transform.tx = -( 32.0 + [[_window screen] visibleFrame].origin.x );
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionRight ) {
- transform.tx = -( 32.0 + [[_window screen] visibleFrame].origin.x ) + [_window frame].size.width;
- appearPoint.x = -(([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) - 64.0);
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionCenter ) {
- appearPoint.x = ( [_window frame].size.width - [[_window screen] visibleFrame].size.width ) / 2;
+ if ( vPos == ITWindowPositionBottom ) {
+ transform.ty = ( windowFrame.size.height + windowFrame.origin.y);
+ translateY = -(screenFrame.size.height);
+ } else if ( vPos == ITWindowPositionTop ) {
+ transform.ty = -( screenFrame.size.height - windowFrame.origin.y - windowFrame.size.height );
+ translateY = 0;
+ }
+
+ if ( hPos == ITWindowPositionLeft ) {
+ transform.tx = -( windowFrame.origin.x );
+ translateX = 0;
+ } else if ( hPos == ITWindowPositionRight ) {
+ transform.tx = ( screenFrame.size.width - windowFrame.origin.x );
+ translateX = -(screenFrame.size.width);
}
- if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) {
- appearPoint.y = ( [_window frame].size.height - [[_window screen] visibleFrame].size.height) / 2;
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) {
- appearPoint.y = -( [[_window screen] frame].size.height - ([_window frame].origin.y) + 32.0 + [[_window screen] visibleFrame].origin.y) ;
- }/* else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionMiddle ) {
- appearPoint.y = ( [_window frame].size.height - [[_window screen] visibleFrame].size.height) / 2;
- }*/
CGSSetWindowTransform([NSApp contextID],
(CGSWindowID)[_window windowNumber],
CGAffineTransformTranslate( transform,
- appearPoint.x,
- appearPoint.y ) );
+ translateX,
+ translateY ) );
}
+
@end
* ITSlideHorizontallyWindowEffect
* Effect subclass which slides a window in from the right or left side of the screen.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
- (void)setSlide:(float)distance
{
CGAffineTransform transform;
- float yPoint;
+ NSPoint translation;
- if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) {
- yPoint = ( 64.0 + [[_window screen] visibleFrame].origin.y - [_window frame].size.height );
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) {
- yPoint = -( [[_window screen] frame].size.height - ( [_window frame].size.height + 32.0 + [[_window screen] visibleFrame].origin.y) );
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionMiddle ) {
- yPoint = ( [_window frame].size.height - [[_window screen] visibleFrame].size.height) / 2;
+ if ( [_window horizontalPosition] == ITWindowPositionLeft ) {
+ translation.x = ( -([_window frame].origin.x) + distance ) ;
+ } else if ( [_window horizontalPosition] == ITWindowPositionRight ) {
+ translation.x = ( -([_window frame].origin.x) - distance ) ;
}
- /*if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) {
- transform = CGAffineTransformMakeTranslation((distance - (32.0 + [[_window screen] visibleFrame].origin.x)),
- ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) ? -( [[_window screen] frame].size.height - ( [_window frame].size.height + 32.0 + [[_window screen] visibleFrame].origin.y) ) : ( 64.0 + [[_window screen] visibleFrame].origin.y - [_window frame].size.height ) );
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionRight ) {
- transform = CGAffineTransformMakeTranslation(-((([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) + distance) - 32.0 - [_window frame].size.width),
- ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) ? -( [[_window screen] frame].size.height - ( [_window frame].size.height + 32.0 + [[_window screen] visibleFrame].origin.y) ) : ( 64.0 + [[_window screen] visibleFrame].origin.y - [_window frame].size.height ) );
- }*/
+ translation.y = -( [[_window screen] frame].size.height - [_window frame].origin.y - [_window frame].size.height );
- transform = CGAffineTransformMakeTranslation( ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) ? (distance - (32.0 + [[_window screen] visibleFrame].origin.x)) : -((([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) + distance) - 32.0 - [_window frame].size.width),
- yPoint);
+ transform = CGAffineTransformMakeTranslation( translation.x, translation.y );
CGSSetWindowTransform([NSApp contextID],
(CGSWindowID)[_window windowNumber],
* ITSlideVerticallyWindowEffect
* Effect subclass which slides a window in from the top or bottom of the screen.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
- (void)setSlide:(float)distance
{
CGAffineTransform transform;
- float xPoint;
+ NSPoint translation;
- if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) {
- xPoint = -( 32.0 + [[_window screen] visibleFrame].origin.x );
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionRight ) {
- xPoint = -(([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) - 32.0 - [_window frame].size.width);
- } else if ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionCenter ) {
- xPoint = ( [_window frame].size.width - [[_window screen] visibleFrame].size.width ) / 2;
- }
+ translation.x = -( [_window frame].origin.x );
- /*if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionBottom ) {
- transform = CGAffineTransformMakeTranslation( ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) ? -( 32.0 + [[_window screen] visibleFrame].origin.x ) : -(([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) - 32.0 - [_window frame].size.width),
- -( [[_window screen] frame].size.height - ( distance + 32.0 + [[_window screen] visibleFrame].origin.y ) ) );
- } else if ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) {
- transform = CGAffineTransformMakeTranslation( ( [(ITTransientStatusWindow *)_window horizontalPosition] == ITWindowPositionLeft ) ? -( 32.0 + [[_window screen] visibleFrame].origin.x ) : -(([[_window screen] visibleFrame].size.width + [[_window screen] visibleFrame].origin.x) - 32.0 - [_window frame].size.width),
- [[_window screen] visibleFrame].origin.y - distance + 64.0 );
- }*/
+ if ( [_window verticalPosition] == ITWindowPositionTop ) {
+ translation.y = ( (([_window frame].size.height * 2) - ([[_window screen] frame].size.height - [_window frame].origin.y)) - distance);
+ } else if ( [_window verticalPosition] == ITWindowPositionBottom ) {
+ translation.y = -( [[_window screen] frame].size.height - [_window frame].origin.y - distance );
+ }
- transform = CGAffineTransformMakeTranslation(xPoint,
- ( [(ITTransientStatusWindow *)_window verticalPosition] == ITWindowPositionTop ) ? ( [[_window screen] visibleFrame].origin.y - distance + 64.0 ) : -( [[_window screen] frame].size.height - ( distance + 32.0 + [[_window screen] visibleFrame].origin.y ) ) );
+ transform = CGAffineTransformMakeTranslation( translation.x, translation.y );
CGSSetWindowTransform([NSApp contextID],
(CGSWindowID)[_window windowNumber],
* NSStatusItem subclass which reduces suckage
*
* Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* ITTSWBackgroundView
* NSView subclass which draws a translucent background with rounded corners.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
* NSTabView subclass which includes convenience features
*
* Original Author : Kent Sutherland <kent.sutherland@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* NSPopUpButton subclass for corner views in a table view.
*
* Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* (with optional image) to the corner view of the TableView.
*
* Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002-2003 iThink Software.
* ITTextField
* Allows shadows to be drawn under text.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
/*
* ITKit
* ITTextFieldCell
- * Allows shadows to be drawn under text in cells.
+ * Cell used by the ITTextField control.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2003 iThink Software.
* NSWindow subclass for quick display of status information.
* Similar to volume/brightness/eject bezel key windows.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
- * Contributor : Kent Sutherland <joseph.spiros@ithinksw.com>
+ * Contributor : Kent Sutherland <kent.sutherland@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
* ITWindowEffect
* Protocal and abstract superclass for performing effects on windows.
*
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.
* All Rights Reserved
* ITWindowPositioning
* Protocol which defines methods for window positioning presets.
*
- * Original Author : Kent Sutherland <joseph.spiros@ithinksw.com>
- * Original Author : Matt Judy <mjudy@ithinksw.com>
- * Responsibility : Matt Judy <mjudy@ithinksw.com>
+ * Original Author : Matthew Judy <mjudy@ithinksw.com>
+ * Responsibility : Matthew Judy <mjudy@ithinksw.com>
* Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
*
* Copyright (c) 2002 - 2003 iThink Software.