diff options
Diffstat (limited to 'Frameworks/LiPlugin')
-rw-r--r-- | Frameworks/LiPlugin/Info.plist | 28 | ||||
-rw-r--r-- | Frameworks/LiPlugin/LiBrowserColumn.h | 59 | ||||
-rw-r--r-- | Frameworks/LiPlugin/LiBrowserColumn.m | 150 | ||||
-rw-r--r-- | Frameworks/LiPlugin/LiFilterDescription.h | 40 | ||||
-rw-r--r-- | Frameworks/LiPlugin/LiFilterDescription.m | 113 | ||||
-rw-r--r-- | Frameworks/LiPlugin/LiInspectorView.h | 40 | ||||
-rw-r--r-- | Frameworks/LiPlugin/LiInspectorView.m | 96 | ||||
-rw-r--r-- | Frameworks/LiPlugin/LiPlugin.h | 41 |
8 files changed, 567 insertions, 0 deletions
diff --git a/Frameworks/LiPlugin/Info.plist b/Frameworks/LiPlugin/Info.plist new file mode 100644 index 0000000..6510d5d --- /dev/null +++ b/Frameworks/LiPlugin/Info.plist @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>LiPlugin</string> + <key>CFBundleGetInfoString</key> + <string></string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.kublai.Liaison.LiPlugin</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string></string> + <key>CFBundlePackageType</key> + <string>FMWK</string> + <key>CFBundleShortVersionString</key> + <string></string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>0.4d</string> +</dict> +</plist> diff --git a/Frameworks/LiPlugin/LiBrowserColumn.h b/Frameworks/LiPlugin/LiBrowserColumn.h new file mode 100644 index 0000000..629e1c3 --- /dev/null +++ b/Frameworks/LiPlugin/LiBrowserColumn.h @@ -0,0 +1,59 @@ +// +// LiBrowserColumn.h +// Liaison +// +// Created by Brian Cully on Thu May 15 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +@interface LiBrowserColumn : NSObject +{ + id theIdentifier; + + NSString *theColumnName; + NSCell *theCell; + NSNumber *theWidth; + SEL theGetMethod; + SEL theSetMethod; + SEL theCompareMethod; + BOOL theColumnIsEditable; + BOOL theColumnIsResizable; + BOOL theColumnShowsHeader; +} + +- (id)objectForRecord: (id)aRecord; +- (void)setObject: (id)anObject forRecord: (id)aRecord; +@property (getter=resizable,setter=setResizable:) BOOL theColumnIsResizable; +@property (getter=setMethod,setter=setSetMethod:) SEL theSetMethod; +@property (retain,getter=name) NSString *theColumnName; +@property (getter=compareMethod,setter=setCompareMethod:) SEL theCompareMethod; +@property (getter=showsHeader,setter=setShowsHeader:) BOOL theColumnShowsHeader; +@property (retain,getter=identifier) id theIdentifier; +@property (retain,getter=width) NSNumber *theWidth; +@property (getter=editable,setter=setEditable:) BOOL theColumnIsEditable; +@property (getter=getMethod,setter=setGetMethod:) SEL theGetMethod; +@property (retain,getter=cell) NSCell *theCell; +@end + +@interface LiBrowserColumn (Accessors) +- (id)identifier; +- (void)setIdentifier: (id)anIdentifier; +- (NSString *)name; +- (void)setName: (NSString *)aName; +- (BOOL)editable; +- (void)setEditable: (BOOL)editable; +- (BOOL)resizable; +- (void)setResizable: (BOOL)resizable; +- (BOOL)showsHeader; +- (void)setShowsHeader: (BOOL)showHeader; +- (NSCell *)cell; +- (void)setCell: (NSCell *)aCell; +- (SEL)getMethod; +- (void)setGetMethod: (SEL)aSelector; +- (SEL)setMethod; +- (void)setSetMethod: (SEL)aSelector; +- (SEL)compareMethod; +- (void)setCompareMethod: (SEL)aSelector; +- (NSNumber *)width; +- (void)setWidth: (NSNumber *)aWidth; +@end diff --git a/Frameworks/LiPlugin/LiBrowserColumn.m b/Frameworks/LiPlugin/LiBrowserColumn.m new file mode 100644 index 0000000..471d0ee --- /dev/null +++ b/Frameworks/LiPlugin/LiBrowserColumn.m @@ -0,0 +1,150 @@ +// +// LiBrowserColumn.m +// Liaison +// +// Created by Brian Cully on Thu May 15 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +#import "LiBrowserColumn.h" + +@implementation LiBrowserColumn +- (id)init +{ + self = [super init]; + + [self setResizable: YES]; + + return self; +} + +- (void)dealloc +{ + [self setName: nil]; + [super dealloc]; +} + +- (id)objectForRecord: (id)aRecord +{ + return [aRecord performSelector: [self getMethod]]; +} + +- (void)setObject: (id)anObject forRecord: (id)aRecord +{ + [aRecord performSelector: [self setMethod] withObject: anObject]; +} +@synthesize theCell; +@synthesize theIdentifier; +@synthesize theWidth; +@synthesize theColumnName; +@end + +@implementation LiBrowserColumn (Accessors) +- (id)identifier +{ + return theIdentifier; +} + +- (void)setIdentifier: (id)anIdentifier +{ + [anIdentifier retain]; + [theIdentifier release]; + theIdentifier = anIdentifier; +} + +- (NSString *)name +{ + return theColumnName; +} + +- (void)setName: (NSString *)aName +{ + [aName retain]; + [theColumnName release]; + theColumnName = aName; +} + +- (BOOL)editable +{ + return theColumnIsEditable; +} + +- (void)setEditable: (BOOL)editable +{ + theColumnIsEditable = editable; +} + +- (BOOL)resizable +{ + return theColumnIsResizable; +} + +- (void)setResizable: (BOOL)resizable +{ + theColumnIsResizable = resizable; +} + +- (BOOL)showsHeader +{ + return theColumnShowsHeader; +} + +- (void)setShowsHeader: (BOOL)showHeader +{ + theColumnShowsHeader = showHeader; +} + +- (NSCell *)cell +{ + return theCell; +} + +- (void)setCell: (NSCell *)aCell +{ + [aCell retain]; + [theCell release]; + theCell = aCell; +} + +- (SEL)getMethod +{ + return theGetMethod; +} + +- (void)setGetMethod: (SEL)aSelector +{ + theGetMethod = aSelector; +} + +- (SEL)setMethod +{ + return theSetMethod; +} + +- (void)setSetMethod: (SEL)aSelector +{ + theSetMethod = aSelector; +} + +- (SEL)compareMethod +{ + return theCompareMethod; +} + +- (void)setCompareMethod: (SEL)aSelector +{ + theCompareMethod = aSelector; +} + +- (NSNumber *)width +{ + return theWidth; +} + +- (void)setWidth: (NSNumber *)aWidth +{ + [aWidth retain]; + [theWidth release]; + theWidth = aWidth; +} +@end diff --git a/Frameworks/LiPlugin/LiFilterDescription.h b/Frameworks/LiPlugin/LiFilterDescription.h new file mode 100644 index 0000000..a26736e --- /dev/null +++ b/Frameworks/LiPlugin/LiFilterDescription.h @@ -0,0 +1,40 @@ +// +// LiFilterDescription.h +// LiFrameworks +// +// Created by Brian Cully on Sat Aug 23 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +@interface LiFilterDescription : NSObject +{ + NSCell *theValueEditorCell; + NSDictionary *theCompareOperators; + NSString *theName; + SEL theMethod; +} ++ (id)descriptionForMethod: (SEL)aMethod + name: (NSString *)aName + compareOperators: (NSDictionary *)someOperators + valueEditorCell: (NSCell *)aCell; + +- (id)initWithMethod: (SEL)aMethod + name: (NSString *)aName + compareOperators: (NSDictionary *)someOperators + valueEditorCell: (NSCell *)aCell; +@property (getter=method,setter=setMethod:) SEL theMethod; +@property (retain,getter=name) NSString *theName; +@property (retain,getter=valueEditorCell) NSCell *theValueEditorCell; +@property (retain,getter=compareOperators) NSDictionary *theCompareOperators; +@end + +@interface LiFilterDescription (Accessors) +- (SEL)method; +- (void)setMethod: (SEL)aMethod; +- (NSString *)name; +- (void)setName: (NSString *)aName; +- (NSDictionary *)compareOperators; +- (void)setCompareOperators: (NSDictionary *)someOperators; +- (NSCell *)valueEditorCell; +- (void)setValueEditorCell: (NSCell *)aCell; +@end diff --git a/Frameworks/LiPlugin/LiFilterDescription.m b/Frameworks/LiPlugin/LiFilterDescription.m new file mode 100644 index 0000000..d5d38da --- /dev/null +++ b/Frameworks/LiPlugin/LiFilterDescription.m @@ -0,0 +1,113 @@ +// +// LiFilterDescription.m +// LiFrameworks +// +// Created by Brian Cully on Sat Aug 23 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +#import "LiFilterDescription.h" + +@implementation LiFilterDescription ++ (id)descriptionForMethod: (SEL)aMethod + name: (NSString *)aName + compareOperators: (NSDictionary *)someOperators + valueEditorCell: (NSCell *)aCell +{ + id tmpDesc; + + tmpDesc = [[self alloc] initWithMethod: aMethod + name: aName + compareOperators: someOperators + valueEditorCell: aCell]; + return [tmpDesc autorelease]; +} + +- (id)init +{ + NSException *exception; + + exception = [NSException exceptionWithName: @"LiNoInitException" + reason: @"[LiFilterDescription init] not supported" + userInfo: nil]; + [exception raise]; + + return nil; +} + +- (void)dealloc +{ + [self setMethod: nil]; + [self setName: nil]; + [self setCompareOperators: nil]; + [self setValueEditorCell: nil]; + + [super dealloc]; +} + +- (id)initWithMethod: (SEL)aMethod + name: (NSString *)aName + compareOperators: (NSDictionary *)someOperators + valueEditorCell: (NSCell *)aCell +{ + self = [super init]; + + [self setMethod: aMethod]; + [self setName: aName]; + [self setCompareOperators: someOperators]; + [self setValueEditorCell: aCell]; + + return self; +} +@synthesize theName; +@synthesize theValueEditorCell; +@synthesize theCompareOperators; +@end + +@implementation LiFilterDescription (Accessors) +- (SEL)method +{ + return theMethod; +} + +- (void)setMethod: (SEL)aMethod +{ + theMethod = aMethod; +} + +- (NSString *)name +{ + return theName; +} + +- (void)setName: (NSString *)aName +{ + [aName retain]; + [theName release]; + aName = theName; +} + +- (NSDictionary *)compareOperators +{ + return theCompareOperators; +} + +- (void)setCompareOperators: (NSDictionary *)someOperators +{ + [someOperators retain]; + [theCompareOperators release]; + theCompareOperators = someOperators; +} + +- (NSCell *)valueEditorCell +{ + return theValueEditorCell; +} + +- (void)setValueEditorCell: (NSCell *)aCell +{ + [aCell retain]; + [theValueEditorCell release]; + theValueEditorCell = aCell; +} +@end
\ No newline at end of file diff --git a/Frameworks/LiPlugin/LiInspectorView.h b/Frameworks/LiPlugin/LiInspectorView.h new file mode 100644 index 0000000..f6cbd69 --- /dev/null +++ b/Frameworks/LiPlugin/LiInspectorView.h @@ -0,0 +1,40 @@ +// +// LiInspectorView.h +// Liaison +// +// Created by Brian Cully on Wed May 21 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +@interface LiInspectorView : NSObject +{ + id theIdentifier; + + NSString *theName; + NSImage *theImage; + NSView *theView; + BOOL theViewIsHorizontallyResizable, theViewisVerticallyResizable; + NSSize theViewSize; +} +@property (retain,getter=image) NSImage *theImage; +@property (retain,getter=view) NSView *theView; +@property (retain,getter=identifier) id theIdentifier; +@property (retain,getter=name) NSString *theName; +@end + +@interface LiInspectorView (Accessors) +- (id)identifier; +- (void)setIdentifier: (id)anIdentifier; +- (NSString *)name; +- (void)setName: (NSString *)aName; +- (NSImage *)image; +- (void)setImage: (NSImage *)anImage; +- (NSView *)view; +- (void)setView: (NSView *)aView; +- (BOOL)isHorizontallyResizable; +- (void)setIsHorizontallyResizable: (BOOL)resizable; +- (BOOL)isVerticallyResizable; +- (void)setIsVerticallyResizable: (BOOL)resizable; +- (NSSize)viewSize; +- (void)setViewSize: (NSSize)aSize; +@end diff --git a/Frameworks/LiPlugin/LiInspectorView.m b/Frameworks/LiPlugin/LiInspectorView.m new file mode 100644 index 0000000..c5279cd --- /dev/null +++ b/Frameworks/LiPlugin/LiInspectorView.m @@ -0,0 +1,96 @@ +// +// LiInspectorView.m +// Liaison +// +// Created by Brian Cully on Wed May 21 2003. +// Copyright (c) 2003 Brian Cully. All rights reserved. +// + +#import "LiInspectorView.h" + +@implementation LiInspectorView +@synthesize theImage; +@synthesize theView; +@synthesize theIdentifier; +@synthesize theName; +@end + +@implementation LiInspectorView (Accessors) +- (id)identifier +{ + return theIdentifier; +} + +- (void)setIdentifier: (id)anIdentifier +{ + [anIdentifier retain]; + [theIdentifier release]; + theIdentifier = anIdentifier; +} + +- (NSString *)name +{ + return theName; +} + +- (void)setName: (NSString *)aName +{ + [aName retain]; + [theName release]; + theName = aName; +} + +- (NSImage *)image +{ + return theImage; +} + +- (void)setImage: (NSImage *)anImage +{ + [anImage retain]; + [theImage release]; + theImage = anImage; +} + +- (NSView *)view +{ + return theView; +} + +- (void)setView: (NSView *)aView +{ + [aView retain]; + [theView release]; + theView = aView; +} + +- (BOOL)isHorizontallyResizable +{ + return theViewIsHorizontallyResizable; +} + +- (void)setIsHorizontallyResizable: (BOOL)resizable +{ + theViewIsHorizontallyResizable = resizable; +} + +- (BOOL)isVerticallyResizable +{ + return theViewisVerticallyResizable; +} + +- (void)setIsVerticallyResizable: (BOOL)resizable +{ + theViewisVerticallyResizable = resizable; +} + +- (NSSize)viewSize +{ + return theViewSize; +} + +- (void)setViewSize: (NSSize)aSize +{ + theViewSize = aSize; +} +@end diff --git a/Frameworks/LiPlugin/LiPlugin.h b/Frameworks/LiPlugin/LiPlugin.h new file mode 100644 index 0000000..28d236f --- /dev/null +++ b/Frameworks/LiPlugin/LiPlugin.h @@ -0,0 +1,41 @@ +/* + * LiPlugin.h + * Liaison + * + * Created by Brian Cully on Tue May 13 2003. + * Copyright (c) 2003 Brian Cully. All rights reserved. + * + */ + +#import <Cocoa/Cocoa.h> + +#import <LiPlugin/LiBrowserColumn.h> +#import <LiPlugin/LiInspectorView.h> +#import <LiPlugin/LiFilterDescription.h> + +#import <LiBackend/LiBackend.h> + +@protocol LiFileStorePlugin ++ (NSBundle *)bundle; ++ (void)setBundle: (NSBundle *)aBundle; + +- (void)initFileStore; +- (LiFileStore *)fileStore; +@end + +@protocol LiBrowserPlugin ++ (NSBundle *)bundle; ++ (void)setBundle: (NSBundle *)aBundle; + +- (NSArray *)columns; +- (NSDictionary *)filterDescriptions; +@end + +@protocol LiInspectorPlugin ++ (NSBundle *)bundle; ++ (void)setBundle: (NSBundle *)aBundle; + +- (NSArray *)allInspectorViews; +- (NSArray *)inspectorViewsForFile: (LiFileHandle *)aFile; +- (void)setFile: (LiFileHandle *)aFile; +@end
\ No newline at end of file |