Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 624afd5
Showing
80 changed files
with
6,553 additions
and
0 deletions.
There are no files selected for viewing
538 changes: 538 additions & 0 deletions
538
Developer/AquaticPrime Developer.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// | ||
// Prefix header for all source files of the 'AquaticPrime' target in the 'AquaticPrime' project. | ||
// | ||
|
||
#ifdef __OBJC__ | ||
#import <Cocoa/Cocoa.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AQAboutView : NSView | ||
{ | ||
NSImage *aboutImage; | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#import "AQAboutView.h" | ||
|
||
@implementation AQAboutView | ||
|
||
-(void)awakeFromNib | ||
{ | ||
aboutImage = [NSImage imageNamed:@"aboutbox"]; | ||
[self setNeedsDisplay:YES]; | ||
} | ||
|
||
-(void)drawRect:(NSRect)rect | ||
{ | ||
[[NSColor clearColor] set]; | ||
NSRectFill([self frame]); | ||
|
||
[aboutImage compositeToPoint:NSZeroPoint operation:NSCompositeSourceOver]; | ||
|
||
[[self window] invalidateShadow]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AQAboutWindow : NSWindow | ||
{ | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#import "AQAboutWindow.h" | ||
|
||
@implementation AQAboutWindow | ||
|
||
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag | ||
{ | ||
NSWindow *result = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; | ||
[result setBackgroundColor: [NSColor clearColor]]; | ||
[result setLevel: NSStatusWindowLevel]; | ||
[result setOpaque:NO]; | ||
[result setHasShadow:YES]; | ||
[result setDelegate:self]; | ||
return result; | ||
} | ||
|
||
- (BOOL)canBecomeKeyWindow | ||
{ | ||
return YES; | ||
} | ||
|
||
- (BOOL)acceptsFirstResponder | ||
{ | ||
return YES; | ||
} | ||
|
||
- (BOOL)becomeFirstResponder | ||
{ | ||
return YES; | ||
} | ||
|
||
- (void)mouseDown:(NSEvent *)theEvent | ||
{ | ||
[self orderOut:self]; | ||
} | ||
|
||
- (void)keyDown:(NSEvent *)theEvent | ||
{ | ||
[self orderOut:self]; | ||
} | ||
|
||
- (void)windowDidResignKey:(NSNotification *)aNotification | ||
{ | ||
[self orderOut:self]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// AQTableView.h | ||
// AquaticPrime Developer | ||
// | ||
// Copyright (c) 2005, Lucas Newman | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without modification, | ||
// are permitted provided that the following conditions are met: | ||
// ¥Redistributions of source code must retain the above copyright notice, | ||
// this list of conditions and the following disclaimer. | ||
// ¥Redistributions in binary form must reproduce the above copyright notice, | ||
// this list of conditions and the following disclaimer in the documentation and/or | ||
// other materials provided with the distribution. | ||
// ¥Neither the name of the Aquatic nor the names of its contributors may be used to | ||
// endorse or promote products derived from this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR | ||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AQTableView : NSTableView | ||
{ | ||
} | ||
|
||
// Delegate method | ||
- (void)deleteItemAtIndex:(int)index; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// | ||
// AQTableView.m | ||
// AquaticPrime Developer | ||
// | ||
// Copyright (c) 2005, Lucas Newman | ||
// All rights reserved. | ||
// | ||
// Redistribution and use in source and binary forms, with or without modification, | ||
// are permitted provided that the following conditions are met: | ||
// ¥Redistributions of source code must retain the above copyright notice, | ||
// this list of conditions and the following disclaimer. | ||
// ¥Redistributions in binary form must reproduce the above copyright notice, | ||
// this list of conditions and the following disclaimer in the documentation and/or | ||
// other materials provided with the distribution. | ||
// ¥Neither the name of the Aquatic nor the names of its contributors may be used to | ||
// endorse or promote products derived from this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR | ||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
#import "AQTableView.h" | ||
|
||
@implementation AQTableView | ||
|
||
- (void)keyDown:(NSEvent *)event | ||
{ | ||
unichar key = [[event charactersIgnoringModifiers] characterAtIndex:0]; | ||
|
||
if ( (key == NSDeleteCharacter || key == NSDeleteFunctionKey) && | ||
([self numberOfRows] > 0) && ([self selectedRow] != -1) ) | ||
{ | ||
[self deleteItemAtIndex:[self selectedRow]]; | ||
} else { | ||
[super keyDown:event]; | ||
} | ||
} | ||
|
||
- (void)deleteItemAtIndex:(int)row | ||
{ | ||
[[self delegate] deleteItemAtIndex:row]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* AQTextFieldCell */ | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
@interface AQTextFieldCell : NSTextFieldCell | ||
{ | ||
} | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#import "AQTextFieldCell.h" | ||
|
||
@implementation AQTextFieldCell | ||
|
||
// Deal with drawing the text inside the cell ourselves | ||
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView | ||
{ | ||
// First get the string and string attributes | ||
NSString *string = [self stringValue]; | ||
NSMutableDictionary *attribs = [[[self attributedStringValue] attributesAtIndex:0 effectiveRange:nil] mutableCopy]; | ||
|
||
// If the cell is selected and its control view is the first responder, draw the text white | ||
if ([self isHighlighted]) | ||
[attribs setObject:[NSColor whiteColor] forKey:NSForegroundColorAttributeName]; | ||
|
||
// Then adjust the drawing rectangle and draw the text so that it is centered vertically | ||
NSSize stringSize = [string sizeWithAttributes:attribs]; | ||
cellFrame.origin.x += 4.0; | ||
cellFrame.size.width -= 4.0; | ||
cellFrame.origin.y += (cellFrame.size.height - stringSize.height) / 2; | ||
cellFrame.size.height = stringSize.height; | ||
[string drawInRect:cellFrame withAttributes:attribs]; | ||
[attribs release]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2003-2004 Omni Development, Inc. All rights reserved. | ||
// | ||
// This software may only be used and reproduced according to the | ||
// terms in the file OmniSourceLicense.html, which should be | ||
// distributed with this project and can also be found at | ||
// <http://www.omnigroup.com/developer/sourcecode/sourcelicense/>. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
#import "AQTableView.h" | ||
|
||
// For this to look right your cell class must return -[NSColor textBackgroundColor] from -textColor when it is highlighted. See OATextWithIconCell for example. | ||
|
||
@interface OAGradientTableView : AQTableView | ||
{ | ||
struct { | ||
unsigned int acceptsFirstMouse:1; | ||
} flags; | ||
} | ||
|
||
- (void)setAcceptsFirstMouse:(BOOL)flag; | ||
|
||
@end |
Oops, something went wrong.