//
//  ApplicationController.h
//  ZIA Gallery Maker
//
//  Created by Frank Mcpherson on 12/24/09.
//  Copyright 2009 bitdoctors.com. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class BWSnippetKeeper;
@class ImageBrowserArrayController;
@class Artwork;

@interface ApplicationController : NSWindowController {
	IBOutlet NSPanel *sheet;
	BWSnippetKeeper *snippets;
	ImageBrowserArrayController *browserController;
	IBOutlet NSArrayController *artworkArrayController;
	
	int thumbnailDimension;
	int enlargementDimension;
	int imageCount;
	int imageIndex;
	NSString *outPath;
	NSString *galleryTitle;
	NSString *progressPanelTitle;
}

@property (assign) int imageCount;
@property (assign) int imageIndex;
@property (readwrite, copy) NSString *galleryTitle;
@property (readonly) NSString *progressPanelTitle;

- (IBAction)writeGallery:(id)sender;

- (NSColor *)colorFromDefaultsForKey:(NSString *)aKey;

- (void)processArtworks:(NSArray *)artworks 
				forRect:(CGRect)targetRect 
				withTag:(NSString *)fileTag 
	withBackgroundColor:(NSColor *)color;

- (NSString *)writeArtwork:(Artwork *)artwork 
			  toPath:(NSString *)path 
	  withParentPage:(NSString *)parentPage;


@end
