Huge audit of ITKit, mostly everything has been updated to current coding
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 3 Mar 2005 16:14:08 +0000 (16:14 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 3 Mar 2005 16:14:08 +0000 (16:14 +0000)
style and I've removed things that we don't need/that don't belong in ITKit
anymore. The only things really left untouched are the class files for
anything related to ITTSW.

91 files changed:
Deprecated/ITChasingArrow1.tiff [deleted file]
Deprecated/ITChasingArrow10.tiff [deleted file]
Deprecated/ITChasingArrow2.tiff [deleted file]
Deprecated/ITChasingArrow3.tiff [deleted file]
Deprecated/ITChasingArrow4.tiff [deleted file]
Deprecated/ITChasingArrow5.tiff [deleted file]
Deprecated/ITChasingArrow6.tiff [deleted file]
Deprecated/ITChasingArrow7.tiff [deleted file]
Deprecated/ITChasingArrow8.tiff [deleted file]
Deprecated/ITChasingArrow9.tiff [deleted file]
Deprecated/ITChasingArrowsView.h [deleted file]
Deprecated/ITChasingArrowsView.m [deleted file]
Graphics/URLTextViewHand.tiff [deleted file]
ITBevelView.h [changed mode: 0755->0644]
ITBevelView.m [changed mode: 0755->0644]
ITButton.h [changed mode: 0755->0644]
ITButton.m [changed mode: 0755->0644]
ITButtonCell.h [changed mode: 0755->0644]
ITButtonCell.m [changed mode: 0755->0644]
ITCategory-NSMenu.h [changed mode: 0755->0644]
ITCategory-NSMenu.m [changed mode: 0755->0644]
ITCategory-NSView.h [changed mode: 0755->0644]
ITCategory-NSView.m [changed mode: 0755->0644]
ITCoreGraphicsHacks.h [changed mode: 0755->0644]
ITCutWindowEffect.h [changed mode: 0755->0644]
ITCutWindowEffect.m [changed mode: 0755->0644]
ITDissolveWindowEffect.h [changed mode: 0755->0644]
ITDissolveWindowEffect.m [changed mode: 0755->0644]
ITHotKey.h [changed mode: 0755->0644]
ITHotKey.m [changed mode: 0755->0644]
ITHotKeyCenter.h [changed mode: 0755->0644]
ITHotKeyCenter.m [changed mode: 0755->0644]
ITIconAndTextStatusWindow.h [changed mode: 0755->0644]
ITIconAndTextStatusWindow.m [changed mode: 0755->0644]
ITImageCell.h [changed mode: 0755->0644]
ITImageCell.m [changed mode: 0755->0644]
ITImageView.h [changed mode: 0755->0644]
ITImageView.m [changed mode: 0755->0644]
ITKeyBroadcaster.h [changed mode: 0755->0644]
ITKeyBroadcaster.m [changed mode: 0755->0644]
ITKeyCombo.h [changed mode: 0755->0644]
ITKeyCombo.m [changed mode: 0755->0644]
ITKeyComboPanel.h [changed mode: 0755->0644]
ITKeyComboPanel.m [changed mode: 0755->0644]
ITKit.h [changed mode: 0755->0644]
ITKit.xcode/project.pbxproj [changed mode: 0755->0644]
ITMacResource.h [deleted file]
ITMacResource.m [deleted file]
ITMacResourceFile.h [deleted file]
ITMacResourceFile.m [deleted file]
ITMultilineTextFieldCell.h [changed mode: 0755->0644]
ITMultilineTextFieldCell.m [changed mode: 0755->0644]
ITPivotWindowEffect.h [changed mode: 0755->0644]
ITPivotWindowEffect.m [changed mode: 0755->0644]
ITSlideHorizontallyWindowEffect.h [changed mode: 0755->0644]
ITSlideHorizontallyWindowEffect.m [changed mode: 0755->0644]
ITSlideVerticallyWindowEffect.h [changed mode: 0755->0644]
ITSlideVerticallyWindowEffect.m [changed mode: 0755->0644]
ITSpinAndZoomWindowEffect.h [changed mode: 0755->0644]
ITSpinAndZoomWindowEffect.m [changed mode: 0755->0644]
ITSpinWindowEffect.h [changed mode: 0755->0644]
ITSpinWindowEffect.m [changed mode: 0755->0644]
ITSplashScreen.h
ITSplashScreen.m
ITSplashView.h
ITSplashView.m
ITSplashWindow.h
ITSplashWindow.m
ITStatusItem.h [changed mode: 0755->0644]
ITStatusItem.m [changed mode: 0755->0644]
ITStringMacResource.h [deleted file]
ITStringMacResource.m [deleted file]
ITTSWBackgroundView.h [changed mode: 0755->0644]
ITTSWBackgroundView.m [changed mode: 0755->0644]
ITTabView.h [changed mode: 0755->0644]
ITTabView.m [changed mode: 0755->0644]
ITTableCornerView.h [changed mode: 0755->0644]
ITTableCornerView.m [changed mode: 0755->0644]
ITTableView.h [changed mode: 0755->0644]
ITTableView.m [changed mode: 0755->0644]
ITTextField.h [changed mode: 0755->0644]
ITTextField.m [changed mode: 0755->0644]
ITTextFieldCell.h [changed mode: 0755->0644]
ITTextFieldCell.m [changed mode: 0755->0644]
ITTransientStatusWindow.h [changed mode: 0755->0644]
ITTransientStatusWindow.m [changed mode: 0755->0644]
ITWindowEffect.h [changed mode: 0755->0644]
ITWindowEffect.m [changed mode: 0755->0644]
ITWindowPositioning.h [changed mode: 0755->0644]
ITZoomWindowEffect.h [changed mode: 0755->0644]
ITZoomWindowEffect.m [changed mode: 0755->0644]

diff --git a/Deprecated/ITChasingArrow1.tiff b/Deprecated/ITChasingArrow1.tiff
deleted file mode 100755 (executable)
index 2c87a94..0000000
Binary files a/Deprecated/ITChasingArrow1.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow10.tiff b/Deprecated/ITChasingArrow10.tiff
deleted file mode 100755 (executable)
index 0a27697..0000000
Binary files a/Deprecated/ITChasingArrow10.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow2.tiff b/Deprecated/ITChasingArrow2.tiff
deleted file mode 100755 (executable)
index abda131..0000000
Binary files a/Deprecated/ITChasingArrow2.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow3.tiff b/Deprecated/ITChasingArrow3.tiff
deleted file mode 100755 (executable)
index 37a3d6b..0000000
Binary files a/Deprecated/ITChasingArrow3.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow4.tiff b/Deprecated/ITChasingArrow4.tiff
deleted file mode 100755 (executable)
index 5653961..0000000
Binary files a/Deprecated/ITChasingArrow4.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow5.tiff b/Deprecated/ITChasingArrow5.tiff
deleted file mode 100755 (executable)
index 5e6a93d..0000000
Binary files a/Deprecated/ITChasingArrow5.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow6.tiff b/Deprecated/ITChasingArrow6.tiff
deleted file mode 100755 (executable)
index 5aed596..0000000
Binary files a/Deprecated/ITChasingArrow6.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow7.tiff b/Deprecated/ITChasingArrow7.tiff
deleted file mode 100755 (executable)
index f10726f..0000000
Binary files a/Deprecated/ITChasingArrow7.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow8.tiff b/Deprecated/ITChasingArrow8.tiff
deleted file mode 100755 (executable)
index a1ac918..0000000
Binary files a/Deprecated/ITChasingArrow8.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrow9.tiff b/Deprecated/ITChasingArrow9.tiff
deleted file mode 100755 (executable)
index f00c467..0000000
Binary files a/Deprecated/ITChasingArrow9.tiff and /dev/null differ
diff --git a/Deprecated/ITChasingArrowsView.h b/Deprecated/ITChasingArrowsView.h
deleted file mode 100755 (executable)
index 6ef2844..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *     ITKit
- *  ITChasingArrowsView
- *    Animating Asynchronous Arrows Widget
- *    *** DEPRECATED: NSProgressIndicator now offers an async mode.  MLJ - 01/14/2003
- *
- *  Original Author : Doug Brown <...>
- *   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>
-
-
-@interface ITChasingArrowsView : NSView
-{
-    BOOL running, inForeground;
-    int curIndex;
-    NSTimer *timer;
-    NSArray *images;
-}
-
-- (IBAction)stop:(id)sender;
-- (IBAction)start:(id)sender;
-
-
-@end
diff --git a/Deprecated/ITChasingArrowsView.m b/Deprecated/ITChasingArrowsView.m
deleted file mode 100755 (executable)
index b903182..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-#import "ITChasingArrowsView.h"
-
-
-@implementation ITChasingArrowsView
-
-- (id)initWithCoder:(NSCoder *)decoder
-{
-    self = [super initWithCoder:decoder];
-
-    running = NO;
-
-    images = [[decoder decodeObject] retain];
-
-    curIndex = 0;
-    timer = nil;
-    
-    return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder
-{
-    [super encodeWithCoder:coder];
-    
-    [coder encodeObject:images];
-}
-
-- (id)initWithFrame:(NSRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        NSBundle *bund = [NSBundle bundleForClass:[self class]];
-        running = NO;
-        images = [[NSArray alloc] initWithObjects:
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow1.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow2.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow3.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow4.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow5.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow6.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow7.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow8.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow9.tiff"]] autorelease],
-            [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow10.tiff"]] autorelease],
-            nil];
-        
-        curIndex = 0;
-        timer = nil;
-    }
-    return self;
-}
-
-- (void)dealloc
-{
-    if (timer)
-    {
-        [timer invalidate];
-        [timer release];
-        timer = nil;
-    }
-    [images release];
-    
-    [super dealloc];
-}
-- (void)drawRect:(NSRect)rect {
-
-    if (running)
-    {
-        NSImage *curImage = [images objectAtIndex:curIndex];
-        float amt;
-        if (inForeground)
-        {
-            amt = 1.0;
-        }
-        else
-        {
-            amt = 0.5;
-        }
-        [curImage compositeToPoint:NSMakePoint(0,0) operation:NSCompositeSourceOver fraction:amt];
-    }
-    else
-    {
-        // draw nothing.
-    }
-}
-
-- (IBAction)stop:(id)sender
-{
-    running = NO;
-
-    if (timer)
-    {
-        NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
-        [nc removeObserver:self];
-        [timer invalidate];
-        [timer release];
-        timer = nil;
-    }
-    
-    [self setNeedsDisplay:YES];
-}
-    
-- (IBAction)start:(id)sender
-{
-    if (!timer)
-    {
-        NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
-        [nc addObserver:self selector:@selector(appWentToBackground:) name:NSApplicationWillResignActiveNotification object:nil];
-        [nc addObserver:self selector:@selector(appWentToForeground:) name:NSApplicationWillBecomeActiveNotification object:nil];
-        [nc addObserver:self selector:@selector(windowWentToBackground:) name:NSWindowDidResignMainNotification object:nil];
-        [nc addObserver:self selector:@selector(windowWentToForeground:) name:NSWindowDidBecomeMainNotification object:nil];
-        inForeground = ([NSApp isActive] && [[self window] isMainWindow]);
-        curIndex = 0;
-        running = YES;
-        timer = [[NSTimer scheduledTimerWithTimeInterval:0.05
-                                                  target:self
-                                                selector:@selector(showNewImage:)
-                                                userInfo:nil
-                                                 repeats:YES] retain];
-        [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSEventTrackingRunLoopMode];
-    }
-}
-
-- (void)showNewImage:(NSTimer *)t
-{
-    [self setNeedsDisplay:YES];
-
-    if (curIndex == 9)
-    {
-        curIndex = 0;
-    }
-    else
-    {
-        curIndex++;
-    }
-}
-
-- (void)appWentToBackground:(NSNotification *)note
-{
-    inForeground = NO;
-}
-
-- (void)appWentToForeground:(NSNotification *)note
-{
-    inForeground = YES;
-}
-
-- (void)windowWentToBackground:(NSNotification *)note
-{
-    NSWindow *window = [note object];
-    if (window == [self window])
-    {
-        inForeground = NO;
-    }
-}
-
-- (void)windowWentToForeground:(NSNotification *)note
-{
-    NSWindow *window = [note object];
-    if (window == [self window])
-    {
-        inForeground = YES;
-    }
-}
-
-
-@end
diff --git a/Graphics/URLTextViewHand.tiff b/Graphics/URLTextViewHand.tiff
deleted file mode 100755 (executable)
index 37a9783..0000000
Binary files a/Graphics/URLTextViewHand.tiff and /dev/null differ
old mode 100755 (executable)
new mode 100644 (file)
index e582c2e..f7141d2
@@ -1,31 +1,24 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITBevelView
- *    NSView subclass which draws a bevel.
+ *     ITBevelView.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     NSView subclass which draws a bevel of specified thickness, and resizes its
+ *             first subview to fill the remaining space.
  *
  *
- *  Copyright (c) 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-/*
- *     Draws a bevel of specified thickness, and resizes
- *  its first subview to fill the remaining space.
- */
-
-
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
-
 @interface ITBevelView : NSView {
 @interface ITBevelView : NSView {
-    int  _bevelDepth;
+       int _bevelDepth;
 }
 
 - (int)bevelDepth;
 - (void)setBevelDepth:(int)newDepth;
 
 }
 
 - (int)bevelDepth;
 - (void)setBevelDepth:(int)newDepth;
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index d5beb0d..09cb89f
 #import "ITBevelView.h"
 
 #import "ITBevelView.h"
 
-
 @implementation ITBevelView
 
 @implementation ITBevelView
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark INITIALIZATION METHODS
-/*************************************************************************/
-
-- (id)initWithFrame:(NSRect)frameRect
-{
-    if ( (self = [super initWithFrame:frameRect]) ) {
-        _bevelDepth = 5;
-        [self setAutoresizesSubviews:NO];
-    }
-    
-    return self;
+- (id)initWithFrame:(NSRect)frameRect {
+       if ((self = [super initWithFrame:frameRect])) {
+               _bevelDepth = 5;
+               [self setAutoresizesSubviews:NO];
+       }
+       return self;
 }
 
 }
 
-- (id)initWithCoder:(NSCoder *)coder
-{
-    if ( ( self = [super initWithCoder:coder] ) ) {
-        _bevelDepth = 5;
-        [self setAutoresizesSubviews:NO];
-    }
-
-    return self;
+- (id)initWithCoder:(NSCoder *)coder {
+       if ((self = [super initWithCoder:coder])) {
+               _bevelDepth = 5;
+               [self setAutoresizesSubviews:NO];
+       }
+       return self;
 }
 
 }
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark ACCESSOR METHODS
-/*************************************************************************/
-
-- (int)bevelDepth
-{
-    return _bevelDepth;
+- (int)bevelDepth {
+       return _bevelDepth;
 }
 
 }
 
-- (void)setBevelDepth:(int)newDepth
-{
-    _bevelDepth = newDepth;
-    [self setNeedsDisplay:YES];
+- (void)setBevelDepth:(int)newDepth {
+       _bevelDepth = newDepth;
+       [self setNeedsDisplay:YES];
 }
 
 }
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark INSTANCE METHODS
-/*************************************************************************/
-
-- (void)drawRect:(NSRect)aRect
-{
-    NSRect frameRect = [self convertRect:[self frame] fromView:[self superview]];
-    NSRect innerRect = NSMakeRect( (frameRect.origin.x + _bevelDepth),
-                                   (frameRect.origin.y + _bevelDepth),
-                                   (frameRect.size.width  - (_bevelDepth * 2)),
-                                   (frameRect.size.height - (_bevelDepth * 2)) );
-
-    NSBezierPath *leftEdge   = [NSBezierPath bezierPath];
-    NSBezierPath *topEdge    = [NSBezierPath bezierPath];
-    NSBezierPath *rightEdge  = [NSBezierPath bezierPath];
-    NSBezierPath *bottomEdge = [NSBezierPath bezierPath];
-
-    [[[self subviews] objectAtIndex:0] setFrame:innerRect];
-    
-    [leftEdge moveToPoint:frameRect.origin];
-    [leftEdge lineToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)];
-    [leftEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth) )];
-    [leftEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth) )];
-
-    [topEdge moveToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)];
-    [topEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)];
-    [topEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth) )];
-    [topEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth) )];
-
-    [rightEdge moveToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)];
-    [rightEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)];
-    [rightEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth) )];
-    [rightEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (_bevelDepth) )];
-
-    [bottomEdge moveToPoint:frameRect.origin];
-    [bottomEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)];
-    [bottomEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (_bevelDepth) )];
-    [bottomEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth) )];
-
-    [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set];
-    [leftEdge fill];
-    [[NSColor colorWithCalibratedWhite:0.0 alpha:0.5] set];
-    [topEdge fill];
-    [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set];
-    [rightEdge fill];
-    [[NSColor colorWithCalibratedWhite:1.0 alpha:0.6] set];
-    [bottomEdge fill];
-
-    [[[self subviews] objectAtIndex:0] setNeedsDisplay:YES];
+- (void)drawRect:(NSRect)aRect {
+       NSRect frameRect = [self convertRect:[self frame] fromView:[self superview]];
+       NSRect innerRect = NSMakeRect((frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth), (frameRect.size.width - (_bevelDepth * 2)), (frameRect.size.height - (_bevelDepth * 2)));
+
+       NSBezierPath *leftEdge = [NSBezierPath bezierPath];
+       NSBezierPath *topEdge = [NSBezierPath bezierPath];
+       NSBezierPath *rightEdge = [NSBezierPath bezierPath];
+       NSBezierPath *bottomEdge = [NSBezierPath bezierPath];
+
+       [[[self subviews] objectAtIndex:0] setFrame:innerRect];
+
+       [leftEdge moveToPoint:frameRect.origin];
+       [leftEdge lineToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)];
+       [leftEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth))];
+       [leftEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth))];
+
+       [topEdge moveToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)];
+       [topEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)];
+       [topEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth))];
+       [topEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth))];
+
+       [rightEdge moveToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)];
+       [rightEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)];
+       [rightEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth))];
+       [rightEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), _bevelDepth)];
+
+       [bottomEdge moveToPoint:frameRect.origin];
+       [bottomEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)];
+       [bottomEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), _bevelDepth)];
+       [bottomEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth))];
+
+       [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set];
+       [leftEdge fill];
+       [[NSColor colorWithCalibratedWhite:0.0 alpha:0.5] set];
+       [topEdge fill];
+       [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set];
+       [rightEdge fill];
+       [[NSColor colorWithCalibratedWhite:1.0 alpha:0.6] set];
+       [bottomEdge fill];
+
+       [[[self subviews] objectAtIndex:0] setNeedsDisplay:YES];
 }
 
 }
 
-- (BOOL)mouseDownCanMoveWindow
-{
-    return NO;
+- (BOOL)mouseDownCanMoveWindow {
+       return NO;
 }
 
 }
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark DEALLOCATION METHOD
-/*************************************************************************/
-
-- (void)dealloc
-{
+- (void)dealloc {
        [super dealloc];
 }
 
        [super dealloc];
 }
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 618437d..e97435c
@@ -1,23 +1,20 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITButton
- *    Stylized button for use in Status Windows.
+ *     ITButton.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     Custom NSButton subclass that uses ITButtonCell.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
-
 @interface ITButton : NSButton {
 
 }
 
 @interface ITButton : NSButton {
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 7a81312..276db25
@@ -1,51 +1,40 @@
 #import "ITButton.h"
 #import "ITButtonCell.h"
 
 #import "ITButton.h"
 #import "ITButtonCell.h"
 
-
 @implementation ITButton
 
 @implementation ITButton
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark INITIALIZATION METHODS
-/*************************************************************************/
-
-+ (void)initialize
-{
-    if ( self == [ITButton class] ) {
-        [self setCellClass:[ITButtonCell class]];
-    }
++ (void)initialize {
+       if (self == [ITButton class]) {
+               [self setCellClass:[ITButtonCell class]];
+       }
 }
 
 }
 
-+ (Class)cellClass
-{
-    return [ITButtonCell class];
++ (Class)cellClass {
+       return [ITButtonCell class];
 }
 
 - (void)displayIfNeeded {
 }
 
 - (void)displayIfNeeded {
-    [super displayIfNeededIgnoringOpacity];
+       [super displayIfNeededIgnoringOpacity];
 }
 
 - (void)displayIfNeededInRect:(NSRect)aRect {
 }
 
 - (void)displayIfNeededInRect:(NSRect)aRect {
-    [super displayIfNeededInRectIgnoringOpacity:aRect];
+       [super displayIfNeededInRectIgnoringOpacity:aRect];
 }
 
 - (void)displayRect:(NSRect)aRect {
 }
 
 - (void)displayRect:(NSRect)aRect {
-    [super displayRectIgnoringOpacity:aRect];
+       [super displayRectIgnoringOpacity:aRect];
 }
 
 }
 
-- (id)initWithCoder:(NSCoder *)coder
-{
-    if ( ( self = [super initWithCoder:coder] ) ) {
-        ITButtonCell *cell = [[ITButtonCell alloc] init];
-        [self setCell:cell];
-    }
-    return self;
+- (id)initWithCoder:(NSCoder *)coder {
+       if ((self = [super initWithCoder:coder])) {
+               ITButtonCell *cell = [[ITButtonCell alloc] init];
+               [self setCell:cell];
+       }
+       return self;
 }
 
 }
 
-- (BOOL)isOpaque
-{
-    return NO;
+- (BOOL)isOpaque {
+       return NO;
 }
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index e99ef10..5cea59d
@@ -1,31 +1,25 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITButtonCell
- *    Cell used by the ITButton control.
+ *     ITButtonCell.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     Custom NSButtonCell subclass that provides a stylized bezel style for use
+ *             with ITStatusWindows.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
-
 typedef enum _ITBezelStyle {
 typedef enum _ITBezelStyle {
-    ITGrayRoundedBezelStyle  = 1001
+       ITGrayRoundedBezelStyle = 1001
 } ITBezelStyle;
 
 } ITBezelStyle;
 
-
 @interface ITButtonCell : NSButtonCell {
 @interface ITButtonCell : NSButtonCell {
-
-    ITBezelStyle _subStyle;
-
+       ITBezelStyle _subStyle;
 }
 
 }
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 30ac956..11e8e95
 #import "ITButtonCell.h"
 #import "ITButtonCell.h"
-#import "ITTextFieldCell.h"
-
 
 #define GRAY_EXTRA_PAD_H 60.0
 
 
 #define GRAY_EXTRA_PAD_H 60.0
 
-
 @interface ITButtonCell (Private)
 - (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView;
 @end
 
 @interface ITButtonCell (Private)
 - (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView;
 @end
 
-
 @implementation ITButtonCell
 
 @implementation ITButtonCell
 
-- (id)init
-{
-    if ( ( self = [super init] ) ) {
-        _subStyle = 0;
-    }
-    
-    return self;
+- (id)init {
+       if ((self = [super init])) {
+               _subStyle = 0;
+       }
+       return self;
 }
 
 }
 
-
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark INSTANCE METHODS
-/*************************************************************************/
-
-- (void)setBezelStyle:(NSBezelStyle)bezelStyle
-{
-    if ( bezelStyle == ITGrayRoundedBezelStyle ) {
-        _subStyle  = bezelStyle;
-        bezelStyle = NSRegularSquareBezelStyle;
-    } else {
-        _subStyle = 0;
-    }
-
-    [super setBezelStyle:bezelStyle];
+- (void)setBezelStyle:(NSBezelStyle)bezelStyle {
+       if (bezelStyle == ITGrayRoundedBezelStyle) {
+               _subStyle = bezelStyle;
+               bezelStyle = NSRegularSquareBezelStyle;
+       } else {
+               _subStyle = 0;
+       }
+       [super setBezelStyle:bezelStyle];
 }
 
 }
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark DRAWING METHODS
-/*************************************************************************/
-
-- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView
-{
-    if ( _subStyle == ITGrayRoundedBezelStyle ) {
-        [self drawGrayRoundedBezelWithFrame:rect inView:controlView];
-        if ( [self attributedTitle] ) {
-            NSPoint stringOrigin;
-            NSSize stringSize;
-            stringSize = [[self attributedTitle] size];
-            stringOrigin.x = rect.origin.x + (rect.size.width - stringSize.width)/2;
-            stringOrigin.y = (rect.origin.y + (rect.size.height - stringSize.height)/2) - 2;
-            [controlView lockFocus];
-            [[self attributedTitle] drawAtPoint:stringOrigin];
-            [controlView unlockFocus];
-        } else {
-            [super drawInteriorWithFrame:rect inView:controlView];
-        }
-        [[controlView superview] setNeedsDisplay:YES];
-    } else {
-        [super drawWithFrame:rect inView:controlView];
-    }
+- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView {
+       if (_subStyle == ITGrayRoundedBezelStyle) {
+               [self drawGrayRoundedBezelWithFrame:rect inView:controlView];
+               if ([self attributedTitle]) {
+                       NSPoint stringOrigin;
+                       NSSize stringSize;
+                       stringSize = [[self attributedTitle] size];
+                       stringOrigin.x = rect.origin.x + (rect.size.width - stringSize.width) / 2;
+                       stringOrigin.y = (rect.origin.y + (rect.size.height - stringSize.height) / 2) - 2;
+                       [controlView lockFocus];
+                       [[self attributedTitle] drawAtPoint:stringOrigin];
+                       [controlView unlockFocus];
+               } else {
+                       [super drawInteriorWithFrame:rect inView:controlView];
+               }
+               [[controlView superview] setNeedsDisplay:YES];
+       } else {
+               [super drawWithFrame:rect inView:controlView];
+       }
 }
 
 }
 
-- (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView
-{
-    NSBezierPath *path   = [NSBezierPath bezierPath];
-    float         ch     = rect.size.height;
-    float         cw     = rect.size.width;
-    float         radius = ( ch / 2 );
-    NSPoint       pointA = NSMakePoint( (ch / 2)        , 0.0      );
-    NSPoint       pointB = NSMakePoint( (cw - (ch / 2)) , 0.0      );
-//  NSPoint       pointC = NSMakePoint( (cw - (ch / 2)) , ch       );
-    NSPoint       pointD = NSMakePoint( (ch / 2)        , ch       );
-    NSPoint       lCtr   = NSMakePoint( (ch / 2)        , (ch / 2) );
-    NSPoint       rCtr   = NSMakePoint( (cw - (ch / 2)) , (ch / 2) );
-    float         alpha  = 0.45;
-    
-    [path moveToPoint:pointA];
-    [path lineToPoint:pointB];
-    [path appendBezierPathWithArcWithCenter:rCtr
-                                     radius:radius
-                                 startAngle:270.0
-                                   endAngle:90.0];
-    [path lineToPoint:pointD];
-    [path appendBezierPathWithArcWithCenter:lCtr
-                                     radius:radius
-                                 startAngle:90.0
-                                   endAngle:270.0];
-
-    if ( [self isHighlighted] ) {
-        alpha = 0.60;
-    }
-    
-    [[NSColor colorWithCalibratedWhite:0.15 alpha:alpha] set];
-    [path fill];
+- (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView {
+       NSBezierPath *path = [NSBezierPath bezierPath];
+       float ch = rect.size.height;
+       float cw = rect.size.width;
+       float radius = (ch / 2);
+       NSPoint pointA = NSMakePoint((ch / 2), 0.0);
+       NSPoint pointB = NSMakePoint((cw - (ch / 2)), 0.0);
+//     NSPoint pointC = NSMakePoint((cw - (ch / 2)), ch);
+       NSPoint pointD = NSMakePoint((ch / 2), ch);
+       NSPoint lCtr = NSMakePoint((ch / 2), (ch / 2));
+       NSPoint rCtr = NSMakePoint((cw - (ch / 2)), (ch / 2));
+       float alpha = 0.45;
+       
+       [path moveToPoint:pointA];
+       [path lineToPoint:pointB];
+       [path appendBezierPathWithArcWithCenter:rCtr radius:radius startAngle:270.0 endAngle:90.0];
+       [path lineToPoint:pointD];
+       [path appendBezierPathWithArcWithCenter:lCtr radius:radius startAngle:90.0 endAngle:270.0];
+       
+       if ([self isHighlighted]) {
+               alpha = 0.60;
+       }
+       
+       [[NSColor colorWithCalibratedWhite:0.15 alpha:alpha] set];
+       [path fill];
 }
 
 }
 
-- (BOOL)isOpaque
-{
-    return NO;
+- (BOOL)isOpaque {
+       return NO;
 }
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 2a4870e..aecbe8e
@@ -1,21 +1,18 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITCategory-NSMenu.h
- *    Category which extends NSMenu
+ *     ITCategory-NSMenu.h
  *
  *
- *  Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- *  Copyright (c) 2002 - 2004 iThink Software.
- *  All Rights Reserved
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import <Carbon/Carbon.h>
 
 #import <Cocoa/Cocoa.h>
 #import <Carbon/Carbon.h>
 
-@interface NSMenu (ITCategory)
+@interface NSMenu (ITKitCategory)
 
 - (void)indentItem:(id <NSMenuItem>)item;
 - (void)indentItemAtIndex:(int)index;
 
 - (void)indentItem:(id <NSMenuItem>)item;
 - (void)indentItemAtIndex:(int)index;
@@ -24,4 +21,4 @@
 - (MenuRef)menuRef;
 - (void)removeAllItems;
 
 - (MenuRef)menuRef;
 - (void)removeAllItems;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 80501bf..69d3c61
@@ -1,13 +1,18 @@
 #import "ITCategory-NSMenu.h"
 
 #import "ITCategory-NSMenu.h"
 
-@interface NSMenu (HACKHACKHACKHACK)
+extern void _NSGetMenuItemForCommandKeyEvent(NSMenu *menu, void *chicken, void *taco, void *food); 
+extern MenuRef _NSGetCarbonMenu(NSMenu *menu);
+
+@interface NSMenu (ITKitCategoryHacks)
 - (id)_menuImpl;
 @end
 
 - (id)_menuImpl;
 @end
 
-extern void _NSGetMenuItemForCommandKeyEvent (NSMenu *menu, void *chicken, void *taco, void *food); 
-extern MenuRef _NSGetCarbonMenu( NSMenu *menu);
+@protocol _ITKitCategoryNSMenuItemPantherCompatability <NSMenuItem>
+- (int)indentationLevel;
+- (void)setIndentationLevel:(int)indentationLevel;
+@end
 
 
-@implementation NSMenu (ITCategory)
+@implementation NSMenu (ITKitCategory)
 
 - (void)indentItem:(id <NSMenuItem>)item {
     [self indentItem:item toLevel:1];
 
 - (void)indentItem:(id <NSMenuItem>)item {
     [self indentItem:item toLevel:1];
@@ -22,8 +27,9 @@ extern MenuRef _NSGetCarbonMenu( NSMenu *menu);
 }
 
 - (void)indentItemAtIndex:(int)index toLevel:(int)indentLevel {
 }
 
 - (void)indentItemAtIndex:(int)index toLevel:(int)indentLevel {
-    if ([[self itemAtIndex:index] respondsToSelector:@selector(setIndentationLevel:)]) {
-        (void)[[self itemAtIndex:index] setIndentationLevel:indentLevel];
+       id <NSMenuItem> theItem = [self itemAtIndex:index];
+    if ([theItem respondsToSelector:@selector(setIndentationLevel:)]) {
+        [(id <_ITKitCategoryNSMenuItemPantherCompatability>)theItem setIndentationLevel:indentLevel];
     } else {
         MenuRef carbonMenu = [self menuRef];
         if (carbonMenu) {
     } else {
         MenuRef carbonMenu = [self menuRef];
         if (carbonMenu) {
@@ -36,7 +42,7 @@ extern MenuRef _NSGetCarbonMenu( NSMenu *menu);
     MenuRef carbonMenu;
     int w00t, m00f;
     
     MenuRef carbonMenu;
     int w00t, m00f;
     
-    if( [self respondsToSelector:@selector(_menuImpl)] ) {
+    if ([self respondsToSelector:@selector(_menuImpl)]) {
         (void)[self _menuImpl];
     } else {
         return nil;
         (void)[self _menuImpl];
     } else {
         return nil;
@@ -57,4 +63,4 @@ extern MenuRef _NSGetCarbonMenu( NSMenu *menu);
        }
 }
 
        }
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 3f0c047..0b41f97
@@ -1,23 +1,19 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITCategory-NSView.h
- *    Category which extends NSView
+ *     ITCategory-NSView.h
  *
  *
- *  Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- *  Copyright (c) 2002 - 2004 iThink Software.
- *  All Rights Reserved
+ *     $Id$
  *
  */
  *
  */
-#import <AppKit/AppKit.h>
 
 
+#import <Cocoa/Cocoa.h>
 
 
-@interface NSView (ITCategory)
+@interface NSView (ITKitCategory)
 
 - (void)removeAllSubviews;
 - (void)removeSubview:(NSView *)subview;
 
 
 - (void)removeAllSubviews;
 - (void)removeSubview:(NSView *)subview;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 8c6ed90..be4332b
@@ -1,7 +1,6 @@
 #import "ITCategory-NSView.h"
 
 #import "ITCategory-NSView.h"
 
-
-@implementation NSView (ITCategory)
+@implementation NSView (ITKitCategory)
 
 - (void)removeAllSubviews {
     [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];
 
 - (void)removeAllSubviews {
     [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];
@@ -13,4 +12,4 @@
        }
 }
 
        }
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index a07942b..c77185d
@@ -1,62 +1,48 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITCoreGraphicsHacks
- *    Header to import to work with private CoreGraphics API
+ *     ITCoreGraphicsHacks.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Header to import to work with private CoreGraphics API.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark CoreGraphics HACK HACK HACK
-/*************************************************************************/
-
 typedef void * CGSGenericObj;
 typedef CGSGenericObj CGSValueObj;
 typedef void * CGSConnectionID;
 typedef void * CGSWindowID;
 typedef struct CGStyle *CGStyleRef;
 typedef struct CGShadowStyle {
 typedef void * CGSGenericObj;
 typedef CGSGenericObj CGSValueObj;
 typedef void * CGSConnectionID;
 typedef void * CGSWindowID;
 typedef struct CGStyle *CGStyleRef;
 typedef struct CGShadowStyle {
-    unsigned int version;
-    float elevation;
-    float azimuth;
-    float ambient;
-    float height;
-    float radius;
-    float saturation;
+       unsigned int version;
+       float elevation;
+       float azimuth;
+       float ambient;
+       float height;
+       float radius;
+       float saturation;
 } CGShadowStyle;
 typedef unsigned char CGSBoolean;
 enum {
 } CGShadowStyle;
 typedef unsigned char CGSBoolean;
 enum {
-    kCGSFalse = 0,
-    kCGSTrue  = 1
+       kCGSFalse = 0,
+       kCGSTrue = 1
 };
 
 };
 
-extern void        CGStyleRelease(CGStyleRef style);
-extern void        CGSReleaseObj(void *obj);
-extern void        CGContextSetStyle(CGContextRef c, CGStyleRef style);
-extern void        CGStyleRelease(CGStyleRef style);
-extern CGStyleRef  CGStyleCreateShadow(const CGShadowStyle *shadow);
+extern void CGStyleRelease(CGStyleRef style);
+extern void CGSReleaseObj(void *obj);
+extern void CGContextSetStyle(CGContextRef c, CGStyleRef style);
+extern void CGStyleRelease(CGStyleRef style);
+extern CGStyleRef CGStyleCreateShadow(const CGShadowStyle *shadow);
 extern CGSValueObj CGSCreateCString(const char *string);
 extern CGSValueObj CGSCreateBoolean(CGSBoolean boolean);
 extern CGSValueObj CGSCreateCString(const char *string);
 extern CGSValueObj CGSCreateBoolean(CGSBoolean boolean);
-extern CGError     CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value);
-                                        
+extern CGError CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value);
+
 extern CGError CGSSetWindowWarp(const CGSConnectionID cid, CGSWindowID wid, int w,int h, float *mesh);
 extern CGError CGSSetWindowTransform(const CGSConnectionID cid, CGSWindowID wid, CGAffineTransform transform);
 
 extern CGError CGSSetWindowWarp(const CGSConnectionID cid, CGSWindowID wid, int w,int h, float *mesh);
 extern CGError CGSSetWindowTransform(const CGSConnectionID cid, CGSWindowID wid, CGAffineTransform transform);
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark NSApplication HACK HACK HACK
-/*************************************************************************/
-
-@interface NSApplication (HACKHACKHACKHACK)
+@interface NSApplication (ITCoreGraphicsHacks)
 - (CGSConnectionID)contextID;
 - (CGSConnectionID)contextID;
-@end
-
-
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index fe53fc1..ad43a4f
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITCutWindowEffect
- *    Effect subclass which performs a simple cut in or out, with no transition.
+ *     ITCutWindowEffect.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Effect subclass which performs a simple cut in or out, with no transition.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITCutWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITCutWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index ebc6342..73cdfae
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITDissolveWindowEffect
- *    Effect subclass which performs a dissolve fade effect on a window.
+ *     ITDissolveWindowEffect.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Effect subclass which performs a dissolve fade effect on a window.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITDissolveWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITDissolveWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 7910081..453886a
@@ -1,42 +1,38 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITHotKey
+ *     ITHotKey.h
  *
  *
- *  Original Author : Quentin Carnicelli <...>
- *   Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     $Id$
  *
  */
 
  *
  */
 
+#import <Cocoa/Cocoa.h>
 
 
-#import <Foundation/Foundation.h>
-#import "ITKeyCombo.h"
+@class ITKeyCombo;
 
 
-
-@interface ITHotKey : NSObject
-{
-       NSString*               mName;
-       ITKeyCombo*             mKeyCombo;
-       id                              mTarget;
-       SEL                             mAction;
+@interface ITHotKey : NSObject {
+       NSString *mName;
+       ITKeyCombo *mKeyCombo;
+       id mTarget;
+       SEL mAction;
 }
 
 - (id)init;
 
 }
 
 - (id)init;
 
-- (void)setName: (NSString*)name;
-- (NSString*)name;
+- (void)setName:(NSString *)name;
+- (NSString *)name;
 
 
-- (void)setKeyCombo: (ITKeyCombo*)combo;
-- (ITKeyCombo*)keyCombo;
+- (void)setKeyCombo:(ITKeyCombo *)combo;
+- (ITKeyCombo *)keyCombo;
 
 
-- (void)setTarget: (id)target;
+- (void)setTarget:(id)target;
 - (id)target;
 - (id)target;
-- (void)setAction: (SEL)action;
+- (void)setAction:(SEL)action;
 - (SEL)action;
 
 - (void)invoke;
 
 - (SEL)action;
 
 - (void)invoke;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 0e2ddc3..940223d
@@ -1,91 +1,61 @@
-//
-//  ITHotKey.m
-//
-//  Created by Quentin Carnicelli on Sat Aug 02 2003.
-//  Copyright (c) 2003 iThink Software. All rights reserved.
-//
-
 #import "ITHotKey.h"
 #import "ITHotKey.h"
-
-#import "ITHotKeyCenter.h"
 #import "ITKeyCombo.h"
 
 @implementation ITHotKey
 
 #import "ITKeyCombo.h"
 
 @implementation ITHotKey
 
-- (id)init
-{
-       if ( (self = [super init]) )
-       {
-               [self setKeyCombo: [ITKeyCombo clearKeyCombo]];
+- (id)init {
+       if ((self = [super init])) {
+               [self setKeyCombo:[ITKeyCombo clearKeyCombo]];
        }
        }
-       
        return self;
 }
 
        return self;
 }
 
-- (void)dealloc
-{
+- (void)dealloc {
        [mName release];
        [mKeyCombo release];
        [mName release];
        [mKeyCombo release];
-       
        [super dealloc];
 }
 
        [super dealloc];
 }
 
-- (NSString*)description
-{
-       return [NSString stringWithFormat: @"<%@: %@>",
-        NSStringFromClass( [self class] ),
-        [self keyCombo]];
+- (NSString *)description {
+       return [NSString stringWithFormat:@"<%@: %@>", NSStringFromClass([self class]), [self keyCombo]];
 }
 
 }
 
-#pragma mark -
-
-- (void)setKeyCombo: (ITKeyCombo*)combo
-{
-       [combo retain];
-       [mKeyCombo release];
-       mKeyCombo = combo;
+- (void)setKeyCombo:(ITKeyCombo *)combo {
+       [mKeyCombo autorelease];
+       mKeyCombo = [combo retain];
 }
 
 }
 
-- (ITKeyCombo*)keyCombo
-{
+- (ITKeyCombo *)keyCombo {
        return mKeyCombo;
 }
 
        return mKeyCombo;
 }
 
-- (void)setName: (NSString*)name
-{
-       [name retain];
-       [mName release];
-       mName = name;
+- (void)setName:(NSString *)name {
+       [mName autorelease];
+       mName = [name retain];
 }
 
 }
 
-- (NSString*)name
-{
+- (NSString *)name {
        return mName;
 }
 
        return mName;
 }
 
-- (void)setTarget: (id)target
-{
+- (void)setTarget:(id)target {
        mTarget = target;
 }
 
        mTarget = target;
 }
 
-- (id)target
-{
+- (id)target {
        return mTarget;
 }
 
        return mTarget;
 }
 
-- (void)setAction: (SEL)action
-{
+- (void)setAction:(SEL)action {
        mAction = action;
 }
 
        mAction = action;
 }
 
-- (SEL)action
-{
+- (SEL)action {
        return mAction;
 }
 
        return mAction;
 }
 
-- (void)invoke
-{
-       [mTarget performSelector: mAction withObject: self];
+- (void)invoke {
+       [mTarget performSelector:mAction withObject:self];
 }
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 347110f..153b2ca
@@ -1,28 +1,22 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITHotKeyCenter
+ *     ITHotKeyCenter.h
  *
  *
- *  Original Author : Quentin Carnicelli <...>
- *   Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     $Id$
  *
  */
 
  *
  */
 
-
-#import <AppKit/AppKit.h>
-
+#import <Cocoa/Cocoa.h>
 
 @class ITHotKey;
 
 
 @class ITHotKey;
 
-
-@interface ITHotKeyCenter : NSObject
-{
-       NSMutableDictionary*    mHotKeys; //Keys are NSValue of EventHotKeyRef
-       BOOL                    mEventHandlerInstalled;
-       BOOL                    _enabled;
+@interface ITHotKeyCenter : NSObject {
+       NSMutableDictionary *mHotKeys; //Keys are NSValue of EventHotKeyRef
+       BOOL mEventHandlerInstalled;
+       BOOL _enabled;
 }
 
 + (id)sharedCenter;
 }
 
 + (id)sharedCenter;
 - (BOOL)isEnabled;
 - (void)setEnabled:(BOOL)flag;
 
 - (BOOL)isEnabled;
 - (void)setEnabled:(BOOL)flag;
 
-- (BOOL)registerHotKey: (ITHotKey*)hotKey;
-- (void)unregisterHotKey: (ITHotKey*)hotKey;
-
-- (NSArray*)allHotKeys;
+- (BOOL)registerHotKey:(ITHotKey *)hotKey;
+- (void)unregisterHotKey:(ITHotKey *)hotKey;
 
 
-- (void)sendEvent: (NSEvent*)event;
+- (NSArray *)allHotKeys;
 
 
+- (void)sendEvent:(NSEvent *)event;
 
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 2e43e56..366f15d
-//
-//  ITHotKeyCenter.m
-//
-//  Created by Quentin Carnicelli on Sat Aug 02 2003.
-//  Copyright (c) 2003 iThink Software. All rights reserved.
-//
-
 #import "ITHotKeyCenter.h"
 #import "ITHotKey.h"
 #import "ITKeyCombo.h"
 #import <Carbon/Carbon.h>
 
 #import "ITHotKeyCenter.h"
 #import "ITHotKey.h"
 #import "ITKeyCombo.h"
 #import <Carbon/Carbon.h>
 
-#if __PROTEIN__
-#import "NSObjectAdditions.h"
-#endif
-
 @interface ITHotKeyCenter (Private)
 - (BOOL)_hasCarbonEventSupport;
 
 @interface ITHotKeyCenter (Private)
 - (BOOL)_hasCarbonEventSupport;
 
-- (ITHotKey*)_hotKeyForCarbonHotKey: (EventHotKeyRef)carbonHotKey;
-- (EventHotKeyRef)_carbonHotKeyForHotKey: (ITHotKey*)hotKey;
+- (ITHotKey *)_hotKeyForCarbonHotKey:(EventHotKeyRef)carbonHotKey;
+- (EventHotKeyRef)_carbonHotKeyForHotKey:(ITHotKey *)hotKey;
 
 - (void)_updateEventHandler;
 
 - (void)_updateEventHandler;
-- (void)_hotKeyDown: (ITHotKey*)hotKey;
-- (void)_hotKeyUp: (ITHotKey*)hotKey;
-static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void* refCon );
+- (void)_hotKeyDown:(ITHotKey *)hotKey;
+- (void)_hotKeyUp:(ITHotKey *)hotKey;
+
+static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *refCon);
 @end
 
 @implementation ITHotKeyCenter
 
 @end
 
 @implementation ITHotKeyCenter
 
-static id _sharedHotKeyCenter = nil;
+static ITHotKeyCenter *_sharedHotKeyCenter = nil;
 
 
-+ (id)sharedCenter
-{
-       if( _sharedHotKeyCenter == nil )
-       {
++ (id)sharedCenter {
+       if (!_sharedHotKeyCenter) {
                _sharedHotKeyCenter = [[self alloc] init];
                _sharedHotKeyCenter = [[self alloc] init];
-               #if __PROTEIN__
-                       [_sharedHotKeyCenter releaseOnTerminate];
-               #endif
        }
        }
-       
        return _sharedHotKeyCenter;
 }
 
        return _sharedHotKeyCenter;
 }
 
-- (id)init
-{
-       self = [super init];
-       
-       if( self )
-       {
+- (id)init {
+       if ((self = [super init])) {
                mHotKeys = [[NSMutableDictionary alloc] init];
                _enabled = YES;
        }
                mHotKeys = [[NSMutableDictionary alloc] init];
                _enabled = YES;
        }
-       
        return self;
 }
 
        return self;
 }
 
-- (void)dealloc
-{
+- (void)dealloc {
        [mHotKeys release];
        [super dealloc];
 }
 
        [mHotKeys release];
        [super dealloc];
 }
 
-#pragma mark -
-
-- (BOOL)isEnabled
-{
+- (BOOL)isEnabled {
        return _enabled;
 }
 
        return _enabled;
 }
 
-- (void)setEnabled:(BOOL)flag
-{
+- (void)setEnabled:(BOOL)flag {
        _enabled = flag;
 }
 
        _enabled = flag;
 }
 
-- (BOOL)registerHotKey: (ITHotKey*)hotKey
-{
-       OSStatus err;
+- (BOOL)registerHotKey:(ITHotKey *)hotKey {
        EventHotKeyID hotKeyID;
        EventHotKeyRef carbonHotKey;
        EventHotKeyID hotKeyID;
        EventHotKeyRef carbonHotKey;
-       NSValue* key;
-
-       if( [[self allHotKeys] containsObject: hotKey] == YES )
-               [self unregisterHotKey: hotKey];
+       NSValue *key;
+       
+       if ([[self allHotKeys] containsObject:hotKey]) {
+               [self unregisterHotKey:hotKey];
+       }
        
        
-       if( [[hotKey keyCombo] isValidHotKeyCombo] == NO )
+       if (![[hotKey keyCombo] isValidHotKeyCombo]) {
                return YES;
                return YES;
+       }
        
        hotKeyID.signature = 'PTHk';
        hotKeyID.id = (long)hotKey;
        
        
        hotKeyID.signature = 'PTHk';
        hotKeyID.id = (long)hotKey;
        
-       err = RegisterEventHotKey(  [[hotKey keyCombo] keyCode],
-                                                               [[hotKey keyCombo] modifiers],
-                                                               hotKeyID,
-                                                               GetEventDispatcherTarget(),
-                                                               nil,
-                                                               &carbonHotKey );
-
-       if( err )
+       if (RegisterEventHotKey([[hotKey keyCombo] keyCode], [[hotKey keyCombo] modifiers], hotKeyID, GetEventDispatcherTarget(), nil, &carbonHotKey)) {
                return NO;
                return NO;
-
-       key = [NSValue valueWithPointer: carbonHotKey];
-       [mHotKeys setObject: hotKey forKey: key];
-
+       }
+       
+       key = [NSValue valueWithPointer:carbonHotKey];
+       [mHotKeys setObject:hotKey forKey:key];
+       
        [self _updateEventHandler];
        
        return YES;
 }
 
        [self _updateEventHandler];
        
        return YES;
 }
 
-- (void)unregisterHotKey: (ITHotKey*)hotKey
-{
+- (void)unregisterHotKey:(ITHotKey *)hotKey {
        OSStatus err;
        EventHotKeyRef carbonHotKey;
        OSStatus err;
        EventHotKeyRef carbonHotKey;
-       NSValuekey;
-
-       if( [[self allHotKeys] containsObject: hotKey] == NO )
+       NSValue *key;
+       
+       if (![[self allHotKeys] containsObject:hotKey]) {
                return;
                return;
+       }
        
        
-       carbonHotKey = [self _carbonHotKeyForHotKey: hotKey];
-       NSAssert( carbonHotKey != nil, @"" );
-
-       err = UnregisterEventHotKey( carbonHotKey );
-       //Watch as we ignore 'err':
-
-       key = [NSValue valueWithPointer: carbonHotKey];
-       [mHotKeys removeObjectForKey: key];
+       carbonHotKey = [self _carbonHotKeyForHotKey:hotKey];
+       NSAssert(carbonHotKey, @"");
+       
+       err = UnregisterEventHotKey(carbonHotKey);
+       
+       key = [NSValue valueWithPointer:carbonHotKey];
+       [mHotKeys removeObjectForKey:key];
        
        [self _updateEventHandler];
        
        [self _updateEventHandler];
-
-       //See that? Completely ignored
 }
 
 }
 
-- (NSArray*)allHotKeys
-{
+- (NSArray *)allHotKeys {
        return [mHotKeys allValues];
 }
 
        return [mHotKeys allValues];
 }
 
-#pragma mark -
-
-- (BOOL)_hasCarbonEventSupport
-{
-       return floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_1;
+- (BOOL)_hasCarbonEventSupport {
+       return (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_1);
 }
 
 }
 
-- (ITHotKey*)_hotKeyForCarbonHotKey: (EventHotKeyRef)carbonHotKey
-{
-       NSValue* key = [NSValue valueWithPointer: carbonHotKey];
-       return [mHotKeys objectForKey: key];
+- (ITHotKey *)_hotKeyForCarbonHotKey:(EventHotKeyRef)carbonHotKey {
+       NSValue *key = [NSValue valueWithPointer:carbonHotKey];
+       return [mHotKeys objectForKey:key];
 }
 
 }
 
-- (EventHotKeyRef)_carbonHotKeyForHotKey: (ITHotKey*)hotKey
-{
-       NSArray* values;
-       NSValue* value;
+- (EventHotKeyRef)_carbonHotKeyForHotKey:(ITHotKey *)hotKey {
+       NSArray *values;
+       NSValue *value;
        
        
-       values = [mHotKeys allKeysForObject: hotKey];
-       NSAssert( [values count] == 1, @"Failed to find Carbon Hotkey for ITHotKey" );
+       values = [mHotKeys allKeysForObject:hotKey];
+       NSAssert(([values count] == 1), @"Failed to find Carbon Hotkey for ITHotKey");
        
        value = [values lastObject];
        
        return (EventHotKeyRef)[value pointerValue];
 }
 
        
        value = [values lastObject];
        
        return (EventHotKeyRef)[value pointerValue];
 }
 
-- (void)_updateEventHandler
-{
-       if( [self _hasCarbonEventSupport] == NO ) //Don't use event handler on these systems
+- (void)_updateEventHandler {
+       if (![self _hasCarbonEventSupport]) {
                return;
                return;
-
-       if( [mHotKeys count] && mEventHandlerInstalled == NO )
-       {
+       }
+       
+       if ([mHotKeys count] && !mEventHandlerInstalled) {
                EventTypeSpec eventSpec[2] = {
                        { kEventClassKeyboard, kEventHotKeyPressed },
                        { kEventClassKeyboard, kEventHotKeyReleased }
                EventTypeSpec eventSpec[2] = {
                        { kEventClassKeyboard, kEventHotKeyPressed },
                        { kEventClassKeyboard, kEventHotKeyReleased }
-               };    
-
-               InstallEventHandler( GetEventDispatcherTarget(),
-                                                        (EventHandlerProcPtr)hotKeyEventHandler, 
-                                                        2, eventSpec, nil, nil);
-       
+               };
+               
+               InstallEventHandler(GetEventDispatcherTarget(), (EventHandlerProcPtr)hotKeyEventHandler, 2, eventSpec, nil, nil);
+               
                mEventHandlerInstalled = YES;
        }
 }
 
                mEventHandlerInstalled = YES;
        }
 }
 
-- (void)_hotKeyDown: (ITHotKey*)hotKey
-{
+- (void)_hotKeyDown:(ITHotKey *)hotKey {
        [hotKey invoke];
 }
 
        [hotKey invoke];
 }
 
-- (void)_hotKeyUp: (ITHotKey*)hotKey
-{
+- (void)_hotKeyUp:(ITHotKey *)hotKey {
 }
 
 }
 
-- (void)sendEvent: (NSEvent*)event
-{
+- (void)sendEvent:(NSEvent *)event {
        long subType;
        EventHotKeyRef carbonHotKey;
        
        long subType;
        EventHotKeyRef carbonHotKey;
        
@@ -201,84 +154,67 @@ static id _sharedHotKeyCenter = nil;
        }
        
        //We only have to intercept sendEvent to do hot keys on old system versions
        }
        
        //We only have to intercept sendEvent to do hot keys on old system versions
-       if( [self _hasCarbonEventSupport] )
+       if ([self _hasCarbonEventSupport]) {
                return;
                return;
+       }
        
        
-       if( [event type] == NSSystemDefined )
-       {
+       if ([event type] == NSSystemDefined) {
                subType = [event subtype];
                
                subType = [event subtype];
                
-               if( subType == 6 ) //6 is hot key down
-               {
-                       carbonHotKey= (EventHotKeyRef)[event data1]; //data1 is our hot key ref
-                       if( carbonHotKey != nil )
-                       {
-                               ITHotKey* hotKey = [self _hotKeyForCarbonHotKey: carbonHotKey];
-                               [self _hotKeyDown: hotKey];
+               if (subType == 6) { //6 is hot key down
+                       carbonHotKey = (EventHotKeyRef)[event data1]; //data1 is our hot key ref
+                       if (carbonHotKey) {
+                               ITHotKey *hotKey = [self _hotKeyForCarbonHotKey:carbonHotKey];
+                               [self _hotKeyDown:hotKey];
                        }
                        }
-               }
-               else if( subType == 9 ) //9 is hot key up
-               {
-                       carbonHotKey= (EventHotKeyRef)[event data1];
-                       if( carbonHotKey != nil )
-                       {
-                               ITHotKey* hotKey = [self _hotKeyForCarbonHotKey: carbonHotKey];
-                               [self _hotKeyUp: hotKey];
+               } else if (subType == 9) { //9 is hot key up
+                       carbonHotKey = (EventHotKeyRef)[event data1];
+                       if (carbonHotKey) {
+                               ITHotKey *hotKey = [self _hotKeyForCarbonHotKey:carbonHotKey];
+                               [self _hotKeyUp:hotKey];
                        }
                }
        }
 }
 
                        }
                }
        }
 }
 
-- (OSStatus)sendCarbonEvent: (EventRef)event
-{
+- (OSStatus)sendCarbonEvent:(EventRef)event {
        OSStatus err;
        EventHotKeyID hotKeyID;
        OSStatus err;
        EventHotKeyID hotKeyID;
-       ITHotKeyhotKey;
+       ITHotKey *hotKey;
        
        if (!_enabled) {
                return -1;
        }
        
        
        if (!_enabled) {
                return -1;
        }
        
-       NSAssert( [self _hasCarbonEventSupport], @"" );
-       NSAssert( GetEventClass( event ) == kEventClassKeyboard, @"Unknown event class" );
+       NSAssert([self _hasCarbonEventSupport], @"");
+       NSAssert((GetEventClass(event) == kEventClassKeyboard), @"Unknown event class");
 
 
-       err = GetEventParameter(        event,
-                                                               kEventParamDirectObject, 
-                                                               typeEventHotKeyID,
-                                                               nil,
-                                                               sizeof(EventHotKeyID),
-                                                               nil,
-                                                               &hotKeyID );
-       if( err )
+       if ((err = GetEventParameter(event, kEventParamDirectObject, typeEventHotKeyID, nil, sizeof(EventHotKeyID), nil, &hotKeyID))) {
                return err;
                return err;
+       }
        
        
+       NSAssert((hotKeyID.signature == 'PTHk'), @"Invalid hot key id");
+       NSAssert((hotKeyID.id != nil), @"Invalid hot key id");
 
 
-       NSAssert( hotKeyID.signature == 'PTHk', @"Invalid hot key id" );
-       NSAssert( hotKeyID.id != nil, @"Invalid hot key id" );
-
-       hotKey = (ITHotKey*)hotKeyID.id;
-
-       switch( GetEventKind( event ) )
-       {
+       hotKey = (ITHotKey *)hotKeyID.id;
+       
+       switch (GetEventKind(event)) {
                case kEventHotKeyPressed:
                case kEventHotKeyPressed:
-                       [self _hotKeyDown: hotKey];
-               break;
-
+                       [self _hotKeyDown:hotKey];
+                       break;
                case kEventHotKeyReleased:
                case kEventHotKeyReleased:
-                       [self _hotKeyUp: hotKey];
-               break;
-
+                       [self _hotKeyUp:hotKey];
+                       break;
                default:
                default:
-                       NSAssert( 0, @"Unknown event kind" );
-               break;
+                       NSAssert(NO, @"Unknown event kind");
+                       break;
        }
        
        return noErr;
 }
 
        }
        
        return noErr;
 }
 
-static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void* refCon )
-{
-       return [[ITHotKeyCenter sharedCenter] sendCarbonEvent: inEvent];
+static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *refCon) {
+       return [[ITHotKeyCenter sharedCenter] sendCarbonEvent:inEvent];
 }
 
 @end
 }
 
 @end
old mode 100755 (executable)
new mode 100644 (file)
index 9955f04..aa0a5d2
@@ -1,14 +1,13 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITIconAndTextStatusWindow
- *    ITTransientStatusWindow subclass to show an icon and text.
+ *     ITIconAndTextStatusWindow.h
  *
  *
- *  Original Author : Kent Sutherland <ksutherland@ithinksw.com>
- *   Responsibility : Kent Sutherland <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     ITTransientStatusWindow subclass to show an icon and text.
  *
  *
- *  Copyright (c) 2002 - 2004 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
 #import "ITTransientStatusWindow.h"
 
 @interface ITIconAndTextStatusWindow : ITTransientStatusWindow {
 #import "ITTransientStatusWindow.h"
 
 @interface ITIconAndTextStatusWindow : ITTransientStatusWindow {
-        NSImage            *_image;
+       NSImage *_image;
 }
 
 - (void)setImage:(NSImage *)newImage;
 - (void)buildTextWindowWithString:(NSString *)text;
 
 }
 
 - (void)setImage:(NSImage *)newImage;
 - (void)buildTextWindowWithString:(NSString *)text;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index d3a9424..61c657f
@@ -1,32 +1,30 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITImageCell
- *    Cell used by the ITImageView control.
+ *     ITImageCell.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Custom NSImageCell subclass that casts a shadow using CoreGraphics,
+ *             providing support for versions of Cocoa that don't have the NSShadow
+ *             class which was introduced in Mac OS X 10.3 (Panther), and also
+ *             provides smooth scaling.
  *
  *
- *  Copyright (c) 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
  *
  */
-#import <Cocoa/Cocoa.h>
 
 
+#import <Cocoa/Cocoa.h>
 
 @interface ITImageCell : NSImageCell {
 
 @interface ITImageCell : NSImageCell {
-
-    BOOL _scalesSmoothly;
-
-    BOOL  castsShadow;
-    
-    float shadowElevation;
-    float shadowAzimuth;
-    float shadowAmbient;
-    float shadowHeight;
-    float shadowRadius;
-    float shadowSaturation;
+       BOOL _scalesSmoothly;
+       BOOL castsShadow;
+       float shadowElevation;
+       float shadowAzimuth;
+       float shadowAmbient;
+       float shadowHeight;
+       float shadowRadius;
+       float shadowSaturation;
 }
 
 - (BOOL)scalesSmoothly;
 }
 
 - (BOOL)scalesSmoothly;
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
-- (float)shadowElevation;              /* Light source elevation in degrees.  Defaults to 45.0 */
+- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */
 - (void)setShadowElevation:(float)newElevation;
 
 - (void)setShadowElevation:(float)newElevation;
 
-- (float)shadowAzimuth;                        /* Light source azimuth in degrees.  Defaults to 90.0 */
+- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */
 - (void)setShadowAzimuth:(float)newAzimuth;
 
 - (void)setShadowAzimuth:(float)newAzimuth;
 
-- (float)shadowAmbient;                        /* Amount of ambient light.  Defaults to 0.15 */
+- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */
 - (void)setShadowAmbient:(float)newAmbient;
 
 - (void)setShadowAmbient:(float)newAmbient;
 
-- (float)shadowHeight;                 /* Height above the canvas.  Defaults to 1.0 */
+- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */
 - (void)setShadowHeight:(float)newHeight;
 
 - (void)setShadowHeight:(float)newHeight;
 
-- (float)shadowRadius;                 /* Blur radius.  Defaults to 4.0 */
+- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */
 - (void)setShadowRadius:(float)newRadius;
 
 - (void)setShadowRadius:(float)newRadius;
 
-- (float)shadowSaturation;             /* Maximum saturation.  Defaults to 1.0 */
+- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */
 - (void)setShadowSaturation:(float)newSaturation;
 
 - (void)setShadowSaturation:(float)newSaturation;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 055435a..1ca761d
 #import "ITImageCell.h"
 #import "ITImageCell.h"
-#import <ApplicationServices/ApplicationServices.h>
 #import "ITCoreGraphicsHacks.h"
 #import "ITCoreGraphicsHacks.h"
-
+#import <ApplicationServices/ApplicationServices.h>
 
 @implementation ITImageCell
 
 
 @implementation ITImageCell
 
+- (id)initImageCell:(NSImage *)image {
+       if ((self = [super initImageCell:image])) {
+               _scalesSmoothly = YES;
+               castsShadow = NO;
+               shadowElevation = 45.0;
+               shadowAzimuth = 90.0;
+               shadowAmbient = 0.15;
+               shadowHeight = 1.00;
+               shadowRadius = 4.00;
+               shadowSaturation = 1.0;
+       }
+       return self;
+}
 
 
-- (id)initImageCell:(NSImage *)image
-{
-    if ( (self = [super initImageCell:image]) ) {
-        _scalesSmoothly  = YES;
-        castsShadow      = NO;
-        shadowElevation  = 45.0;
-        shadowAzimuth    = 90.0;
-        shadowAmbient    = 0.15;
-        shadowHeight     = 1.00;
-        shadowRadius     = 4.00;
-        shadowSaturation = 1.0;
-    }
-    NSLog(@"foo");
-    return self;
-}
-
-- (id)init
-{
-    if ( (self = [super init]) ) {
-        _scalesSmoothly  = YES;
-        castsShadow      = NO;
-        shadowElevation  = 45.0;
-        shadowAzimuth    = 90.0;
-        shadowAmbient    = 0.15;
-        shadowHeight     = 1.00;
-        shadowRadius     = 4.00;
-        shadowSaturation = 1.0;
-    }
-    return self;
-}
-
-- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView
-{
-    CGSGenericObj        style = nil;
-    CGShadowStyle        shadow;
-    
-    if ( _scalesSmoothly || castsShadow ) {
-        [NSGraphicsContext saveGraphicsState];
-    }
-    
-    if ( _scalesSmoothly ) {
-       // CGContextSetInterpolationQuality([[NSGraphicsContext currentContext] graphicsPort], kCGInterpolationHigh);
-       [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh];
-       [[NSGraphicsContext currentContext] setShouldAntialias:YES];
-    }
-    
-    if ( castsShadow ) {
-        //      Create the shadow style to use for drawing the string
-        shadow.version    = 0;
-        shadow.elevation  = shadowElevation;
-        shadow.azimuth    = shadowAzimuth;
-        shadow.ambient    = shadowAmbient;
-        shadow.height     = shadowHeight;
-        shadow.radius     = shadowRadius;
-        shadow.saturation = shadowSaturation;
-        style = CGStyleCreateShadow(&shadow);
-        CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style);
-    }
-    
-    [super drawWithFrame:rect inView:controlView];
-
-    if ( _scalesSmoothly || castsShadow ) {
-        [NSGraphicsContext restoreGraphicsState];
-    }
-    
-    if ( castsShadow ) {
-        CGStyleRelease(style);
-    }
+- (id)init {
+       if ((self = [super init])) {
+               _scalesSmoothly = YES;
+               castsShadow = NO;
+               shadowElevation = 45.0;
+               shadowAzimuth = 90.0;
+               shadowAmbient = 0.15;
+               shadowHeight = 1.00;
+               shadowRadius = 4.00;
+               shadowSaturation = 1.0;
+       }
+       return self;
 }
 
 }
 
-- (BOOL)scalesSmoothly
-{
-    return _scalesSmoothly;
+- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView {
+       CGSGenericObj style = nil;
+       CGShadowStyle shadow;
+       
+       if (_scalesSmoothly || castsShadow) {
+               [NSGraphicsContext saveGraphicsState];
+       }
+       
+       if (_scalesSmoothly) {
+               // CGContextSetInterpolationQuality([[NSGraphicsContext currentContext] graphicsPort], kCGInterpolationHigh);
+               [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh];
+               [[NSGraphicsContext currentContext] setShouldAntialias:YES];
+       }
+       
+       if (castsShadow) {
+               // Create the shadow style to use for drawing the string
+               shadow.version = 0;
+               shadow.elevation = shadowElevation;
+               shadow.azimuth = shadowAzimuth;
+               shadow.ambient = shadowAmbient;
+               shadow.height = shadowHeight;
+               shadow.radius = shadowRadius;
+               shadow.saturation = shadowSaturation;
+               style = CGStyleCreateShadow(&shadow);
+               CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style);
+       }
+       
+       [super drawWithFrame:rect inView:controlView];
+       
+       if (castsShadow) {
+               CGStyleRelease(style);
+       }
+       
+       if (_scalesSmoothly || castsShadow) {
+               [NSGraphicsContext restoreGraphicsState];
+       }
 }
 
 }
 
-- (void)setScalesSmoothly:(BOOL)flag
-{
-    _scalesSmoothly = flag;
-    [[self controlView] setNeedsDisplay:YES];
+- (BOOL)scalesSmoothly {
+       return _scalesSmoothly;
 }
 
 }
 
-- (BOOL)castsShadow;
-{
-    return castsShadow;
+- (void)setScalesSmoothly:(BOOL)flag {
+       _scalesSmoothly = flag;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (void)setCastsShadow:(BOOL)newSetting;
-{
-    castsShadow = newSetting;
-    [[self controlView] setNeedsDisplay:YES];
+- (BOOL)castsShadow {
+       return castsShadow;
 }
 
 }
 
-- (float)shadowElevation;
-{
-    return shadowElevation;
+- (void)setCastsShadow:(BOOL)newSetting {
+       castsShadow = newSetting;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (void)setShadowElevation:(float)newElevation;
-{
-    shadowElevation = newElevation;
-    [[self controlView] setNeedsDisplay:YES];
+- (float)shadowElevation {
+       return shadowElevation;
 }
 
 }
 
-- (float)shadowAzimuth;
-{
-    return shadowAzimuth;
+- (void)setShadowElevation:(float)newElevation {
+       shadowElevation = newElevation;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (void)setShadowAzimuth:(float)newAzimuth;
-{
-    shadowAzimuth = newAzimuth;
-    [[self controlView] setNeedsDisplay:YES];
+- (float)shadowAzimuth {
+       return shadowAzimuth;
 }
 
 }
 
-- (float)shadowAmbient;
-{
-    return shadowAmbient;
+- (void)setShadowAzimuth:(float)newAzimuth {
+       shadowAzimuth = newAzimuth;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (void)setShadowAmbient:(float)newAmbient;
-{
-    shadowAmbient = newAmbient;
-    [[self controlView] setNeedsDisplay:YES];
+- (float)shadowAmbient {
+       return shadowAmbient;
 }
 
 }
 
-- (float)shadowHeight;
-{
-    return shadowHeight;
+- (void)setShadowAmbient:(float)newAmbient {
+       shadowAmbient = newAmbient;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (void)setShadowHeight:(float)newHeight;
-{
-    shadowHeight = newHeight;
-    [[self controlView] setNeedsDisplay:YES];
+- (float)shadowHeight {
+       return shadowHeight;
 }
 
 }
 
-- (float)shadowRadius;
-{
-    return shadowRadius;
+- (void)setShadowHeight:(float)newHeight {
+       shadowHeight = newHeight;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (void)setShadowRadius:(float)newRadius;
-{
-    shadowRadius = newRadius;
-    [[self controlView] setNeedsDisplay:YES];
+- (float)shadowRadius {
+       return shadowRadius;
 }
 
 }
 
-- (float)shadowSaturation;
-{
-    return shadowSaturation;
+- (void)setShadowRadius:(float)newRadius {
+       shadowRadius = newRadius;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (void)setShadowSaturation:(float)newSaturation;
-{
-    shadowSaturation = newSaturation;
-    [[self controlView] setNeedsDisplay:YES];
+- (float)shadowSaturation {
+       return shadowSaturation;
 }
 
 }
 
+- (void)setShadowSaturation:(float)newSaturation {
+       shadowSaturation = newSaturation;
+       [[self controlView] setNeedsDisplay:YES];
+}
 
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 72b768d..3715a0c
@@ -1,20 +1,18 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITImageView
- *    NSImageView subclass which adds new features, such as smooth scaling.
+ *     ITImageView.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Custom NSImageView subclass that uses ITImageCell.
  *
  *
- *  Copyright (c) 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
-
 @interface ITImageView : NSImageView {
 
 }
 @interface ITImageView : NSImageView {
 
 }
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
-- (float)shadowElevation;              /* Light source elevation in degrees.  Defaults to 45.0 */
+- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */
 - (void)setShadowElevation:(float)newElevation;
 
 - (void)setShadowElevation:(float)newElevation;
 
-- (float)shadowAzimuth;                        /* Light source azimuth in degrees.  Defaults to 90.0 */
+- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */
 - (void)setShadowAzimuth:(float)newAzimuth;
 
 - (void)setShadowAzimuth:(float)newAzimuth;
 
-- (float)shadowAmbient;                        /* Amount of ambient light.  Defaults to 0.15 */
+- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */
 - (void)setShadowAmbient:(float)newAmbient;
 
 - (void)setShadowAmbient:(float)newAmbient;
 
-- (float)shadowHeight;                 /* Height above the canvas.  Defaults to 1.0 */
+- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */
 - (void)setShadowHeight:(float)newHeight;
 
 - (void)setShadowHeight:(float)newHeight;
 
-- (float)shadowRadius;                 /* Blur radius.  Defaults to 4.0 */
+- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */
 - (void)setShadowRadius:(float)newRadius;
 
 - (void)setShadowRadius:(float)newRadius;
 
-- (float)shadowSaturation;             /* Maximum saturation.  Defaults to 1.0 */
+- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */
 - (void)setShadowSaturation:(float)newSaturation;
 
 - (void)setShadowSaturation:(float)newSaturation;
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 228e2f4..de903dd
 #import "ITImageView.h"
 #import "ITImageCell.h"
 
 #import "ITImageView.h"
 #import "ITImageCell.h"
 
-
 @implementation ITImageView
 
 @implementation ITImageView
 
-
-+ (void)initialize
-{
-    if ( self == [ITImageView class] ) {
-        [self setCellClass:[ITImageCell class]];
-    }
++ (void)initialize {
+       if (self == [ITImageView class]) {
+               [self setCellClass:[ITImageCell class]];
+       }
 }
 
 }
 
-+ (Class)cellClass
-{
-    return [ITImageCell class];
++ (Class)cellClass {
+       return [ITImageCell class];
 }
 
 }
 
-- (id)initWithFrame:(NSRect)rect
-{
-    if ( (self = [super initWithFrame:rect]) ) {
-        [self setScalesSmoothly:YES];
-    }
-    
-    return self;
+- (id)initWithFrame:(NSRect)rect {
+       if ((self = [super initWithFrame:rect])) {
+               [self setScalesSmoothly:YES];
+       }
+       return self;
 }
 
 }
 
-- (BOOL)scalesSmoothly
-{
-    return [[self cell] scalesSmoothly];
+- (BOOL)scalesSmoothly {
+       return [[self cell] scalesSmoothly];
 }
 
 }
 
-- (void)setScalesSmoothly:(BOOL)flag
-{
-    [[self cell] setScalesSmoothly:flag];
+- (void)setScalesSmoothly:(BOOL)flag {
+       [[self cell] setScalesSmoothly:flag];
 }
 
 }
 
-- (BOOL)castsShadow;
-{
-    return [[self cell] castsShadow];
+- (BOOL)castsShadow {
+       return [[self cell] castsShadow];
 }
 
 }
 
-- (void)setCastsShadow:(BOOL)newSetting;
-{
-    [[self cell] setCastsShadow:newSetting];
+- (void)setCastsShadow:(BOOL)newSetting {
+       [[self cell] setCastsShadow:newSetting];
 }
 
 }
 
-- (float)shadowElevation;
-{
-    return [[self cell] shadowElevation];
+- (float)shadowElevation {
+       return [[self cell] shadowElevation];
 }
 
 }
 
-- (void)setShadowElevation:(float)newElevation;
-{
-    [[self cell] setShadowElevation:newElevation];
+- (void)setShadowElevation:(float)newElevation {
+       [[self cell] setShadowElevation:newElevation];
 }
 
 }
 
-- (float)shadowAzimuth;
-{
-    return [[self cell] shadowAzimuth];
+- (float)shadowAzimuth {
+       return [[self cell] shadowAzimuth];
 }
 
 }
 
-- (void)setShadowAzimuth:(float)newAzimuth;
-{
-    [[self cell] setShadowAzimuth:newAzimuth];
+- (void)setShadowAzimuth:(float)newAzimuth {
+       [[self cell] setShadowAzimuth:newAzimuth];
 }
 
 }
 
-- (float)shadowAmbient;
-{
-    return [[self cell] shadowAmbient];
+- (float)shadowAmbient {
+       return [[self cell] shadowAmbient];
 }
 
 }
 
-- (void)setShadowAmbient:(float)newAmbient;
-{
-    [[self cell] setShadowAmbient:newAmbient];
+- (void)setShadowAmbient:(float)newAmbient {
+       [[self cell] setShadowAmbient:newAmbient];
 }
 
 }
 
-- (float)shadowHeight;
-{
-    return [[self cell] shadowHeight];
+- (float)shadowHeight {
+       return [[self cell] shadowHeight];
 }
 
 }
 
-- (void)setShadowHeight:(float)newHeight;
-{
-    [[self cell] setShadowHeight:newHeight];
+- (void)setShadowHeight:(float)newHeight {
+       [[self cell] setShadowHeight:newHeight];
 }
 
 }
 
-- (float)shadowRadius;
-{
-    return [[self cell] shadowRadius];
+- (float)shadowRadius {
+       return [[self cell] shadowRadius];
 }
 
 }
 
-- (void)setShadowRadius:(float)newRadius;
-{
-    [[self cell] setShadowRadius:newRadius];
+- (void)setShadowRadius:(float)newRadius {
+       [[self cell] setShadowRadius:newRadius];
 }
 
 }
 
-- (float)shadowSaturation;
-{
-    return [[self cell] shadowSaturation];
+- (float)shadowSaturation {
+       return [[self cell] shadowSaturation];
 }
 
 }
 
-- (void)setShadowSaturation:(float)newSaturation;
-{
-    [[self cell] setShadowSaturation:newSaturation];
+- (void)setShadowSaturation:(float)newSaturation {
+       [[self cell] setShadowSaturation:newSaturation];
 }
 
 }
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 1fed89f..d94d75e
@@ -1,28 +1,22 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITHotKeyBroadcaster
+ *     ITKeyBroadcaster.h
  *
  *
- *  Original Author : Quentin Carnicelli <...>
- *   Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     $Id$
  *
  */
 
  *
  */
 
+#import <Cocoa/Cocoa.h>
 
 
-#import <AppKit/AppKit.h>
+__private_extern__ NSString *ITKeyBroadcasterKeyEvent; //keys: keyCombo as ITKeyCombo
 
 
+@interface ITKeyBroadcaster : NSButton {
 
 
-@interface ITKeyBroadcaster : NSButton
-{
 }
 
 }
 
-+ (long)cocoaModifiersAsCarbonModifiers: (long)cocoaModifiers;
++ (long)cocoaModifiersAsCarbonModifiers:(long)cocoaModifiers;
 
 
-
-@end
-
-
-__private_extern__ NSString* ITKeyBroadcasterKeyEvent; //keys: keyCombo as ITKeyCombo
\ No newline at end of file
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index b09ea9a..4411022
@@ -1,73 +1,58 @@
-//
-//  ITKeyBroadcaster.m
-//
-//  Created by Quentin Carnicelli on Sun Aug 03 2003.
-//  Copyright (c) 2003 iThink Software. All rights reserved.
-//
-
 #import "ITKeyBroadcaster.h"
 #import "ITKeyCombo.h"
 #import <Carbon/Carbon.h>
 
 #import "ITKeyBroadcaster.h"
 #import "ITKeyCombo.h"
 #import <Carbon/Carbon.h>
 
-NSStringITKeyBroadcasterKeyEvent = @"ITKeyBroadcasterKeyEvent";
+NSString *ITKeyBroadcasterKeyEvent = @"ITKeyBroadcasterKeyEvent";
 
 @implementation ITKeyBroadcaster
 
 
 @implementation ITKeyBroadcaster
 
-- (void)_bcastKeyCode: (short)keyCode modifiers: (long)modifiers
-{
-       ITKeyCombo* keyCombo = [ITKeyCombo keyComboWithKeyCode: keyCode modifiers: modifiers];
-       NSDictionary* userInfo = [NSDictionary dictionaryWithObject: keyCombo forKey:@"keyCombo"];
-
-       [[NSNotificationCenter defaultCenter]
-               postNotificationName: ITKeyBroadcasterKeyEvent
-               object: self
-               userInfo: userInfo];
+- (void)_bcastKeyCode:(short)keyCode modifiers:(long)modifiers {
+       ITKeyCombo *keyCombo = [ITKeyCombo keyComboWithKeyCode:keyCode modifiers:modifiers];
+       NSDictionary *userInfo = [NSDictionary dictionaryWithObject:keyCombo forKey:@"keyCombo"];
+       
+       [[NSNotificationCenter defaultCenter] postNotificationName:ITKeyBroadcasterKeyEvent object:self userInfo:userInfo];
 }
 
 }
 
-- (void)_bcastEvent: (NSEvent*)event
-{
+- (void)_bcastEvent:(NSEvent *)event {
        short keyCode;
        long modifiers;
        
        keyCode = [event keyCode];
        modifiers = [event modifierFlags];
        short keyCode;
        long modifiers;
        
        keyCode = [event keyCode];
        modifiers = [event modifierFlags];
-       modifiers = [[self class] cocoaModifiersAsCarbonModifiers: modifiers];
-
-       [self _bcastKeyCode: keyCode modifiers: modifiers];
+       modifiers = [[self class] cocoaModifiersAsCarbonModifiers:modifiers];
+       
+       [self _bcastKeyCode:keyCode modifiers:modifiers];
 }
 
 }
 
-- (void)keyDown: (NSEvent*)event
-{
-       [self _bcastEvent: event];
+- (void)keyDown:(NSEvent *)event {
+       [self _bcastEvent:event];
 }
 
 }
 
-- (BOOL)performKeyEquivalent: (NSEvent*)event
-{
-       [self _bcastEvent: event];
+- (BOOL)performKeyEquivalent:(NSEvent *)event {
+       [self _bcastEvent:event];
        return YES;
 }
 
        return YES;
 }
 
-+ (long)cocoaModifiersAsCarbonModifiers: (long)cocoaModifiers
-{
-       static long cocoaToCarbon[6][2] =
-       {
-               { NSCommandKeyMask, cmdKey},
-               { NSAlternateKeyMask, optionKey},
-               { NSControlKeyMask, controlKey},
-               { NSShiftKeyMask, shiftKey},
-                { NSFunctionKeyMask, rightControlKey},
++ (long)cocoaModifiersAsCarbonModifiers:(long)cocoaModifiers {
+       static long cocoaToCarbon[6][2] = {
+               { NSCommandKeyMask, cmdKey },
+               { NSAlternateKeyMask, optionKey },
+               { NSControlKeyMask, controlKey },
+               { NSShiftKeyMask, shiftKey },
+               { NSFunctionKeyMask, rightControlKey },
                //{ NSAlphaShiftKeyMask, alphaLock }, //Ignore this?
        };
                //{ NSAlphaShiftKeyMask, alphaLock }, //Ignore this?
        };
-
+       
        long carbonModifiers = 0;
        int i;
        
        long carbonModifiers = 0;
        int i;
        
-       for( i = 0 ; i < 6; i++ )
-               if( cocoaModifiers & cocoaToCarbon[i][0] )
+       for (i = 0;i < 6;i++) {
+               if (cocoaModifiers & cocoaToCarbon[i][0]) {
                        carbonModifiers += cocoaToCarbon[i][1];
                        carbonModifiers += cocoaToCarbon[i][1];
+               }
+       }
        
        return carbonModifiers;
 }
 
        
        return carbonModifiers;
 }
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index d5c3d77..130d675
@@ -1,35 +1,30 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITKeyCombo
+ *     ITKeyCombo.h
  *
  *
- *  Original Author : Quentin Carnicelli <...>
- *   Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     $Id$
  *
  */
 
  *
  */
 
+#import <Cocoa/Cocoa.h>
 
 
-#import <Foundation/Foundation.h>
-
-
-@interface ITKeyCombo : NSObject <NSCopying>
-{
-       int     mKeyCode;
-       int     mModifiers;
+@interface ITKeyCombo : NSObject <NSCopying> {
+       int mKeyCode;
+       int mModifiers;
 }
 
 + (id)clearKeyCombo;
 }
 
 + (id)clearKeyCombo;
-+ (id)keyComboWithKeyCode: (int)keyCode modifiers: (int)modifiers;
-+ (id)keyComboWithPlistRepresentation: (id)plist;
-- (id)initWithKeyCode: (int)keyCode modifiers: (int)modifiers;
++ (id)keyComboWithKeyCode:(int)keyCode modifiers:(int)modifiers;
++ (id)keyComboWithPlistRepresentation:(id)plist;
+- (id)initWithKeyCode:(int)keyCode modifiers:(int)modifiers;
 
 
-- (id)initWithPlistRepresentation: (id)plist;
+- (id)initWithPlistRepresentation:(id)plist;
 - (id)plistRepresentation;
 
 - (id)plistRepresentation;
 
-- (BOOL)isEqual: (ITKeyCombo*)combo;
+- (BOOL)isEqual:(ITKeyCombo *)combo;
 
 - (int)keyCode;
 - (int)modifiers;
 
 - (int)keyCode;
 - (int)modifiers;
 - (BOOL)isClearCombo;
 - (BOOL)isValidHotKeyCombo;
 
 - (BOOL)isClearCombo;
 - (BOOL)isValidHotKeyCombo;
 
-
 @end
 
 @end
 
-
 @interface ITKeyCombo (UserDisplayAdditions)
 
 @interface ITKeyCombo (UserDisplayAdditions)
 
-- (NSString*)description;
+- (NSString *)description;
 
 @end
\ No newline at end of file
 
 @end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index c0111a1..fc43061
-//
-//  ITKeyCombo.m
-//
-//  Created by Quentin Carnicelli on Sat Aug 02 2003.
-//  Copyright (c) 2003 iThink Software. All rights reserved.
-//
-
 #import "ITKeyCombo.h"
 #import "ITKeyCombo.h"
-
 #import <Carbon/Carbon.h>
 
 @implementation ITKeyCombo
 
 #import <Carbon/Carbon.h>
 
 @implementation ITKeyCombo
 
-+ (id)clearKeyCombo
-{
-       return [self keyComboWithKeyCode: -1 modifiers: -1];
++ (id)clearKeyCombo {
+       return [self keyComboWithKeyCode:-1 modifiers:-1];
 }
 
 }
 
-+ (id)keyComboWithKeyCode: (int)keyCode modifiers: (int)modifiers
-{
-       return [[[self alloc] initWithKeyCode: keyCode modifiers: modifiers] autorelease];
++ (id)keyComboWithKeyCode:(int)keyCode modifiers:(int)modifiers {
+       return [[[self alloc] initWithKeyCode:keyCode modifiers:modifiers] autorelease];
 }
 
 }
 
-+ (id)keyComboWithPlistRepresentation: (id)plist
-{
-    return [[[self alloc] initWithPlistRepresentation: plist] autorelease];
++ (id)keyComboWithPlistRepresentation:(id)plist {
+       return [[[self alloc] initWithPlistRepresentation:plist] autorelease];
 }
 
 }
 
-- (id)initWithKeyCode: (int)keyCode modifiers: (int)modifiers
-{
-       self = [super init];
-       
-       if( self )
-       {
+- (id)initWithKeyCode:(int)keyCode modifiers:(int)modifiers {
+       if ((self = [super init])) {
                mKeyCode = keyCode;
                mModifiers = modifiers;
        }
                mKeyCode = keyCode;
                mModifiers = modifiers;
        }
-       
        return self;
 }
 
        return self;
 }
 
-- (id)initWithPlistRepresentation: (id)plist
-{
+- (id)initWithPlistRepresentation:(id)plist {
        int keyCode, modifiers;
        int keyCode, modifiers;
-               
-       keyCode = [[plist objectForKey: @"keyCode"] intValue];
-       if( keyCode <= 0 ) keyCode = -1;
-
-       modifiers = [[plist objectForKey: @"modifiers"] intValue];
-       if( modifiers <= 0 ) modifiers = -1;
-
-       return [self initWithKeyCode: keyCode modifiers: modifiers];
+       
+       keyCode = [[plist objectForKey:@"keyCode"] intValue];
+       if (keyCode <= 0) {
+               keyCode = -1;
+       }
+       
+       modifiers = [[plist objectForKey:@"modifiers"] intValue];
+       if (modifiers <= 0) {
+               modifiers = -1;
+       }
+       
+       return [self initWithKeyCode:keyCode modifiers:modifiers];
 }
 
 }
 
-- (id)plistRepresentation
-{
-       return [NSDictionary dictionaryWithObjectsAndKeys:
-                               [NSNumber numberWithInt: [self keyCode]], @"keyCode",
-                               [NSNumber numberWithInt: [self modifiers]], @"modifiers",
-                               nil];
+- (id)plistRepresentation {
+       return [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:[self keyCode]], @"keyCode", [NSNumber numberWithInt:[self modifiers]], @"modifiers", nil];
 }
 
 }
 
-- (id)copyWithZone:(NSZone*)zone;
-{
+- (id)copyWithZone:(NSZone *)zone {
        return [self retain];
 }
 
        return [self retain];
 }
 
-- (BOOL)isEqual: (ITKeyCombo*)combo
-{
-       return  [self keyCode] == [combo keyCode] &&
-                       [self modifiers] == [combo modifiers];
+- (BOOL)isEqual:(ITKeyCombo *)combo {
+       return (([self keyCode] == [combo keyCode]) && ([self modifiers] == [combo modifiers]));
 }
 
 }
 
-#pragma mark -
-
-- (int)keyCode
-{
+- (int)keyCode {
        return mKeyCode;
 }
 
        return mKeyCode;
 }
 
-- (int)modifiers
-{
+- (int)modifiers {
        return mModifiers;
 }
 
        return mModifiers;
 }
 
-- (BOOL)isValidHotKeyCombo
-{
-       return mKeyCode >= 0 && mModifiers > 0;
+- (BOOL)isValidHotKeyCombo {
+       return ((mKeyCode >= 0) && (mModifiers > 0));
 }
 
 }
 
-- (BOOL)isClearCombo
-{
-       return mKeyCode == -1 && mModifiers == -1;
+- (BOOL)isClearCombo {
+       return ((mKeyCode == -1) && (mModifiers == -1));
 }
 
 @end
 
 }
 
 @end
 
-#pragma mark -
-
 @implementation ITKeyCombo (UserDisplayAdditions)
 
 @implementation ITKeyCombo (UserDisplayAdditions)
 
-+ (NSDictionary*)_keyCodesDictionary
-{
-       static NSDictionary* keyCodes = nil;
++ (NSDictionary *)_keyCodesDictionary {
+       static NSDictionary *keyCodes = nil;
        
        
-       if( keyCodes == nil )
-       {
-               NSString* path;
-               NSString* contents;
+       if (!keyCodes) {
+               NSString *path;
+               NSString *contents;
                
                
-               path = [[NSBundle bundleForClass: self] pathForResource: @"ITKeyCodes" ofType: @"plist"];
-               contents = [NSString stringWithContentsOfFile: path];
+               path = [[NSBundle bundleForClass:self] pathForResource:@"ITKeyCodes" ofType:@"plist"];
+               contents = [NSString stringWithContentsOfFile:path];
                keyCodes = [[contents propertyList] retain];
        }
        
        return keyCodes;
 }
 
                keyCodes = [[contents propertyList] retain];
        }
        
        return keyCodes;
 }
 
-+ (NSString*)_stringForModifiers: (long)modifiers
-{
-       static long modToChar[4][2] =
-       {
-               { cmdKey,               0x23180000 },
-               { optionKey,    0x23250000 },
-               { controlKey,   0x005E0000 },
-               { shiftKey,             0x21e70000 }
++ (NSString *)_stringForModifiers:(long)modifiers {
+       static long modToChar[4][2] = {
+               { cmdKey, 0x23180000 },
+               { optionKey, 0x23250000 },
+               { controlKey, 0x005E0000 },
+               { shiftKey, 0x21e70000 }
        };
        };
-
-       NSString* str = nil;
-       NSStringcharStr;
+       
+       NSString *str = @"";
+       NSString *charStr;
        long i;
        long i;
-
-       str = [NSString string];
-
-       for( i = 0; i < 4; i++ )
-       {
-               if( modifiers & modToChar[i][0] )
-               {
-                       charStr = [NSString stringWithCharacters: (const unichar*)&modToChar[i][1] length: 1];
-                       str = [str stringByAppendingString: charStr];
+       
+       for (i = 0;i < 4;i++) {
+               if (modifiers & modToChar[i][0]) {
+                       charStr = [NSString stringWithCharacters:(const unichar *)&modToChar[i][1] length:1];
+                       str = [str stringByAppendingString:charStr];
                }
        }
        
                }
        }
        
-       if( !str )
-               str = @"";
-       
        return str;
 }
 
        return str;
 }
 
-+ (NSString*)_stringForKeyCode: (short)keyCode
-{
-       NSDictionary* dict;
-       id key;
-       NSString* str;
-       
-       dict = [self _keyCodesDictionary];
-       key = [NSString stringWithFormat: @"%d", keyCode];
-       str = [dict objectForKey: key];
++ (NSString *)_stringForKeyCode:(short)keyCode {
+       NSDictionary *dict = [self _keyCodesDictionary];
+       NSString *key = [NSString stringWithFormat:@"%d", keyCode];
+       NSString *str = [dict objectForKey:key];
        
        
-       if( !str )
-               str = [NSString stringWithFormat: @"%X", keyCode];
+       if (!str) {
+               str = [NSString stringWithFormat:@"%X", keyCode];
+       }
        
        return str;
 }
 
        
        return str;
 }
 
-- (NSString*)description
-{
-       NSString* desc;
-       
-       if( [self isValidHotKeyCombo] ) //This might have to change
-       {
-               desc = [NSString stringWithFormat: @"%@%@",
-                               [[self class] _stringForModifiers: [self modifiers]],
-                               [[self class] _stringForKeyCode: [self keyCode]]];
+- (NSString *)description {
+       if ([self isValidHotKeyCombo]) { //This might have to change
+               return [NSString stringWithFormat:@"%@%@", [[self class] _stringForModifiers:[self modifiers]], [[self class] _stringForKeyCode:[self keyCode]]];
        }
        }
-       else
-               desc = NSLocalizedString( @"(None)", @"Hot Keys: Key Combo text for 'empty' combo" );
-
-       return desc;
+       
+       return NSLocalizedString(@"(None)", @"Hot Keys: Key Combo text for 'empty' combo");
 }
 
 @end
\ No newline at end of file
 }
 
 @end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 3df295a..e23f6ee
@@ -1,49 +1,41 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITKeyComboPanel
+ *     ITKeyComboPanel.h
  *
  *
- *  Original Author : Quentin Carnicelli <...>
- *   Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     $Id$
  *
  */
 
  *
  */
 
-
-#import <AppKit/AppKit.h>
-
+#import <Cocoa/Cocoa.h>
 
 @class ITKeyBroadcaster;
 @class ITKeyCombo;
 @class ITHotKey;
 
 
 @class ITKeyBroadcaster;
 @class ITKeyCombo;
 @class ITHotKey;
 
-
-@interface ITKeyComboPanel : NSWindowController
-{
-       IBOutlet NSTextField*           mTitleField;
-       IBOutlet NSTextField*           mComboField;
-       IBOutlet ITKeyBroadcaster*      mKeyBcaster;
-
-       NSString*                               mKeyName;
-       ITKeyCombo*                             mKeyCombo;
+@interface ITKeyComboPanel : NSWindowController {
+       IBOutlet NSTextField *mTitleField;
+       IBOutlet NSTextField *mComboField;
+       IBOutlet ITKeyBroadcaster *mKeyBcaster;
+       NSString *mKeyName;
+       ITKeyCombo *mKeyCombo;
 }
 
 + (id)sharedPanel;
 
 - (int)runModal;
 }
 
 + (id)sharedPanel;
 
 - (int)runModal;
-- (void)runModalForHotKey: (ITHotKey*)hotKey;
-
-- (void)setKeyCombo: (ITKeyCombo*)combo;
-- (ITKeyCombo*)keyCombo;
+- (void)runModalForHotKey:(ITHotKey *)hotKey;
 
 
-- (void)setKeyBindingName: (NSString*)name;
-- (NSString*)keyBindingName;
+- (void)setKeyCombo:(ITKeyCombo *)combo;
+- (ITKeyCombo *)keyCombo;
 
 
-- (IBAction)ok: (id)sender;
-- (IBAction)cancel: (id)sender;
-- (IBAction)clear: (id)sender;
+- (void)setKeyBindingName:(NSString *)name;
+- (NSString *)keyBindingName;
 
 
+- (IBAction)ok:(id)sender;
+- (IBAction)cancel:(id)sender;
+- (IBAction)clear:(id)sender;
 
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 3f71636..4fd3ff0
-//
-//  ITKeyComboPanel.m
-//
-//  Created by Quentin Carnicelli on Sun Aug 03 2003.
-//  Copyright (c) 2003 iThink Software. All rights reserved.
-//
-
 #import "ITKeyComboPanel.h"
 #import "ITKeyComboPanel.h"
-
 #import "ITHotKey.h"
 #import "ITKeyCombo.h"
 #import "ITKeyBroadcaster.h"
 #import "ITHotKeyCenter.h"
 
 #import "ITHotKey.h"
 #import "ITKeyCombo.h"
 #import "ITKeyBroadcaster.h"
 #import "ITHotKeyCenter.h"
 
-#if __PROTEIN__
-#import "NSObjectAdditions.h"
-#endif
-
 @implementation ITKeyComboPanel
 
 static id _sharedKeyComboPanel = nil;
 
 @implementation ITKeyComboPanel
 
 static id _sharedKeyComboPanel = nil;
 
-+ (id)sharedPanel
-{
-       if( _sharedKeyComboPanel == nil )
-       {
++ (id)sharedPanel {
+       if (!_sharedKeyComboPanel) {
                _sharedKeyComboPanel = [[self alloc] init];
                _sharedKeyComboPanel = [[self alloc] init];
-       
-               #if __PROTEIN__
-                       [_sharedKeyComboPanel releaseOnTerminate];
-               #endif
        }
        }
-
        return _sharedKeyComboPanel;
 }
 
        return _sharedKeyComboPanel;
 }
 
-- (id)init
-{
-       return [self initWithWindowNibName: @"ITKeyComboPanel"];
+- (id)init {
+       return [self initWithWindowNibName:@"ITKeyComboPanel"];
 }
 
 }
 
-- (void)dealloc
-{
-       [[NSNotificationCenter defaultCenter] removeObserver: self];
+- (void)dealloc {
+       [[NSNotificationCenter defaultCenter] removeObserver:self];
        [mKeyName release];
        [mKeyName release];
-
        [super dealloc];
 }
 
        [super dealloc];
 }
 
-- (void)windowDidLoad
-{
-       [[NSNotificationCenter defaultCenter]
-               addObserver: self
-               selector: @selector( noteKeyBroadcast: )
-               name: ITKeyBroadcasterKeyEvent
-               object: mKeyBcaster];
+- (void)windowDidLoad {
+       [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(noteKeyBroadcast:) name:ITKeyBroadcasterKeyEvent object:mKeyBcaster];
 }
 
 }
 
-- (void)_refreshContents
-{
-       if( mComboField )
-               [mComboField setStringValue: [mKeyCombo description]];
-
-       if( mTitleField )
+- (void)_refreshContents {
+       if (mComboField) {
+               [mComboField setStringValue:[mKeyCombo description]];
+       }
+       if (mTitleField) {
                [mTitleField setStringValue:mKeyName];
                [mTitleField setStringValue:mKeyName];
+       }
 }
 
 }
 
-- (int)runModal
-{
+- (int)runModal {
        int resultCode;
        int resultCode;
-
+       
        [self window]; //Force us to load
        [self window]; //Force us to load
-
+       
        [self _refreshContents];
        [[self window] center];
        [self _refreshContents];
        [[self window] center];
-       [self showWindow: self];
-       resultCode = [[NSApplication sharedApplication] runModalForWindow: [self window]];
+       [self showWindow:self];
+       resultCode = [[NSApplication sharedApplication] runModalForWindow:[self window]];
        [self close];
        [self close];
-
+       
        return resultCode;
 }
 
        return resultCode;
 }
 
-- (void)runModalForHotKey: (ITHotKey*)hotKey
-{
+- (void)runModalForHotKey:(ITHotKey *)hotKey {
        int resultCode;
 
        int resultCode;
 
-       [self setKeyBindingName: [hotKey name]];
-       [self setKeyCombo: [hotKey keyCombo]];
+       [self setKeyBindingName:[hotKey name]];
+       [self setKeyCombo:[hotKey keyCombo]];
 
        resultCode = [self runModal];
        
 
        resultCode = [self runModal];
        
-       if( resultCode == NSOKButton )
-       {
-               [hotKey setKeyCombo: [self keyCombo]];
-               [[ITHotKeyCenter sharedCenter] registerHotKey: hotKey];
+       if (resultCode == NSOKButton) {
+               [hotKey setKeyCombo:[self keyCombo]];
+               [[ITHotKeyCenter sharedCenter] registerHotKey:hotKey];
        }
 }
 
        }
 }
 
-#pragma mark -
-
-- (void)setKeyCombo: (ITKeyCombo*)combo
-{
-       [combo retain];
-       [mKeyCombo release];
-       mKeyCombo = combo;
+- (void)setKeyCombo:(ITKeyCombo *)combo {
+       [mKeyCombo autorelease];
+       mKeyCombo = [combo retain];
        [self _refreshContents];
 }
 
        [self _refreshContents];
 }
 
-- (ITKeyCombo*)keyCombo
-{
+- (ITKeyCombo *)keyCombo {
        return mKeyCombo;
 }
 
        return mKeyCombo;
 }
 
-- (void)setKeyBindingName: (NSString*)name
-{
-       [name retain];
-       [mKeyName release];
-       mKeyName = name;
+- (void)setKeyBindingName:(NSString *)name {
+       [mKeyName autorelease];
+       mKeyName = [name retain];
        [self _refreshContents];
 }
 
        [self _refreshContents];
 }
 
-- (NSString*)keyBindingName
-{
+- (NSString *)keyBindingName {
        return mKeyName;
 }
 
        return mKeyName;
 }
 
-#pragma mark -
-
-- (IBAction)ok: (id)sender
-{
-       [[NSApplication sharedApplication] stopModalWithCode: NSOKButton];
+- (IBAction)ok:(id)sender {
+       [[NSApplication sharedApplication] stopModalWithCode:NSOKButton];
 }
 
 }
 
-- (IBAction)cancel: (id)sender
-{
-       [[NSApplication sharedApplication] stopModalWithCode: NSCancelButton];
+- (IBAction)cancel:(id)sender {
+       [[NSApplication sharedApplication] stopModalWithCode:NSCancelButton];
 }
 
 }
 
-- (IBAction)clear: (id)sender
-{
-       [self setKeyCombo: [ITKeyCombo clearKeyCombo]];
-       [[NSApplication sharedApplication] stopModalWithCode: NSOKButton];
+- (IBAction)clear:(id)sender {
+       [self setKeyCombo:[ITKeyCombo clearKeyCombo]];
+       [[NSApplication sharedApplication] stopModalWithCode:NSOKButton];
 }
 
 }
 
-- (void)noteKeyBroadcast: (NSNotification*)note
-{
-       ITKeyCombo* keyCombo;
-       
-       keyCombo = [[note userInfo] objectForKey: @"keyCombo"];
-
-       [self setKeyCombo: keyCombo];
+- (void)noteKeyBroadcast:(NSNotification *)note {
+       ITKeyCombo *keyCombo = [[note userInfo] objectForKey:@"keyCombo"];
+       [self setKeyCombo:keyCombo];
 }
 
 @end
 }
 
 @end
diff --git a/ITKit.h b/ITKit.h
old mode 100755 (executable)
new mode 100644 (file)
index 60a36c9..ed6e388
--- a/ITKit.h
+++ b/ITKit.h
@@ -1,13 +1,13 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *    iThink Software's custom extensions to Apple's AppKit framework
+ *     ITKit.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     iThink Software's custom extensions to Apple's Cocoa framework.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
@@ -32,4 +32,4 @@
 #import <ITKit/ITIconAndTextStatusWindow.h>
 
 #import <ITKit/ITCategory-NSView.h>
 #import <ITKit/ITIconAndTextStatusWindow.h>
 
 #import <ITKit/ITCategory-NSView.h>
-#import <ITKit/ITCategory-NSMenu.h>
+#import <ITKit/ITCategory-NSMenu.h>
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index e8fc996..9511d2b
@@ -82,7 +82,6 @@
                                7C992F8B054F539B000B93EA,
                                08FB77AEFE84172EC02AAC07,
                                7C992F90054F53D9000B93EA,
                                7C992F8B054F539B000B93EA,
                                08FB77AEFE84172EC02AAC07,
                                7C992F90054F53D9000B93EA,
-                               7C992FA1054F54C3000B93EA,
                                32C88DFF0371C24200C91783,
                                089C1665FE841158C02AAC07,
                                7C99307F054F6982000B93EA,
                                32C88DFF0371C24200C91783,
                                089C1665FE841158C02AAC07,
                                7C99307F054F6982000B93EA,
                };
                08FB77AEFE84172EC02AAC07 = {
                        children = (
                };
                08FB77AEFE84172EC02AAC07 = {
                        children = (
-                               7C01A1B7059B4A86003A4662,
                                7C992F93054F53F2000B93EA,
                                7C992F96054F53F7000B93EA,
                                7C992F9B054F547C000B93EA,
                                7C992F93054F53F2000B93EA,
                                7C992F96054F53F7000B93EA,
                                7C992F9B054F547C000B93EA,
 //7C2
 //7C3
 //7C4
 //7C2
 //7C3
 //7C4
-               7C01A1B7059B4A86003A4662 = {
-                       children = (
-                               7C01A1BA059B4A8B003A4662,
-                       );
-                       isa = PBXGroup;
-                       name = Carbon;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C01A1BA059B4A8B003A4662 = {
-                       children = (
-                               7C01A1BF059B4AA1003A4662,
-                               7C01A1C0059B4AA1003A4662,
-                               7C01A1C5059B4AAC003A4662,
-                               7C01A1C6059B4AAC003A4662,
-                               7C23B320059BA4C000E08741,
-                       );
-                       isa = PBXGroup;
-                       name = Resources;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C01A1BF059B4AA1003A4662 = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.h;
-                       path = ITMacResourceFile.h;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C01A1C0059B4AA1003A4662 = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.objc;
-                       path = ITMacResourceFile.m;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C01A1C5059B4AAC003A4662 = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.h;
-                       path = ITMacResource.h;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C01A1C6059B4AAC003A4662 = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.objc;
-                       path = ITMacResource.m;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C23B316059BA4AA00E08741 = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.h;
-                       path = ITStringMacResource.h;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C23B317059BA4AA00E08741 = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.objc;
-                       path = ITStringMacResource.m;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C23B320059BA4C000E08741 = {
-                       children = (
-                               7C23B316059BA4AA00E08741,
-                               7C23B317059BA4AA00E08741,
-                       );
-                       isa = PBXGroup;
-                       name = "Custom Types";
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
                7C4BBADA05F98C9900734027 = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
                7C4BBADA05F98C9900734027 = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
                7C992E3E054F5246000B93EA = {
                        children = (
                                7C992E3F054F5246000B93EA,
                7C992E3E054F5246000B93EA = {
                        children = (
                                7C992E3F054F5246000B93EA,
-                               7C992E43054F5246000B93EA,
                        );
                        isa = PBXGroup;
                        path = Graphics;
                        );
                        isa = PBXGroup;
                        path = Graphics;
                        refType = 4;
                        sourceTree = "<group>";
                };
                        refType = 4;
                        sourceTree = "<group>";
                };
-               7C992E43054F5246000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       path = URLTextViewHand.tiff;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
                7C992E44054F5246000B93EA = {
                        fileRef = 7C992E3F054F5246000B93EA;
                        isa = PBXBuildFile;
                        settings = {
                        };
                };
                7C992E44054F5246000B93EA = {
                        fileRef = 7C992E3F054F5246000B93EA;
                        isa = PBXBuildFile;
                        settings = {
                        };
                };
-               7C992E48054F5246000B93EA = {
-                       fileRef = 7C992E43054F5246000B93EA;
-                       isa = PBXBuildFile;
-                       settings = {
-                       };
-               };
                7C992E78054F5285000B93EA = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
                7C992E78054F5285000B93EA = {
                        fileEncoding = 4;
                        isa = PBXFileReference;
                        refType = 4;
                        sourceTree = "<group>";
                };
                        refType = 4;
                        sourceTree = "<group>";
                };
-               7C992FA1054F54C3000B93EA = {
-                       children = (
-                               7C993015054F54F0000B93EA,
-                               7C993016054F54F0000B93EA,
-                               7C99301F054F5509000B93EA,
-                       );
-                       isa = PBXGroup;
-                       name = Deprecated;
-                       path = "";
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C993015054F54F0000B93EA = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.h;
-                       name = ITChasingArrowsView.h;
-                       path = Deprecated/ITChasingArrowsView.h;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C993016054F54F0000B93EA = {
-                       fileEncoding = 4;
-                       isa = PBXFileReference;
-                       lastKnownFileType = sourcecode.c.objc;
-                       name = ITChasingArrowsView.m;
-                       path = Deprecated/ITChasingArrowsView.m;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C99301F054F5509000B93EA = {
-                       children = (
-                               7C993035054F6524000B93EA,
-                               7C993036054F6524000B93EA,
-                               7C993037054F6524000B93EA,
-                               7C993038054F6524000B93EA,
-                               7C993039054F6524000B93EA,
-                               7C99303A054F6524000B93EA,
-                               7C99303B054F6524000B93EA,
-                               7C99303C054F6524000B93EA,
-                               7C99303D054F6524000B93EA,
-                               7C99303E054F6524000B93EA,
-                       );
-                       isa = PBXGroup;
-                       path = Graphics;
-                       refType = 4;
-                       sourceTree = "<group>";
-               };
-               7C993035054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow1.tiff;
-                       path = Deprecated/ITChasingArrow1.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C993036054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow2.tiff;
-                       path = Deprecated/ITChasingArrow2.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C993037054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow3.tiff;
-                       path = Deprecated/ITChasingArrow3.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C993038054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow4.tiff;
-                       path = Deprecated/ITChasingArrow4.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C993039054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow5.tiff;
-                       path = Deprecated/ITChasingArrow5.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C99303A054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow6.tiff;
-                       path = Deprecated/ITChasingArrow6.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C99303B054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow7.tiff;
-                       path = Deprecated/ITChasingArrow7.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C99303C054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow8.tiff;
-                       path = Deprecated/ITChasingArrow8.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C99303D054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow9.tiff;
-                       path = Deprecated/ITChasingArrow9.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
-               7C99303E054F6524000B93EA = {
-                       isa = PBXFileReference;
-                       lastKnownFileType = image.tiff;
-                       name = ITChasingArrow10.tiff;
-                       path = Deprecated/ITChasingArrow10.tiff;
-                       refType = 2;
-                       sourceTree = SOURCE_ROOT;
-               };
                7C993057054F6832000B93EA = {
                        children = (
                                7C992DF9054F5179000B93EA,
                7C993057054F6832000B93EA = {
                        children = (
                                7C992DF9054F5179000B93EA,
                        files = (
                                8DC2EF530486A6940098B216,
                                7C992E44054F5246000B93EA,
                        files = (
                                8DC2EF530486A6940098B216,
                                7C992E44054F5246000B93EA,
-                               7C992E48054F5246000B93EA,
                                2A30D88F056B3AD90087AE54,
                                2A30D8A3056B3BE30087AE54,
                                2A30D8BE056B3C5D0087AE54,
                                2A30D88F056B3AD90087AE54,
                                2A30D8A3056B3BE30087AE54,
                                2A30D8BE056B3C5D0087AE54,
diff --git a/ITMacResource.h b/ITMacResource.h
deleted file mode 100755 (executable)
index c05da2f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-//  ITMacResource.h
-//  ITKit
-//
-//  Created by Joseph Spiros on Thu Dec 25 2003.
-//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <Carbon/Carbon.h>
-
-typedef ResType ITMacResourceType;
-
-@interface ITMacResource : NSObject {
-    @protected
-    Handle _handle;
-}
-+ (void)_registerClass:(Class)class forType:(ITMacResourceType)type;
-+ (Class)_classForType:(ITMacResourceType)type;
-
-+ (id)_resourceWithHandle:(Handle)handle;
-- (id)_initWithHandle:(Handle)handle;
-
-- (Handle)_handle;
-
-- (NSData *)data;
-- (ITMacResourceType)type;
-- (NSNumber *)id;
-- (NSString *)name;
-
-- (Class)nativeRepresentationClass;
-- (id)nativeRepresentation;
-@end
diff --git a/ITMacResource.m b/ITMacResource.m
deleted file mode 100755 (executable)
index 1ae8883..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-//  ITMacResource.m
-//  ITKit
-//
-//  Created by Joseph Spiros on Thu Dec 25 2003.
-//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import "ITMacResource.h"
-
-
-@implementation ITMacResource
-
-static NSMutableDictionary *_resourceTypeClasses = nil;
-
-+ (void)_registerClass:(Class)class forType:(ITMacResourceType)type {
-    if (!_resourceTypeClasses) {
-        _resourceTypeClasses = [[NSMutableDictionary dictionary] retain];
-    }
-    [_resourceTypeClasses setObject:class forKey:[NSString stringWithCString:(char *)type]];
-}
-
-+ (Class)_classForType:(ITMacResourceType)type {
-    Class _class = [_resourceTypeClasses objectForKey:[NSString stringWithCString:(char *)type]];
-    return ((_class == nil) ? [ITMacResource class] : _class);
-}
-
-+ (id)_resourceWithHandle:(Handle)handle { // THIS *WILL* RETURN A MORE SPECIFIC INSTANCE USING THE REGISTRATION DATABASE IF SUCH A CLASS EXISTS
-    return [[[self alloc] _initWithHandle:handle] autorelease];
-}
-
-- (id)_initWithHandle:(Handle)handle {
-    if (self = [super init]) {
-        _handle = handle;
-    }
-    return self;
-}
-
-- (Handle)_handle {
-    return _handle;
-}
-
-- (NSData *)data {
-    NSData *_data;
-    HLock(_handle);
-    _data = [NSData dataWithBytes:(*_handle) length:GetHandleSize(_handle)];
-    HUnlock(_handle);
-    return _data;
-}
-
-- (ITMacResourceType)type {
-    short _id;
-    ResType _type;
-    Str255 _name;
-    GetResInfo(_handle, &_id, &_type, _name);
-    return (ITMacResourceType)_type;
-}
-
-- (NSNumber *)id {
-    short _id;
-    ResType _type;
-    Str255 _name;
-    GetResInfo(_handle, &_id, &_type, _name);
-    return [NSNumber numberWithShort:_id];
-}
-
-- (NSString *)name {
-    short _id;
-    ResType _type;
-    Str255 _name;
-    GetResInfo(_handle, &_id, &_type, _name);
-    return [(NSString*)CFStringCreateWithPascalString(NULL, 
-_name, kCFStringEncodingMacRomanLatin1) autorelease];
-}
-
-- (Class)nativeRepresentationClass {
-    return nil;
-}
-
-- (id)nativeRepresentation {
-    return nil;
-}
-
-- (void)dealloc {
-    ReleaseResource(_handle);
-    [super dealloc];
-}
-
-@end
diff --git a/ITMacResourceFile.h b/ITMacResourceFile.h
deleted file mode 100755 (executable)
index 4cfa271..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-//  ITMacResourceFile.h
-//  ITKit
-//
-//  Created by Joseph Spiros on Thu Dec 25 2003.
-//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <Carbon/Carbon.h>
-#import "ITMacResource.h"
-
-@interface ITMacResourceFile : NSObject {
-    FSRef _fileReference;
-    SInt16 _referenceNumber;
-}
-- (id)initWithContentsOfFile:(NSString *)path;
-- (id)initWithContentsOfFile:(NSString *)path fork:(HFSUniStr255)namedFork;
-
-- (ITMacResource *)resourceOfType:(ITMacResourceType)type withID:(NSNumber *)idNum;
-- (ITMacResource *)resourceOfType:(ITMacResourceType)type withName:(NSString *)name;
-@end
diff --git a/ITMacResourceFile.m b/ITMacResourceFile.m
deleted file mode 100755 (executable)
index 6f39d53..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-//  ITMacResourceFile.m
-//  ITKit
-//
-//  Created by Joseph Spiros on Thu Dec 25 2003.
-//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import "ITMacResourceFile.h"
-
-
-@implementation ITMacResourceFile
-
-- (id)initWithContentsOfFile:(NSString *)path {
-    HFSUniStr255 dataForkName;
-    FSGetDataForkName(&dataForkName);
-    return [self initWithContentsOfFile:path fork:dataForkName];
-}
-
-- (id)initWithContentsOfFile:(NSString *)path fork:(HFSUniStr255)namedFork {
-    if (self = [super init]) {
-        if (FSPathMakeRef([path fileSystemRepresentation],&_fileReference,NULL) == noErr) {
-            FSOpenResourceFile(&_fileReference, namedFork.length, namedFork.unicode, fsRdPerm, &_referenceNumber);
-        } else {
-            // Raise Exception!
-        }
-    }
-    return self;
-}
-
-- (ITMacResource *)resourceOfType:(ITMacResourceType)type withID:(NSNumber *)idNum {
-    return [[ITMacResource _classForType:type] _resourceWithHandle:GetResource((ResType)type,[idNum shortValue])];
-}
-
-- (ITMacResource *)resourceOfType:(ITMacResourceType)type withName:(NSString *)name {
-    Str255 _buffer;
-    StringPtr _ptr = CFStringGetPascalStringPtr((CFStringRef)name, kCFStringEncodingMacRomanLatin1);
-    if (_ptr == NULL) {
-        if (CFStringGetPascalString((CFStringRef)name, _buffer, 256, kCFStringEncodingMacRomanLatin1)) {
-            _ptr = _buffer;
-        } else {
-            // Raise exception!
-        }
-    }
-    return [[ITMacResource _classForType:type] _resourceWithHandle:GetNamedResource((ResType)type,_ptr)];
-}
-
-- (void)dealloc {
-    CloseResFile(_referenceNumber);
-    [super dealloc];
-}
-
-@end
old mode 100755 (executable)
new mode 100644 (file)
index 59ca9c0..01fc748
@@ -1,15 +1,21 @@
-//
-//  ITMultilineTextFieldCell.h
-//  ITKit
-//
-//  Created by Joseph Spiros on Fri Mar 05 2004.
-//  Copyright (c) 2004 __MyCompanyName__. All rights reserved.
-//
+/*
+ *     ITKit
+ *     ITMultilineTextFieldCell.h
+ *
+ *     Custom NSCell subclass that draws multiple lines of text using standard
+ *             UI guidelines for such a presentation.
+ *
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
+ *
+ */
 
 #import <Cocoa/Cocoa.h>
 
 
 #import <Cocoa/Cocoa.h>
 
-
 @interface ITMultilineTextFieldCell : NSCell {
 @interface ITMultilineTextFieldCell : NSCell {
+
 }
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index b804768..3fda642
-//
-//  ITMultilineTextFieldCell.m
-//  ITKit
-//
-//  Created by Joseph Spiros on Fri Mar 05 2004.
-//  Copyright (c) 2004 __MyCompanyName__. All rights reserved.
-//
-
 #import "ITMultilineTextFieldCell.h"
 
 #import "ITMultilineTextFieldCell.h"
 
-
 @implementation ITMultilineTextFieldCell
 
 @implementation ITMultilineTextFieldCell
 
-- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
-{
-    if ([[self objectValue] isKindOfClass:[NSArray class]]) {
-    
-        /*
-            Okay, here's the different possibilities for the objectValue of this cell, and how they're displayed:
-            
-                NSArray of NSStrings - Draw first line with System Font, following lines with Small System Font
-                NSArray of NSAttributedStrings - Draw as given
-                NSArray of both - Draw each line as above!
-            
-            The number of lines is determined by the contents of the array...
-        */
-    
-        NSColor *defaultColor;
-        NSMutableParagraphStyle *paragraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease];
-        [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
-        NSPoint cellPoint = cellFrame.origin;
-        NSSize cellSize = cellFrame.size;
-        
-        NSRect secondaryLineRect;
-        
-        if ([self isHighlighted] && ([self highlightColorWithFrame:cellFrame inView:controlView]!=[NSColor secondarySelectedControlColor])) {
-            defaultColor = [NSColor whiteColor];
-        } else {
-            defaultColor = [NSColor blackColor];
-        }
-        
-        // Process the first line...
-        {
-            NSDictionary *firstLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont boldSystemFontOfSize:[NSFont systemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil];
-            
-            NSRect firstLineRect = NSMakeRect(cellPoint.x+5, cellPoint.y+1, cellSize.width-5, cellSize.height);
-            
-            id firstString = [[self objectValue] objectAtIndex:0];
-            NSMutableAttributedString *firstAttrString;
-            
-            if ([firstString isKindOfClass:[NSAttributedString class]]) {
-                firstAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:firstString] autorelease];
-                [firstAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[firstAttrString length])];
-                if ([defaultColor isEqual:[NSColor whiteColor]]) {
-                [firstAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[firstAttrString length])];
-                }
-            } else if ([firstString isKindOfClass:[NSString class]]) {
-                firstAttrString = [[[NSMutableAttributedString alloc] initWithString:firstString attributes:firstLineAttributes] autorelease];
-            } else {
-                firstAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", firstString] attributes:firstLineAttributes] autorelease];
-            }
-            
-            [controlView lockFocus];
-            
-            [firstAttrString drawInRect:firstLineRect];
-            
-            [controlView unlockFocus];
-            
-            secondaryLineRect = NSMakeRect(cellPoint.x+5, (cellPoint.y+1+[firstAttrString size].height), cellSize.width-5, cellSize.height);
-        }
-        
-        // Process the secondary lines
-        {
-            NSDictionary *secondaryLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil];
-            
-            NSMutableArray *tMArray = [NSMutableArray arrayWithArray:[self objectValue]];
-            [tMArray removeObjectAtIndex:0]; // Remove the first line string... already handled that above!
-            
-            NSEnumerator *enumerator = [tMArray objectEnumerator];
-            id secondaryString;
-            
-            while (secondaryString = [enumerator nextObject]) {
-                
-                NSMutableAttributedString *secondaryAttrString;
-                
-                if ([secondaryString isKindOfClass:[NSAttributedString class]]) {
-                    secondaryAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:secondaryString] autorelease];
-                    [secondaryAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[secondaryAttrString length])];
-                    if ([defaultColor isEqual:[NSColor whiteColor]]) {
-                    [secondaryAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[secondaryAttrString length])];
-                    }
-                } else if ([secondaryString isKindOfClass:[NSString class]]) {
-                    secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:secondaryString attributes:secondaryLineAttributes] autorelease];
-                } else {
-                    secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", secondaryString] attributes:secondaryLineAttributes] autorelease];
-                }
-                
-                [controlView lockFocus];
-                
-                [secondaryAttrString drawInRect:secondaryLineRect];
-                
-                [controlView unlockFocus];
-                
-                secondaryLineRect.origin.y = secondaryLineRect.origin.y+[secondaryAttrString size].height; // modify the rect for the next loop, based on the size and location of the most recently processed line.
-            
-            }
-        }
-    } else {
-        [super drawInteriorWithFrame:cellFrame inView:controlView];
-    }
+- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
+       if ([(id)[self objectValue] isKindOfClass:[NSArray class]]) {
+       
+               /*
+                       Okay, here's the different possibilities for the objectValue of this cell, and how they're displayed:
+                       
+                               NSArray of NSStrings - Draw first line with System Font, following lines with Small System Font
+                               NSArray of NSAttributedStrings - Draw as given
+                               NSArray of both - Draw each line as above!
+                       
+                       The number of lines is determined by the contents of the array...
+               */
+       
+               NSColor *defaultColor;
+               NSMutableParagraphStyle *paragraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease];
+               [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail];
+               NSPoint cellPoint = cellFrame.origin;
+               NSSize cellSize = cellFrame.size;
+               
+               NSRect secondaryLineRect;
+               
+               if ([self isHighlighted] && ([self highlightColorWithFrame:cellFrame inView:controlView]!=[NSColor secondarySelectedControlColor])) {
+                       defaultColor = [NSColor whiteColor];
+               } else {
+                       defaultColor = [NSColor blackColor];
+               }
+               
+               // Process the first line...
+               {
+                       NSDictionary *firstLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont boldSystemFontOfSize:[NSFont systemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil];
+                       
+                       NSRect firstLineRect = NSMakeRect(cellPoint.x+5, cellPoint.y+1, cellSize.width-5, cellSize.height);
+                       
+                       id firstString = [(NSArray *)[self objectValue] objectAtIndex:0];
+                       NSMutableAttributedString *firstAttrString;
+                       
+                       if ([firstString isKindOfClass:[NSAttributedString class]]) {
+                               firstAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:firstString] autorelease];
+                               [firstAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[firstAttrString length])];
+                               if ([defaultColor isEqual:[NSColor whiteColor]]) {
+                               [firstAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[firstAttrString length])];
+                               }
+                       } else if ([firstString isKindOfClass:[NSString class]]) {
+                               firstAttrString = [[[NSMutableAttributedString alloc] initWithString:firstString attributes:firstLineAttributes] autorelease];
+                       } else {
+                               firstAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", firstString] attributes:firstLineAttributes] autorelease];
+                       }
+                       
+                       [controlView lockFocus];
+                       
+                       [firstAttrString drawInRect:firstLineRect];
+                       
+                       [controlView unlockFocus];
+                       
+                       secondaryLineRect = NSMakeRect(cellPoint.x+5, (cellPoint.y+1+[firstAttrString size].height), cellSize.width-5, cellSize.height);
+               }
+               
+               // Process the secondary lines
+               {
+                       NSDictionary *secondaryLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil];
+                       
+                       NSMutableArray *tMArray = [NSMutableArray arrayWithArray:(NSArray *)[self objectValue]];
+                       [tMArray removeObjectAtIndex:0]; // Remove the first line string... already handled that above!
+                       
+                       NSEnumerator *enumerator = [tMArray objectEnumerator];
+                       id secondaryString;
+                       
+                       while ((secondaryString = [enumerator nextObject])) {
+                               
+                               NSMutableAttributedString *secondaryAttrString;
+                               
+                               if ([secondaryString isKindOfClass:[NSAttributedString class]]) {
+                                       secondaryAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:secondaryString] autorelease];
+                                       [secondaryAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[secondaryAttrString length])];
+                                       if ([defaultColor isEqual:[NSColor whiteColor]]) {
+                                       [secondaryAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[secondaryAttrString length])];
+                                       }
+                               } else if ([secondaryString isKindOfClass:[NSString class]]) {
+                                       secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:secondaryString attributes:secondaryLineAttributes] autorelease];
+                               } else {
+                                       secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", secondaryString] attributes:secondaryLineAttributes] autorelease];
+                               }
+                               
+                               [controlView lockFocus];
+                               
+                               [secondaryAttrString drawInRect:secondaryLineRect];
+                               
+                               [controlView unlockFocus];
+                               
+                               secondaryLineRect.origin.y = secondaryLineRect.origin.y+[secondaryAttrString size].height; // modify the rect for the next loop, based on the size and location of the most recently processed line.
+                       
+                       }
+               }
+       } else {
+               [super drawInteriorWithFrame:cellFrame inView:controlView];
+       }
 }
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index ae69b00..add7c1c
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITPivotWindowEffect
- *    Effect subclass which pivots (rotates) a window into position on the screen.
+ *     ITPivotWindowEffect.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Effect subclass which pivots (rotates) a window into position on the screen.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITPivotWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITPivotWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 5054912..32b042d
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITSlideHorizontallyWindowEffect
- *    Effect subclass which slides a window in from the right or left side of the screen.
+ *     ITSlideHorizontallyWindowEffect.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Effect subclass which slides a window in from the right or left side of the screen.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITSlideHorizontallyWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITSlideHorizontallyWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 58a4fe9..842c5d2
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITSlideVerticallyWindowEffect
- *    Effect subclass which slides a window in from the top or bottom of the screen.
+ *     ITSlideVerticallyWindowEffect.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Effect subclass which slides a window in from the top or bottom of the screen.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITSlideVerticallyWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITSlideVerticallyWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 5f923ec..750331f
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITSpinAndZoomWindowEffect
- *    Effect subclass which Spins (expands/shrinks) a window into position on the screen.
+ *     ITSpinAndZoomWindowEffect.h
  *
  *
- *  Original Author : Kent Sutherland <ksutherland@ithinksw.com>
- *   Responsibility : Kent Sutherland <ksutherland@ithinksw.com>
+ *     Effect subclass which spins and zooms a window into position on the screen.
  *
  *
- *  Copyright (c) 2002 - 2004 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITSpinAndZoomWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITSpinAndZoomWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index ee6fad8..93cf3b4
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITSpinWindowEffect
- *    Effect subclass which Spins (expands/shrinks) a window into position on the screen.
+ *     ITSpinWindowEffect.h
  *
  *
- *  Original Author : Kent Sutherland <ksutherland@ithinksw.com>
- *   Responsibility : Kent Sutherland <ksutherland@ithinksw.com>
+ *     Effect subclass which spins a window into position on the screen.
  *
  *
- *  Copyright (c) 2002 - 2004 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITSpinWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITSpinWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 40ac83c..42ab05c 100644 (file)
@@ -1,15 +1,24 @@
-/* ITSplashScreen */
+/*
+ *     ITKit
+ *     ITSplashScreen.h
+ *
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
+ *
+ */
 
 #import <Cocoa/Cocoa.h>
 
 @class ITSplashWindow, ITSplashView;
 
 
 #import <Cocoa/Cocoa.h>
 
 @class ITSplashWindow, ITSplashView;
 
-@interface ITSplashScreen : NSObject
-{
+@interface ITSplashScreen : NSObject {
        NSTimer *_fadeTimer;
        ITSplashWindow *_window;
        ITSplashView *_view;
 }
        NSTimer *_fadeTimer;
        ITSplashWindow *_window;
        ITSplashView *_view;
 }
+
 + (ITSplashScreen *)sharedController;
 
 - (double)progressValue;
 + (ITSplashScreen *)sharedController;
 
 - (double)progressValue;
@@ -22,4 +31,5 @@
 
 - (void)showSplashWindow;
 - (void)closeSplashWindow;
 
 - (void)showSplashWindow;
 - (void)closeSplashWindow;
-@end
+
+@end
\ No newline at end of file
index ce7a8cd..f41ddb6 100644 (file)
@@ -2,21 +2,19 @@
 #import "ITSplashWindow.h"
 #import "ITSplashView.h"
 
 #import "ITSplashWindow.h"
 #import "ITSplashView.h"
 
-static ITSplashScreen *_sharedController;
+static ITSplashScreen *_sharedScreen;
 
 @implementation ITSplashScreen
 
 
 @implementation ITSplashScreen
 
-+ (ITSplashScreen *)sharedController
-{
-       if (!_sharedController) {
-               _sharedController = [[ITSplashScreen alloc] init];
++ (ITSplashScreen *)sharedController {
+       if (!_sharedScreen) {
+               _sharedScreen = [[ITSplashScreen alloc] init];
        }
        }
-       return _sharedController;
+       return _sharedScreen;
 }
 
 }
 
-- (id)init
-{
-       if ( (self = [super init]) ) {
+- (id)init {
+       if ((self = [super init])) {
                _window = [[ITSplashWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
                _view = [[ITSplashView alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)];
                [_window setLevel:NSStatusWindowLevel];
                _window = [[ITSplashWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
                _view = [[ITSplashView alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)];
                [_window setLevel:NSStatusWindowLevel];
@@ -25,19 +23,16 @@ static ITSplashScreen *_sharedController;
        return self;
 }
 
        return self;
 }
 
-- (void)dealloc
-{
+- (void)dealloc {
        [_window release];
        [super dealloc];
 }
 
        [_window release];
        [super dealloc];
 }
 
-- (double)progressValue
-{
+- (double)progressValue {
        return ([[_view progressIndicator] doubleValue] / 100.0);
 }
 
        return ([[_view progressIndicator] doubleValue] / 100.0);
 }
 
-- (void)setProgressValue:(double)progress
-{
+- (void)setProgressValue:(double)progress {
        if (progress >= 1.0) {
                [[_view progressIndicator] setIndeterminate:YES];
        } else {
        if (progress >= 1.0) {
                [[_view progressIndicator] setIndeterminate:YES];
        } else {
@@ -45,13 +40,11 @@ static ITSplashScreen *_sharedController;
        }
 }
 
        }
 }
 
-- (NSImage *)image
-{
+- (NSImage *)image {
        return [_view image];
 }
 
        return [_view image];
 }
 
-- (void)setImage:(NSImage *)image
-{
+- (void)setImage:(NSImage *)image {
        NSRect rect = NSZeroRect, newRect = [_window frame];
        rect.size = [image size];
        newRect.size = rect.size;
        NSRect rect = NSZeroRect, newRect = [_window frame];
        rect.size = [image size];
        newRect.size = rect.size;
@@ -63,48 +56,41 @@ static ITSplashScreen *_sharedController;
        [_window center];
 }
 
        [_window center];
 }
 
-- (NSString *)string
-{
+- (NSString *)string {
        return [_view string];
 }
 
        return [_view string];
 }
 
-- (void)setString:(NSString *)string
-{
+- (void)setString:(NSString *)string {
        [_view setString:string];
 }
 
        [_view setString:string];
 }
 
-- (void)setSettingsPath:(NSString *)path
-{
+- (void)setSettingsPath:(NSString *)path {
        [_view loadControlsFromPath:path];
 }
 
        [_view loadControlsFromPath:path];
 }
 
-- (void)showSplashWindow
-{
+- (void)showSplashWindow {
        //[_window setAlphaValue:0.0];
        [_window makeKeyAndOrderFront:nil];
        //_fadeTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(showStep:) userInfo:nil repeats:YES];
 }
 
        //[_window setAlphaValue:0.0];
        [_window makeKeyAndOrderFront:nil];
        //_fadeTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(showStep:) userInfo:nil repeats:YES];
 }
 
-- (void)showStep:(NSTimer *)timer
-{
-       [_window setAlphaValue:[_window alphaValue] + 0.05];
+- (void)showStep:(NSTimer *)timer {
+       [_window setAlphaValue:([_window alphaValue] + 0.05)];
        if ([_window alphaValue] >= 1.0) {
                [timer invalidate];
                _fadeTimer = nil;
        }
 }
 
        if ([_window alphaValue] >= 1.0) {
                [timer invalidate];
                _fadeTimer = nil;
        }
 }
 
-- (void)closeSplashWindow
-{
+- (void)closeSplashWindow {
        if (_fadeTimer) {
                [_fadeTimer invalidate];
        }
        _fadeTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(closeStep:) userInfo:nil repeats:YES];
 }
 
        if (_fadeTimer) {
                [_fadeTimer invalidate];
        }
        _fadeTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(closeStep:) userInfo:nil repeats:YES];
 }
 
-- (void)closeStep:(NSTimer *)timer
-{
-       [_window setAlphaValue:[_window alphaValue] - 0.05];
+- (void)closeStep:(NSTimer *)timer {
+       [_window setAlphaValue:([_window alphaValue] - 0.05)];
        if ([_window alphaValue] <= 0.0) {
                [timer invalidate];
                _fadeTimer = nil;
        if ([_window alphaValue] <= 0.0) {
                [timer invalidate];
                _fadeTimer = nil;
index 359bd3c..03ea722 100644 (file)
@@ -1,19 +1,22 @@
-//
-//  ITSplashView.h
-//  SplashScreen
-//
-//  Created by Kent Sutherland on 11/22/04.
-//  Copyright 2004 __MyCompanyName__. All rights reserved.
-//
+/*
+ *     ITKit
+ *     ITSplashView.h
+ *
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
+ *
+ */
 
 #import <Cocoa/Cocoa.h>
 
 
 #import <Cocoa/Cocoa.h>
 
-@interface ITSplashView : NSView
-{
+@interface ITSplashView : NSView {
        NSImage *_image;
        NSProgressIndicator *_progress;
        NSTextField *_text;
 }
        NSImage *_image;
        NSProgressIndicator *_progress;
        NSTextField *_text;
 }
+
 - (void)stopAnimation;
 - (NSProgressIndicator *)progressIndicator;
 - (NSImage *)image;
 - (void)stopAnimation;
 - (NSProgressIndicator *)progressIndicator;
 - (NSImage *)image;
@@ -21,4 +24,5 @@
 - (void)setImage:(NSImage *)image;
 - (void)setString:(NSString *)text;
 - (void)loadControlsFromPath:(NSString *)path;
 - (void)setImage:(NSImage *)image;
 - (void)setString:(NSString *)text;
 - (void)loadControlsFromPath:(NSString *)path;
-@end
+
+@end
\ No newline at end of file
index 5c90f53..d400a13 100644 (file)
@@ -1,73 +1,48 @@
-//
-//  ITSplashView.m
-//  SplashScreen
-//
-//  Created by Kent Sutherland on 11/22/04.
-//  Copyright 2004 __MyCompanyName__. All rights reserved.
-//
-
 #import "ITSplashView.h"
 
 @implementation ITSplashView
 
 #import "ITSplashView.h"
 
 @implementation ITSplashView
 
-- (id)initWithFrame:(NSRect)frame
-{
-    if ( (self = [super initWithFrame:frame]) ) {
-    }
-    return self;
-}
-
-- (void)dealloc
-{
+- (void)dealloc {
        [_image release];
        [_progress release];
        [_text release];
        [super dealloc];
 }
 
        [_image release];
        [_progress release];
        [_text release];
        [super dealloc];
 }
 
-- (void)drawRect:(NSRect)rect
-{
+- (void)drawRect:(NSRect)rect {
        [_image compositeToPoint:NSZeroPoint operation:NSCompositeSourceOver];
 }
 
        [_image compositeToPoint:NSZeroPoint operation:NSCompositeSourceOver];
 }
 
-- (BOOL)isOpaque
-{
+- (BOOL)isOpaque {
        return NO;
 }
 
        return NO;
 }
 
-- (void)stopAnimation
-{
+- (void)stopAnimation {
        [_progress stopAnimation:nil];
 }
 
        [_progress stopAnimation:nil];
 }
 
-- (NSProgressIndicator *)progressIndicator
-{
+- (NSProgressIndicator *)progressIndicator {
        return _progress;
 }
 
        return _progress;
 }
 
-- (NSImage *)image
-{
+- (NSImage *)image {
        return _image;
 }
 
        return _image;
 }
 
-- (NSString *)string
-{
+- (NSString *)string {
        return [_text stringValue];
 }
 
        return [_text stringValue];
 }
 
-- (void)setImage:(NSImage *)image
-{
+- (void)setImage:(NSImage *)image {
        [_image autorelease];
        _image = [image retain];
 }
 
        [_image autorelease];
        _image = [image retain];
 }
 
-- (void)setString:(NSString *)text
-{
+- (void)setString:(NSString *)text {
        [_text setStringValue:text];
 }
 
        [_text setStringValue:text];
 }
 
-- (void)loadControlsFromPath:(NSString *)path
-{
+- (void)loadControlsFromPath:(NSString *)path {
        [_progress removeFromSuperview];
        [_progress release];
        [_text removeFromSuperview];
        [_progress removeFromSuperview];
        [_progress release];
        [_text removeFromSuperview];
        switch (height) {
                /*case NSProgressIndicatorPreferredSmallThickness:
                        size = NSMiniControlSize;
        switch (height) {
                /*case NSProgressIndicatorPreferredSmallThickness:
                        size = NSMiniControlSize;
-               break;*/
+                       break;*/
                case NSProgressIndicatorPreferredAquaThickness:
                        size = NSSmallControlSize;
                case NSProgressIndicatorPreferredAquaThickness:
                        size = NSSmallControlSize;
-               break;
+                       break;
                case NSProgressIndicatorPreferredThickness:
                default:
                        size = NSRegularControlSize;
                case NSProgressIndicatorPreferredThickness:
                default:
                        size = NSRegularControlSize;
-               break;
+                       break;
        }
        if ([[settings objectForKey:@"ProgressIndicator.style"] intValue] == 0) {
                //We have a normal bar
        }
        if ([[settings objectForKey:@"ProgressIndicator.style"] intValue] == 0) {
                //We have a normal bar
        [settings release];
 }
 
        [settings release];
 }
 
-@end
+@end
\ No newline at end of file
index 48c17e2..d959a7a 100644 (file)
@@ -1,8 +1,18 @@
-/* ITSplashWindow */
+/*
+ *     ITKit
+ *     ITSplashWindow.h
+ *
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
+ *
+ */
 
 #import <Cocoa/Cocoa.h>
 
 
 #import <Cocoa/Cocoa.h>
 
-@interface ITSplashWindow : NSWindow
-{
+@interface ITSplashWindow : NSWindow {
+
 }
 }
-@end
+
+@end
\ No newline at end of file
index a41d7e1..63d6923 100644 (file)
@@ -3,9 +3,8 @@
 
 @implementation ITSplashWindow
 
 
 @implementation ITSplashWindow
 
-- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag
-{
-       if ( (self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) ) {
+- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag {
+       if ((self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO])) {
                [self setOpaque:NO];
                [self setBackgroundColor:[NSColor clearColor]];
                [self setHasShadow:YES];
                [self setOpaque:NO];
                [self setBackgroundColor:[NSColor clearColor]];
                [self setHasShadow:YES];
        return self;
 }
 
        return self;
 }
 
-- (BOOL)canBecomeKeyWindow
-{
+- (BOOL)canBecomeKeyWindow {
        return YES;
 }
 
        return YES;
 }
 
-- (BOOL)isKeyWindow
-{
+- (BOOL)isKeyWindow {
        return YES;
 }
 
        return YES;
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index fb381e0..f2f6070
@@ -1,49 +1,26 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITStatusItem
- *    NSStatusItem subclass which reduces suckage
+ *     ITStatusItem.h
  *
  *
- *  Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     NSStatusItem subclass which attempts to approximate NSMenuExtra's
+ *             appearance and functionality.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
  *
  *
- */
-
-/*
- *     This subclass does 4 things to approximate NSMenuExtra's functionality:
- *
- *  1. Makes the status item smarter about highlighting.
- *  2. Allows you to set an alternate (inverted) image.
- *  3. Eliminates the pre-Jaguar shadow behind a normal status item.
- *  4. If you use an image AND title, the text will be made slightly smaller
- *     to resemble the visual interface of an NSMenuExtra.
- *
- *  Note:  In order to have the shadow not overlap the bottom of the
- *  menubar, Apple moves the image up one pixel.  Since that shadow is
- *  no longer drawn, please adjust your images DOWN one pixel to compensate.
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
+@interface ITStatusItem : NSStatusItem {
 
 
-@interface ITStatusItem : NSStatusItem
-{
 }
 
 }
 
-// Use this to create a new retained status item.
-// It will appear in the system status bar, and
-// default to YES for its highlightMode.
-- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length;
-
-// These allow you to use an alternate (selected) image for your status item.
-- (NSImage*) alternateImage;
-- (void) setAlternateImage:(NSImage*)image;
+- (id)initWithStatusBar:(NSStatusBar *)statusBar withLength:(float)length;
 
 
+- (NSImage *)alternateImage;
+- (void)setAlternateImage:(NSImage *)image;
 
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index bf1d18f..b758d5c
@@ -1,98 +1,54 @@
 #import "ITStatusItem.h"
 
 #import "ITStatusItem.h"
 
-/*************************************************************************/
-#pragma mark -
-#pragma mark EVIL HACKERY
-/*************************************************************************/
+@class NSStatusBarButton;
 
 
-// This stuff is actually implemented by the AppKit.
-// We declare it here to cancel out warnings.
-
-@interface NSStatusBarButton : NSButton
+@interface NSStatusItem (ITStatusItemHacks)
+- (id)_initInStatusBar:(NSStatusBar *)statusBar withLength:(float)length withPriority:(int)priority;
+- (NSStatusBarButton *)_button;
 @end
 
 @end
 
-@interface NSStatusItem (HACKHACKHACKHACK)
-- (id)_initInStatusBar:(NSStatusBar*)statusBar
-             withLength:(float)length
-           withPriority:(int)priority;
-- (NSStatusBarButton*)_button;
+@protocol _ITStatusItemNSStatusItemPantherCompatability
+- (void)setAlternateImage:(NSImage *)image;
+- (NSImage *)alternateImage;
 @end
 
 @end
 
+@implementation ITStatusItem
 
 
-/*************************************************************************/
-#pragma mark -
-#pragma mark PRIVATE METHOD DECLARATIONS
-/*************************************************************************/
-
-@interface ITStatusItem (Private)
-- (void)setImage:(NSImage*)image;
-- (NSString*) title;
-- (void)setTitle:(NSString*)title;
-- (void)setSmallTitle:(NSString*)title;
-@end
-
+static BOOL _ITStatusItemShouldKillShadow = NO;
 
 
-@implementation ITStatusItem
++ (void)initialize {
+       if ((floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_1) && (floor(NSAppKitVersionNumber) <= 663.6)) {
+               _ITStatusItemShouldKillShadow = YES;
+       }
+}
 
 
-/*************************************************************************/
-#pragma mark -
-#pragma mark INITIALIZATION METHODS
-/*************************************************************************/
+- (id)initWithStatusBar:(NSStatusBar *)statusBar withLength:(float)length {
+       return [self _initInStatusBar:statusBar withLength:length withPriority:1000];
+}
 
 
-- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length
-{
-    if ( ( self = [super _initInStatusBar:statusBar
-                               withLength:length
-                             withPriority:1000] ) ) {
-                             
-        //Eliminate the fucking shadow...
-        [[[self _button] cell] setType:NSNullCellType];
-        
-        //Be something other than a dumbshit about highlighting...
+- (id)_initInStatusBar:(NSStatusBar *)statusBar withLength:(float)length withPriority:(int)priority {
+    if ((self = [super _initInStatusBar:statusBar withLength:length withPriority:priority])) {
+               if (_ITStatusItemShouldKillShadow) {
+                       [[(NSButton *)[self _button] cell] setType:NSNullCellType];
+               }
         [self setHighlightMode:YES];
     }
     return self;
 }
 
         [self setHighlightMode:YES];
     }
     return self;
 }
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark ACCESSOR METHODS
-/*************************************************************************/
-
-- (NSImage*)alternateImage {
-    return [[self _button] alternateImage];
+- (NSImage *)alternateImage {
+       if ([super respondsToSelector:@selector(alternateImage)]) {
+               return [(id <_ITStatusItemNSStatusItemPantherCompatability>)super alternateImage];
+       }
+       return [(NSButton *)[self _button] alternateImage];
 }
 
 - (void)setAlternateImage:(NSImage*)image {
 }
 
 - (void)setAlternateImage:(NSImage*)image {
-    [[self _button] setAlternateImage:image];
+       if ([super respondsToSelector:@selector(setAlternateImage:)]) {
+               [(id <_ITStatusItemNSStatusItemPantherCompatability>)super setAlternateImage:image];
+               return;
+       }
+    [(NSButton *)[self _button] setAlternateImage:image];
 }
 
 }
 
-- (void)setImage:(NSImage*)image {
-    [super setImage:image];
-    if ( [self title] ) {
-        [self setTitle:[self title]];
-    } 
-}
-
-- (void)setTitle:(NSString*)title {
-    if ( [self image] && (title != nil) ) {
-        [self setSmallTitle:title];
-    } else {
-        [super setTitle:title];
-    }
-}
-
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark PRIVATE METHODS
-/*************************************************************************/
-
-- (void)setSmallTitle:(NSString*)title {
-    NSAttributedString *attrTitle = [[[NSAttributedString alloc] initWithString:title attributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"LucidaGrande" size:12.0] forKey:NSFontAttributeName]] autorelease];
-    [self setAttributedTitle:attrTitle];
-}
-
-
-@end
+@end
\ No newline at end of file
diff --git a/ITStringMacResource.h b/ITStringMacResource.h
deleted file mode 100755 (executable)
index 096d941..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-//
-//  ITStringMacResource.h
-//  ITKit
-//
-//  Created by Joseph Spiros on Thu Dec 25 2003.
-//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "ITMacResource.h"
-
-@interface ITStringMacResource : ITMacResource {
-
-}
-
-@end
diff --git a/ITStringMacResource.m b/ITStringMacResource.m
deleted file mode 100755 (executable)
index 3cc887b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-//  ITStringMacResource.m
-//  ITKit
-//
-//  Created by Joseph Spiros on Thu Dec 25 2003.
-//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
-//
-
-#import "ITStringMacResource.h"
-
-
-@implementation ITStringMacResource
-
-+ (void)load {
-    [ITMacResource _registerClass:self forType:'STR '];
-}
-
-- (Class)nativeRepresentationClass {
-    return [NSString class];
-}
-
-- (id)nativeRepresentation {
-    return @"Not Implemented Yet";
-}
-
-@end
old mode 100755 (executable)
new mode 100644 (file)
index 129eb03..ad1d854
@@ -1,30 +1,28 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITTSWBackgroundView
- *    NSView subclass which draws a translucent background with rounded corners.
+ *     ITTSWBackgroundView.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     NSView subclass which draws a translucent background with rounded corners.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
 #import <Cocoa/Cocoa.h>
 
  *
  */
 
 #import <Cocoa/Cocoa.h>
 
-
 typedef enum _ITTSWBackgroundMode {
     ITTSWBackgroundApple,
     ITTSWBackgroundReadable,
     ITTSWBackgroundColored
 } ITTSWBackgroundMode;
 
 typedef enum _ITTSWBackgroundMode {
     ITTSWBackgroundApple,
     ITTSWBackgroundReadable,
     ITTSWBackgroundColored
 } ITTSWBackgroundMode;
 
-
 @interface ITTSWBackgroundView : NSView {
 @interface ITTSWBackgroundView : NSView {
-    NSBezierPath        *_path;
-    NSColor             *_color;
-    ITTSWBackgroundMode  _mode;
+    NSBezierPath *_path;
+    NSColor *_color;
+    ITTSWBackgroundMode _mode;
 }
 
 - (ITTSWBackgroundMode)backgroundMode;
 }
 
 - (ITTSWBackgroundMode)backgroundMode;
@@ -33,4 +31,4 @@ typedef enum _ITTSWBackgroundMode {
 - (NSColor *)backgroundColor;
 - (void)setBackgroundColor:(NSColor *)newColor;
 
 - (NSColor *)backgroundColor;
 - (void)setBackgroundColor:(NSColor *)newColor;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 89b5fef..36d1ca6
@@ -1,39 +1,30 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITTabView
- *    NSTabView subclass which includes convenience features
+ *     ITTabView.h
  *
  *
- *  Original Author : Kent Sutherland <kent.sutherland@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Kent Sutherland <kent.sutherland@ithinksw.com>
+ *     NSTabView subclass which allows dragging (reordering) of tab view items.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-/*
- *     This subclass enables drag-and-drop for tab view items.
- */
-
-
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
-
-@interface ITTabView : NSTabView
-{
-    NSTabViewItem *_draggedTab;
-    bool _allowsDragging;
-    unsigned int _requiredModifiers;
+@interface ITTabView : NSTabView {
+       NSTabViewItem *_draggedTab;
+       BOOL _allowsDragging;
+       unsigned int _requiredModifiers;
 }
 
 }
 
-- (void)setAllowsDragging:(bool)flag;
-- (bool)allowsDragging;
+- (void)setAllowsDragging:(BOOL)flag;
+- (BOOL)allowsDragging;
 
 - (void)setRequiredModifiers:(unsigned int)modifiers;
 - (unsigned int)requiredModifiers;
 
 - (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index;
 
 
 - (void)setRequiredModifiers:(unsigned int)modifiers;
 - (unsigned int)requiredModifiers;
 
 - (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index;
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 66f0bcc..a94825a
@@ -1,95 +1,79 @@
 #import "ITTabView.h"
 
 #import "ITTabView.h"
 
-/*************************************************************************/
-#pragma mark -
-#pragma mark EVIL HACKERY
-/*************************************************************************/
-
-@interface NSTabViewItem (HACKHACKHACKHACK)
+@interface NSTabViewItem (ITTabViewHacks)
 - (NSRect)_tabRect;
 @end
 
 - (NSRect)_tabRect;
 @end
 
-
 @implementation ITTabView
 
 @implementation ITTabView
 
-- (id)initWithFrame:(NSRect)frame
-{
-    if ( (self = [super initWithFrame:frame]) ) {
-        _draggedTab = nil;
-        _allowsDragging = NO;
-        _requiredModifiers = NSCommandKeyMask;
-    }
-    return self;
+- (id)initWithFrame:(NSRect)frame {
+       if ((self = [super initWithFrame:frame])) {
+               _draggedTab = nil;
+               _allowsDragging = NO;
+               _requiredModifiers = NSCommandKeyMask;
+       }
+       return self;
 }
 
 }
 
-- (void)setAllowsDragging:(bool)flag
-{
-    _allowsDragging = flag;
-    _requiredModifiers = NSCommandKeyMask;
+- (void)setAllowsDragging:(BOOL)flag {
+       _allowsDragging = flag;
 }
 
 }
 
-- (bool)allowsDragging
-{
-    return _allowsDragging;
+- (BOOL)allowsDragging {
+       return _allowsDragging;
 }
 
 }
 
-- (void)setRequiredModifiers:(unsigned int)modifiers
-{
-    _requiredModifiers = modifiers;
+- (void)setRequiredModifiers:(unsigned int)modifiers {
+       _requiredModifiers = modifiers;
 }
 
 }
 
-- (unsigned int)requiredModifiers
-{
-    return _requiredModifiers;
+- (unsigned int)requiredModifiers {
+       return _requiredModifiers;
 }
 
 }
 
-- (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index
-{
-    if ([self indexOfTabViewItem:tab] != index)
-    {
-        [tab retain];
-        [self removeTabViewItem:tab];
-        [self insertTabViewItem:tab atIndex:index];
-        [self selectTabViewItem:tab];
-    }
+- (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index {
+       int oldIndex = [self indexOfTabViewItem:tab];
+       if ((oldIndex != NSNotFound) && (oldIndex != index)) {
+               [tab retain];
+               [self removeTabViewItem:tab];
+               [self insertTabViewItem:tab atIndex:index];
+               [self selectTabViewItem:tab];
+               [tab release];
+       }
 }
 
 }
 
-- (void)mouseDown:(NSEvent *)event
-{
-    if ((_requiredModifiers == 0 || ([[NSApp currentEvent] modifierFlags] & _requiredModifiers)) && [self allowsDragging]) {
-        NSPoint clickedPoint;
-        clickedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]];
-        NSTabViewItem *clickedTab = [self tabViewItemAtPoint:clickedPoint];
-        _draggedTab = clickedTab;
-    }
-    [super mouseDown:event];
+- (void)mouseDown:(NSEvent *)event {
+       if ((_requiredModifiers == 0 || ([[NSApp currentEvent] modifierFlags] & _requiredModifiers)) && [self allowsDragging]) {
+               NSPoint clickedPoint;
+               clickedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]];
+               NSTabViewItem *clickedTab = [self tabViewItemAtPoint:clickedPoint];
+               _draggedTab = clickedTab;
+       }
+       [super mouseDown:event];
 }
 
 }
 
-- (void)mouseUp:(NSEvent *)event
-{
-    if (_draggedTab && [self allowsDragging]) {
-        NSPoint releasedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]];
-        NSTabViewItem *releasedTab = [self tabViewItemAtPoint:releasedPoint];
-        if (releasedTab && ![releasedTab isEqualTo:_draggedTab]) {
-            [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:releasedTab]];
-        }
-        _draggedTab = nil;
-    }
-    [super mouseUp:event];
+- (void)mouseUp:(NSEvent *)event {
+       if (_draggedTab && [self allowsDragging]) {
+               NSPoint releasedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]];
+               NSTabViewItem *releasedTab = [self tabViewItemAtPoint:releasedPoint];
+               if (releasedTab && ![releasedTab isEqualTo:_draggedTab]) {
+                       [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:releasedTab]];
+               }
+               _draggedTab = nil;
+       }
+       [super mouseUp:event];
 }
 
 }
 
-- (void)mouseDragged:(NSEvent *)event
-{
-    if (_draggedTab && [self allowsDragging]) {
-        NSPoint currentPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]];
-        NSTabViewItem *curTab = [self tabViewItemAtPoint:currentPoint];
-        if (curTab && ![curTab isEqualTo:_draggedTab]) {
-            [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:curTab]];
-            [self selectTabViewItem:_draggedTab];
-        }
-    }
-    [super mouseDragged:event];
+- (void)mouseDragged:(NSEvent *)event {
+       if (_draggedTab && [self allowsDragging]) {
+               NSPoint currentPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]];
+               NSTabViewItem *curTab = [self tabViewItemAtPoint:currentPoint];
+               if (curTab && ![curTab isEqualTo:_draggedTab]) {
+                       [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:curTab]];
+                       [self selectTabViewItem:_draggedTab];
+               }
+       }
+       [super mouseDragged:event];
 }
 
 }
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index b9a3577..a0a24fe
@@ -1,22 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITTableCornerView
- *    NSPopUpButton subclass for corner views in a table view.
+ *     ITTableCornerView.h
  *
  *
- *  Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     NSPopUpButton subclass for use as a cornerView in NSTableView instances.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 
 @interface ITTableCornerView : NSPopUpButton {
 #import <Cocoa/Cocoa.h>
 
 @interface ITTableCornerView : NSPopUpButton {
-    NSTableHeaderCell *headerCell;
+       NSImage *image;
+       NSTableHeaderCell *headerCell;
 }
 }
-@end
 
 
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 4f90316..2f231d2
@@ -1,31 +1,57 @@
 #import "ITTableCornerView.h"
 
 #import "ITTableCornerView.h"
 
+@interface ITTableCornerView (Private)
+
+- (id)initWithFrame:(NSRect)frame cellClass:(Class)cellClass;
+
+@end
+
 @implementation ITTableCornerView
 
 - (id)initWithFrame:(NSRect)frame {
 @implementation ITTableCornerView
 
 - (id)initWithFrame:(NSRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        headerCell = [[NSTableHeaderCell alloc] init];
-    }
-    return self;
+       return [self initWithFrame:frame cellClass:[NSTableHeaderCell class]];
+}
+
+- (id)initWithFrame:(NSRect)frame cellClass:(Class)cellClass {
+       if ((self = [super initWithFrame:frame])) {
+               headerCell = [[cellClass alloc] init];
+               [self setPullsDown:YES];
+       }
+       return self;
 }
 
 - (void)drawRect:(NSRect)rect {
 }
 
 - (void)drawRect:(NSRect)rect {
-    rect.origin.y = 0;
-    rect.size.height = 17;
-    rect.size.width += 1;
-    
-    [headerCell setState: ([[self cell] isHighlighted]) ? NSOnState : NSOffState];
-    [headerCell drawWithFrame:rect inView:nil];
-    
-    if ([self image]) {
-        [[self image] drawAtPoint:rect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
-    }
+       NSImage *drawImage;
+
+       rect.origin.y = 0;
+       rect.size.height = 17;
+       rect.size.width += 1;
+
+       [headerCell setState:([[self cell] isHighlighted] ? NSOnState : NSOffState)];
+       [headerCell drawWithFrame:rect inView:nil];
+
+       if ((drawImage = [self image])) {
+               BOOL oldFlipped = [drawImage isFlipped];
+               [drawImage setFlipped:YES];
+               [drawImage drawAtPoint:rect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
+               [drawImage setFlipped:oldFlipped];
+       }
+}
+
+- (void)setImage:(NSImage *)anImage {
+       [super setImage:anImage];
+       [image autorelease];
+       image = [anImage copy];
+}
+
+- (NSImage *)image {
+       return (image ? image : [super image]);
 }
 
 - (void)dealloc {
 }
 
 - (void)dealloc {
-    [headerCell release];
-    [super dealloc];
+       [image release];
+       [headerCell release];
+       [super dealloc];
 }
 
 @end
\ No newline at end of file
 }
 
 @end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 66444e8..1950715
@@ -1,24 +1,22 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *     ITTableView
- *    NSTableView subclass with easy to use accessors for adding a menu
- *    (with optional image) to the corner view of the TableView.
+ *     ITTableCornerView.h
  *
  *
- *     Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *     Responsibility  : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     NSTableView subclass that uses an ITTableCornerView as its default
+ *             cornerView and provides easy to use accessors to the features
+ *             provided by ITTableCornerView when it is being used.
  *
  *
- *     Copyright (c) 2002-2003 iThink Software.
- *     All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
 #import <Cocoa/Cocoa.h>
 
  *
  */
 
 #import <Cocoa/Cocoa.h>
 
-@class ITTableCornerView;
-
 @interface ITTableView : NSTableView {
 @interface ITTableView : NSTableView {
-    ITTableCornerView *corner;
+
 }
 
 - (void)setCornerImage:(NSImage*)image;
 }
 
 - (void)setCornerImage:(NSImage*)image;
@@ -26,4 +24,4 @@
 - (void)setCornerMenu:(NSMenu*)menu;
 - (NSMenu*)cornerMenu;
 
 - (void)setCornerMenu:(NSMenu*)menu;
 - (NSMenu*)cornerMenu;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 7cba72b..829b039
@@ -1,47 +1,50 @@
 #import "ITTableView.h"
 #import "ITTableCornerView.h"
 
 #import "ITTableView.h"
 #import "ITTableCornerView.h"
 
-
 @implementation ITTableView
 
 - (id)initWithFrame:(NSRect)frame {
 @implementation ITTableView
 
 - (id)initWithFrame:(NSRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        corner = [[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]];
-        [corner setPullsDown:YES];
-        [self setCornerView:corner];
-    }
-    return self;
+       if ((self = [super initWithFrame:frame])) {
+               [self setCornerView:[[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]]];
+       }
+       return self;
 }
 
 }
 
-- (id)initWithCoder:(NSCoder*)coder {
-    self = [super initWithCoder:coder];
-    if (self) {
-        corner = [[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]];
-        [corner setPullsDown:YES];
-        [self setCornerView:corner];
-    }
-    return self;
+- (id)initWithCoder:(NSCoder *)coder {
+       if ((self = [super initWithCoder:coder])) {
+               [self setCornerView:[[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]]];
+       }
+       return self;
 }
 
 }
 
-- (void)encodeWithCoder:(NSCoder*)coder {
-    [super encodeWithCoder:coder];
+- (void)encodeWithCoder:(NSCoder *)coder {
+       [super encodeWithCoder:coder];
 }
 
 }
 
-- (void)setCornerImage:(NSImage*)image {
-    [corner setImage:image];
+- (void)setCornerImage:(NSImage *)image {
+       if ([_cornerView isKindOfClass:[ITTableCornerView class]]) {
+               [(ITTableCornerView *)_cornerView setImage:image];
+       }
 }
 
 }
 
-- (NSImage*)cornerImage {
-    return [corner image];
+- (NSImage *)cornerImage {
+       if ([_cornerView isKindOfClass:[ITTableCornerView class]]) {
+               return [(ITTableCornerView *)_cornerView image];
+       }
+       return nil;
 }
 
 }
 
-- (void)setCornerMenu:(NSMenu*)menu {
-    [corner setMenu:menu];
+- (void)setCornerMenu:(NSMenu *)menu {
+       if ([_cornerView isKindOfClass:[ITTableCornerView class]]) {
+               [(ITTableCornerView *)_cornerView setMenu:menu];
+       }
 }
 
 }
 
-- (NSMenu*)cornerMenu {
-    return [corner menu];
+- (NSMenu *)cornerMenu {
+       if ([_cornerView isKindOfClass:[ITTableCornerView class]]) {
+               return [(ITTableCornerView *)_cornerView menu];
+       }
+       return nil;
 }
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index d796245..9e73b1c
@@ -1,21 +1,18 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITTextField
- *    Allows shadows to be drawn under text.
+ *     ITTextField.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     Custom NSTextField subclass that uses ITTextFieldCell.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
-
 @interface ITTextField : NSTextField {
 
 }
 @interface ITTextField : NSTextField {
 
 }
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
-- (float)shadowElevation;              /* Light source elevation in degrees.  Defaults to 45.0 */
+- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */
 - (void)setShadowElevation:(float)newElevation;
 
 - (void)setShadowElevation:(float)newElevation;
 
-- (float)shadowAzimuth;                        /* Light source azimuth in degrees.  Defaults to 90.0 */
+- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */
 - (void)setShadowAzimuth:(float)newAzimuth;
 
 - (void)setShadowAzimuth:(float)newAzimuth;
 
-- (float)shadowAmbient;                        /* Amount of ambient light.  Defaults to 0.15 */
+- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */
 - (void)setShadowAmbient:(float)newAmbient;
 
 - (void)setShadowAmbient:(float)newAmbient;
 
-- (float)shadowHeight;                 /* Height above the canvas.  Defaults to 1.0 */
+- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */
 - (void)setShadowHeight:(float)newHeight;
 
 - (void)setShadowHeight:(float)newHeight;
 
-- (float)shadowRadius;                 /* Blur radius.  Defaults to 4.0 */
+- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */
 - (void)setShadowRadius:(float)newRadius;
 
 - (void)setShadowRadius:(float)newRadius;
 
-- (float)shadowSaturation;             /* Maximum saturation.  Defaults to 1.0 */
+- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */
 - (void)setShadowSaturation:(float)newSaturation;
 
 - (void)setShadowSaturation:(float)newSaturation;
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 3ccab70..841d6c8
 #import "ITTextField.h"
 #import "ITTextFieldCell.h"
 #import "ITTextField.h"
 #import "ITTextFieldCell.h"
-#import <ApplicationServices/ApplicationServices.h>
-#import "ITCoreGraphicsHacks.h"
-
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark IMPLEMENTATION
-/*************************************************************************/
 
 @implementation ITTextField
 
 
 @implementation ITTextField
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark INITIALIZATION METHODS
-/*************************************************************************/
-
-+ (void)initialize
-{
-    if ( self == [ITTextField class] ) {
-        [self setCellClass:[ITTextFieldCell class]];
-    }
++ (void)initialize {
+       if (self == [ITTextField class]) {
+               [self setCellClass:[ITTextFieldCell class]];
+       }
 }
 
 }
 
-+ (Class)cellClass
-{
-    return [ITTextFieldCell class];
++ (Class)cellClass {
+       return [ITTextFieldCell class];
 }
 
 }
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark ACCESSOR METHODS
-/*************************************************************************/
-
-- (BOOL)castsShadow;
-{
-    return [[self cell] castsShadow];
+- (BOOL)castsShadow {
+       return [[self cell] castsShadow];
 }
 
 }
 
-- (void)setCastsShadow:(BOOL)newSetting;
-{
-    [[self cell] setCastsShadow:newSetting];
+- (void)setCastsShadow:(BOOL)newSetting {
+       [[self cell] setCastsShadow:newSetting];
 }
 
 }
 
-- (float)shadowElevation;
-{
-    return [[self cell] shadowElevation];
+- (float)shadowElevation {
+       return [[self cell] shadowElevation];
 }
 
 }
 
-- (void)setShadowElevation:(float)newElevation;
-{
-    [[self cell] setShadowElevation:newElevation];
+- (void)setShadowElevation:(float)newElevation {
+       [[self cell] setShadowElevation:newElevation];
 }
 
 }
 
-- (float)shadowAzimuth;
-{
-    return [[self cell] shadowAzimuth];
+- (float)shadowAzimuth {
+       return [[self cell] shadowAzimuth];
 }
 
 }
 
-- (void)setShadowAzimuth:(float)newAzimuth;
-{
-    [[self cell] setShadowAzimuth:newAzimuth];
+- (void)setShadowAzimuth:(float)newAzimuth {
+       [[self cell] setShadowAzimuth:newAzimuth];
 }
 
 }
 
-- (float)shadowAmbient;
-{
-    return [[self cell] shadowAmbient];
+- (float)shadowAmbient {
+       return [[self cell] shadowAmbient];
 }
 
 }
 
-- (void)setShadowAmbient:(float)newAmbient;
-{
-    [[self cell] setShadowAmbient:newAmbient];
+- (void)setShadowAmbient:(float)newAmbient {
+       [[self cell] setShadowAmbient:newAmbient];
 }
 
 }
 
-- (float)shadowHeight;
-{
-    return [[self cell] shadowHeight];
+- (float)shadowHeight {
+       return [[self cell] shadowHeight];
 }
 
 }
 
-- (void)setShadowHeight:(float)newHeight;
-{
-    [[self cell] setShadowHeight:newHeight];
+- (void)setShadowHeight:(float)newHeight {
+       [[self cell] setShadowHeight:newHeight];
 }
 
 }
 
-- (float)shadowRadius;
-{
-    return [[self cell] shadowRadius];
+- (float)shadowRadius {
+       return [[self cell] shadowRadius];
 }
 
 }
 
-- (void)setShadowRadius:(float)newRadius;
-{
-    [[self cell] setShadowRadius:newRadius];
+- (void)setShadowRadius:(float)newRadius {
+       [[self cell] setShadowRadius:newRadius];
 }
 
 }
 
-- (float)shadowSaturation;
-{
-    return [[self cell] shadowSaturation];
+- (float)shadowSaturation {
+       return [[self cell] shadowSaturation];
 }
 
 }
 
-- (void)setShadowSaturation:(float)newSaturation;
-{
-    [[self cell] setShadowSaturation:newSaturation];
+- (void)setShadowSaturation:(float)newSaturation {
+       [[self cell] setShadowSaturation:newSaturation];
 }
 
 }
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 5285faf..401e599
@@ -1,54 +1,49 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITTextFieldCell
- *    Cell used by the ITTextField control.
+ *     ITTextFieldCell.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     Custom NSTextFieldCell subclass that casts a shadow using CoreGraphics,
+ *             providing support for versions of Cocoa that don't have the NSShadow
+ *             class which was introduced in Mac OS X 10.3 (Panther).
  *
  *
- *  Copyright (c) 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
 #import <Cocoa/Cocoa.h>
 
 #import <Cocoa/Cocoa.h>
 
-
 @interface ITTextFieldCell : NSTextFieldCell {
 @interface ITTextFieldCell : NSTextFieldCell {
-
-    BOOL  castsShadow;
-    
-    float shadowElevation;
-    float shadowAzimuth;
-    float shadowAmbient;
-    float shadowHeight;
-    float shadowRadius;
-    float shadowSaturation;
-
+       BOOL castsShadow;
+       float shadowElevation;
+       float shadowAzimuth;
+       float shadowAmbient;
+       float shadowHeight;
+       float shadowRadius;
+       float shadowSaturation;
 }
 
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
 }
 
 - (BOOL)castsShadow;
 - (void)setCastsShadow:(BOOL)newSetting;
 
-- (float)shadowElevation;              /* Light source elevation in degrees.  Defaults to 45.0 */
+- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */
 - (void)setShadowElevation:(float)newElevation;
 
 - (void)setShadowElevation:(float)newElevation;
 
-- (float)shadowAzimuth;                        /* Light source azimuth in degrees.  Defaults to 90.0 */
+- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */
 - (void)setShadowAzimuth:(float)newAzimuth;
 
 - (void)setShadowAzimuth:(float)newAzimuth;
 
-- (float)shadowAmbient;                        /* Amount of ambient light.  Defaults to 0.15 */
+- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */
 - (void)setShadowAmbient:(float)newAmbient;
 
 - (void)setShadowAmbient:(float)newAmbient;
 
-- (float)shadowHeight;                 /* Height above the canvas.  Defaults to 1.0 */
+- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */
 - (void)setShadowHeight:(float)newHeight;
 
 - (void)setShadowHeight:(float)newHeight;
 
-- (float)shadowRadius;                 /* Blur radius.  Defaults to 4.0 */
+- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */
 - (void)setShadowRadius:(float)newRadius;
 
 - (void)setShadowRadius:(float)newRadius;
 
-- (float)shadowSaturation;             /* Maximum saturation.  Defaults to 1.0 */
+- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */
 - (void)setShadowSaturation:(float)newSaturation;
 
 - (void)setShadowSaturation:(float)newSaturation;
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index aeb6ca7..2dbc30c
 #import "ITTextFieldCell.h"
 #import "ITTextFieldCell.h"
-#import <ApplicationServices/ApplicationServices.h>
 #import "ITCoreGraphicsHacks.h"
 #import "ITCoreGraphicsHacks.h"
-
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark IMPLEMENTATION
-/*************************************************************************/
+#import <ApplicationServices/ApplicationServices.h>
 
 @implementation ITTextFieldCell
 
 
 @implementation ITTextFieldCell
 
-/*************************************************************************/
-#pragma mark -
-#pragma mark INITIALIZATION METHODS
-/*************************************************************************/
-
-- (id)initTextCell:(NSString *)string
-{
-    if ( ( self = [super initTextCell:string] ) ) {
-        castsShadow      = NO;
-        shadowElevation  = 45.0;
-        shadowAzimuth    = 90.0;
-        shadowAmbient    = 0.15;
-        shadowHeight     = 1.00;
-        shadowRadius     = 4.00;
-        shadowSaturation = 1.0;
-    }
-
-    return self;
+- (id)initTextCell:(NSString *)string {
+       if ((self = [super initTextCell:string])) {
+               castsShadow = NO;
+               shadowElevation = 45.0;
+               shadowAzimuth = 90.0;
+               shadowAmbient = 0.15;
+               shadowHeight = 1.00;
+               shadowRadius = 4.00;
+               shadowSaturation = 1.0;
+       }
+       return self;
 }
 
 }
 
-- (id)initWithCoder:(NSCoder *)coder
-{
-    if ( ( self = [super initWithCoder:coder] ) ) {        
-        castsShadow      = NO;
-        shadowElevation  = 45.0;
-        shadowAzimuth    = 90.0;
-        shadowAmbient    = 0.15;
-        shadowHeight     = 1.00;
-        shadowRadius     = 4.00;
-        shadowSaturation = 1.0;
-    }
-    
-    return self;
+- (id)initWithCoder:(NSCoder *)coder {
+       if ((self = [super initWithCoder:coder])) {             
+               castsShadow = NO;
+               shadowElevation = 45.0;
+               shadowAzimuth = 90.0;
+               shadowAmbient = 0.15;
+               shadowHeight = 1.00;
+               shadowRadius = 4.00;
+               shadowSaturation = 1.0;
+       }
+       return self;
 }
 
 }
 
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark DRAWING METHODS
-/*************************************************************************/
-
-- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView
-{
-    CGSGenericObj        style = nil;
-    CGShadowStyle        shadow;
-
-    if ( castsShadow ) { 
-//      Create the shadow style to use for drawing the string
-        shadow.version    = 0;
-        shadow.elevation  = shadowElevation;
-        shadow.azimuth    = shadowAzimuth;
-        shadow.ambient    = shadowAmbient;
-        shadow.height     = shadowHeight;
-        shadow.radius     = shadowRadius;
-        shadow.saturation = shadowSaturation;
-        style = CGStyleCreateShadow(&shadow);
-        
-        // Set the context for drawing the string
-        [NSGraphicsContext saveGraphicsState];
-        CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style);
-    }
-    
-    // Draw the string
-    [super drawWithFrame:rect inView:controlView];
-    
-
-    if ( castsShadow ) { 
-        // Restore the old context
-        [NSGraphicsContext restoreGraphicsState];
-        CGStyleRelease(style);
-    }
+- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView {
+       CGSGenericObj style = nil;
+       CGShadowStyle shadow;
+       
+       if ( castsShadow ) { 
+               // Create the shadow style to use for drawing the string
+               shadow.version = 0;
+               shadow.elevation = shadowElevation;
+               shadow.azimuth = shadowAzimuth;
+               shadow.ambient = shadowAmbient;
+               shadow.height = shadowHeight;
+               shadow.radius = shadowRadius;
+               shadow.saturation = shadowSaturation;
+               style = CGStyleCreateShadow(&shadow);
+               
+               // Set the context for drawing the string
+               [NSGraphicsContext saveGraphicsState];
+               CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style);
+       }
+       
+       // Draw the string
+       [super drawWithFrame:rect inView:controlView];
+       
+       if (castsShadow) { 
+               // Restore the old context
+               [NSGraphicsContext restoreGraphicsState];
+               CGStyleRelease(style);
+       }
 }
 
 }
 
-
-
-/*************************************************************************/
-#pragma mark -
-#pragma mark ACCESSOR METHODS
-/*************************************************************************/
-
-- (BOOL)castsShadow;
-{
-    return castsShadow;
+- (BOOL)castsShadow {
+       return castsShadow;
 }
 
 }
 
-- (void)setCastsShadow:(BOOL)newSetting;
-{
-    castsShadow = newSetting;
-    [[self controlView] setNeedsDisplay:YES];
+- (void)setCastsShadow:(BOOL)newSetting {
+       castsShadow = newSetting;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (float)shadowElevation;
-{
-    return shadowElevation;
+- (float)shadowElevation {
+       return shadowElevation;
 }
 
 }
 
-- (void)setShadowElevation:(float)newElevation;
-{
-    shadowElevation = newElevation;
-    [[self controlView] setNeedsDisplay:YES];
+- (void)setShadowElevation:(float)newElevation {
+       shadowElevation = newElevation;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (float)shadowAzimuth;
-{
-    return shadowAzimuth;
+- (float)shadowAzimuth {
+       return shadowAzimuth;
 }
 
 }
 
-- (void)setShadowAzimuth:(float)newAzimuth;
-{
-    shadowAzimuth = newAzimuth;
-    [[self controlView] setNeedsDisplay:YES];
+- (void)setShadowAzimuth:(float)newAzimuth {
+       shadowAzimuth = newAzimuth;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (float)shadowAmbient;
-{
-    return shadowAmbient;
+- (float)shadowAmbient {
+       return shadowAmbient;
 }
 
 }
 
-- (void)setShadowAmbient:(float)newAmbient;
-{
-    shadowAmbient = newAmbient;
-    [[self controlView] setNeedsDisplay:YES];
+- (void)setShadowAmbient:(float)newAmbient {
+       shadowAmbient = newAmbient;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (float)shadowHeight;
-{
-    return shadowHeight;
+- (float)shadowHeight {
+       return shadowHeight;
 }
 
 }
 
-- (void)setShadowHeight:(float)newHeight;
-{
-    shadowHeight = newHeight;
-    [[self controlView] setNeedsDisplay:YES];
+- (void)setShadowHeight:(float)newHeight {
+       shadowHeight = newHeight;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (float)shadowRadius;
-{
-    return shadowRadius;
+- (float)shadowRadius {
+       return shadowRadius;
 }
 
 }
 
-- (void)setShadowRadius:(float)newRadius;
-{
-    shadowRadius = newRadius;
-    [[self controlView] setNeedsDisplay:YES];
+- (void)setShadowRadius:(float)newRadius {
+       shadowRadius = newRadius;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-- (float)shadowSaturation;
-{
-    return shadowSaturation;
+- (float)shadowSaturation {
+       return shadowSaturation;
 }
 
 }
 
-- (void)setShadowSaturation:(float)newSaturation;
-{
-    shadowSaturation = newSaturation;
-    [[self controlView] setNeedsDisplay:YES];
+- (void)setShadowSaturation:(float)newSaturation {
+       shadowSaturation = newSaturation;
+       [[self controlView] setNeedsDisplay:YES];
 }
 
 }
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index c93f0a6..6118ecc
@@ -1,38 +1,31 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITTransientStatusWindow
- *    NSWindow subclass for quick display of status information.
- *    Similar to volume/brightness/eject bezel key windows.
+ *     ITTransientStatusWindow.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
- *      Contributor : Kent Sutherland <kent.sutherland@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 "ITWindowPositioning.h"
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowPositioning.h"
 #import "ITWindowEffect.h"
 
-#define DEFAULT_EXIT_DELAY  3.0
-
+#define DEFAULT_EXIT_DELAY 3.0
 
 @class ITTextField;
 @class ITGrayRoundedView;
 
 @class ITTextField;
 @class ITGrayRoundedView;
-@class ITWindowEffect;
-
 
 typedef enum {
     ITTransientStatusWindowExitOnCommand,
 
 typedef enum {
     ITTransientStatusWindowExitOnCommand,
-    ITTransientStatusWindowExitAfterDelay,
+    ITTransientStatusWindowExitAfterDelay
 } ITTransientStatusWindowExitMode;
 
 } ITTransientStatusWindowExitMode;
 
-
 typedef enum {
     ITTransientStatusWindowNoBackground,
     ITTransientStatusWindowRounded,
 typedef enum {
     ITTransientStatusWindowNoBackground,
     ITTransientStatusWindowRounded,
@@ -48,40 +41,31 @@ typedef enum {
     ITTransientStatusWindowMini
 } ITTransientStatusWindowSizing;
 
     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;
-//    int                                    _screenNumber;
+@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;
        NSScreen *_screen;
-
-    BOOL _reallyIgnoresEvents;
-    
-    NSTimer *_exitTimer;
-
-    NSView *_contentSubView;           
+       BOOL _reallyIgnoresEvents;
+       NSTimer *_exitTimer;
+       NSView *_contentSubView;                
 }
 
 + (id)sharedWindow;
 
 }
 
 + (id)sharedWindow;
 
-- (id)initWithContentView:(NSView *)contentView
-                 exitMode:(ITTransientStatusWindowExitMode)exitMode
-           backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType;
+- (id)initWithContentView:(NSView *)contentView exitMode:(ITTransientStatusWindowExitMode)exitMode backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType;
 
 - (void)appear:(id)sender;
 - (void)vanish:(id)sender;
 
 
 - (void)appear:(id)sender;
 - (void)vanish:(id)sender;
 
-- (void)setScreen:(NSScreen *)newScreen;
-
 - (void)setSizing:(ITTransientStatusWindowSizing)newSizing;
 - (ITTransientStatusWindowSizing)sizing;
 
 - (void)setSizing:(ITTransientStatusWindowSizing)newSizing;
 - (ITTransientStatusWindowSizing)sizing;
 
@@ -97,12 +81,6 @@ typedef enum {
 - (ITTransientStatusWindowBackgroundType)backgroundType;
 - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType;
 
 - (ITTransientStatusWindowBackgroundType)backgroundType;
 - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType;
 
-- (ITVerticalWindowPosition)verticalPosition;
-- (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition;
-
-- (ITHorizontalWindowPosition)horizontalPosition;
-- (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition;
-
 - (float)effectProgress;
 - (void)setEffectProgress:(float)newProgress;
 
 - (float)effectProgress;
 - (void)setEffectProgress:(float)newProgress;
 
@@ -112,5 +90,4 @@ typedef enum {
 - (ITWindowEffect *)exitEffect;
 - (void)setExitEffect:(ITWindowEffect *)newEffect;
 
 - (ITWindowEffect *)exitEffect;
 - (void)setExitEffect:(ITWindowEffect *)newEffect;
 
-
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 9b6c0bd..4244e09
@@ -1,17 +1,16 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITWindowEffect
- *    Protocal and abstract superclass for performing effects on windows.
+ *     ITWindowEffect.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
+ *     Protocol and abstract superclass for performing effects on 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 "ITWindowPositioning.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowPositioning.h"
 
@@ -20,7 +19,6 @@
 #define EFFECT_FPS 30.0
 #define DEFAULT_EFFECT_TIME 0.75
 
 #define EFFECT_FPS 30.0
 #define DEFAULT_EFFECT_TIME 0.75
 
-
 typedef enum {
     ITWindowHiddenState,
     ITWindowAppearingState,
 typedef enum {
     ITWindowHiddenState,
     ITWindowAppearingState,
@@ -28,8 +26,8 @@ typedef enum {
     ITWindowVanishingState
 } ITWindowVisibilityState;
 
     ITWindowVanishingState
 } ITWindowVisibilityState;
 
-
 @protocol ITWindowEffect
 @protocol ITWindowEffect
+
 + (NSString *)effectName;
 + (NSDictionary *)supportedPositions;
 + (unsigned int)listOrder;
 + (NSString *)effectName;
 + (NSDictionary *)supportedPositions;
 + (unsigned int)listOrder;
@@ -37,27 +35,27 @@ typedef enum {
 - (void)performVanish;
 - (void)cancelAppear;
 - (void)cancelVanish;
 - (void)performVanish;
 - (void)cancelAppear;
 - (void)cancelVanish;
-@end
 
 
+@end
 
 @protocol ITWindowMotility
 
 @protocol ITWindowMotility
+
 - (ITWindowVisibilityState)visibilityState;
 - (void)setVisibilityState:(ITWindowVisibilityState)newState;
 - (float)effectProgress;
 - (void)setEffectProgress:(float)newProgress;
 - (ITWindowVisibilityState)visibilityState;
 - (void)setVisibilityState:(ITWindowVisibilityState)newState;
 - (float)effectProgress;
 - (void)setEffectProgress:(float)newProgress;
-@end
 
 
+@end
 
 
-@interface ITWindowEffect : NSObject <ITWindowEffect>
-{
-    ITTransientStatusWindow    *_window;
-    float                       _effectTime;
-    float                       _effectSpeed;
-    ITVerticalWindowPosition    _verticalPosition;
-    ITHorizontalWindowPosition  _horizontalPosition;
-    NSTimer                    *_effectTimer;
-    BOOL                                          __idle;
-    BOOL                       __shouldReleaseWhenIdle;
+@interface ITWindowEffect : NSObject <ITWindowEffect> {
+    NSWindow <ITWindowPositioning, ITWindowMotility> *_window;
+    float _effectTime;
+    float _effectSpeed;
+    ITVerticalWindowPosition _verticalPosition;
+    ITHorizontalWindowPosition _horizontalPosition;
+    NSTimer *_effectTimer;
+    BOOL __idle;
+    BOOL __shouldReleaseWhenIdle;
 }
 
 + (NSArray *)effectClasses;
 }
 
 + (NSArray *)effectClasses;
@@ -76,4 +74,4 @@ typedef enum {
 
 - (void)releaseWhenIdle;
 
 
 - (void)releaseWhenIdle;
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index c43a7f4..0d83c42
@@ -1,40 +1,37 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITWindowPositioning
- *    Protocol which defines methods for window positioning presets.
+ *     ITWindowPositioning.h
  *
  *
- *  Original Author : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Matthew Judy <mjudy@ithinksw.com>
- *   Responsibility : Joseph Spiros <joseph.spiros@ithinksw.com>
+ *     Protocol which defines methods for window positioning presets.
  *
  *
- *  Copyright (c) 2002 - 2003 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 typedef enum {
 typedef enum {
-    ITWindowPositionLeft   = 0,
+    ITWindowPositionLeft = 0,
     ITWindowPositionCenter = 1,
     ITWindowPositionCenter = 1,
-    ITWindowPositionRight  = 2,
+    ITWindowPositionRight = 2
 } ITHorizontalWindowPosition;
 
 typedef enum {
 } ITHorizontalWindowPosition;
 
 typedef enum {
-    ITWindowPositionTop    = 0,
+    ITWindowPositionTop = 0,
     ITWindowPositionMiddle = 1,
     ITWindowPositionMiddle = 1,
-    ITWindowPositionBottom = 2,
+    ITWindowPositionBottom = 2
 } ITVerticalWindowPosition;
 
 } ITVerticalWindowPosition;
 
-
 @protocol ITWindowPositioning
 
 @protocol ITWindowPositioning
 
+- (NSScreen *)screen;
+- (void)setScreen:(NSScreen *)newScreen;
 - (ITVerticalWindowPosition)verticalPosition;
 - (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition;
 - (ITHorizontalWindowPosition)horizontalPosition;
 - (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition;
 - (float)screenPadding;
 - (void)setScreenPadding:(float)newPadding;
 - (ITVerticalWindowPosition)verticalPosition;
 - (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition;
 - (ITHorizontalWindowPosition)horizontalPosition;
 - (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition;
 - (float)screenPadding;
 - (void)setScreenPadding:(float)newPadding;
-/*- (int)screenNumber;
-- (void)setScreenNumber:(int)newNumber;*/
 
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)
index 9fc920e..42363ce
@@ -1,23 +1,21 @@
 /*
  *     ITKit
 /*
  *     ITKit
- *  ITZoomWindowEffect
- *    Effect subclass which zooms (expands/shrinks) a window into position on the screen.
+ *     ITZoomWindowEffect.h
  *
  *
- *  Original Author : Kent Sutherland <ksutherland@ithinksw.com>
- *   Responsibility : Kent Sutherland <ksutherland@ithinksw.com>
+ *     Effect subclass which zooms a window into position on the screen.
  *
  *
- *  Copyright (c) 2002 - 2004 iThink Software.
- *  All Rights Reserved
+ *     Copyright (c) 2005 by iThink Software.
+ *     All Rights Reserved.
+ *
+ *     $Id$
  *
  */
 
  *
  */
 
-
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
 #import <Cocoa/Cocoa.h>
 #import "ITWindowEffect.h"
 
-
-@interface ITZoomWindowEffect : ITWindowEffect <ITWindowEffect> {
+@interface ITZoomWindowEffect : ITWindowEffect {
 
 }
 
 
 }
 
-@end
+@end
\ No newline at end of file
old mode 100755 (executable)
new mode 100644 (file)