ResKnife/Cocoa/Classes/ResourceDataSource.h

29 lines
743 B
Objective-C

#import <Cocoa/Cocoa.h>
@class ResourceDocument, Resource;
@interface ResourceDataSource : NSObject
{
IBOutlet NSOutlineView *outlineView;
IBOutlet NSWindow *window;
IBOutlet ResourceDocument *document;
NSMutableArray *resources;
}
- (NSWindow *)window;
- (NSArray *)resources;
- (void)setResources:(NSMutableArray *)newResources;
- (void)addResource:(Resource *)resource;
- (void)removeResource:(Resource *)resource;
- (NSNumber *)uniqueIDForType:(NSString *)type;
// accessors
-(Resource*) resourceOfType: (NSString*)type andID: (NSNumber*)resID;
-(Resource*) resourceOfType: (NSString*)type withName: (NSString*)name;
-(NSArray*) allResourcesOfType: (NSString*)type;
-(NSArray*) allResourceIDsOfType: (NSString*)type;
@end