//
//  BXQCSplashScreenController.h
//  BXAppKit
//
//  Created by Stefan Neumärker on 19.07.07.
//  Copyright 2007 Boinx Software / GeBE Computer & Peripherie GmbH. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import "NSWindow_BXFade.h"

@class QCView;

@interface BXQCSplashScreenController : NSWindowController {
	QCView *_splashScreenView;
	NSDate *_nearestEnd;
	
	NSTimeInterval _fadeInTime;
	NSTimeInterval _fadeOutTime;
	
	BOOL _isClosing;
	BOOL _isAutoClosing;
	
	id _delegate;
}

+ (id)showSplashScreenWithComposition:(NSString *)inCompositionPath
						   attributes:(NSDictionary *)inAttributes
						  minimumTime:(NSTimeInterval)inMinimumTime
						   fadeInTime:(NSTimeInterval)fadeInTime
						  fadeOutTime:(NSTimeInterval)fadeOutTime
							autoClose:(BOOL)inAutoClose
						 withDelegate:(id)delegate;

+ (id)showSplashScreenWithComposition:(NSString *)inCompositionPath
						   attributes:(NSDictionary *)inAttributes
						  minimumTime:(NSTimeInterval)inMinimumTime
						   fadeInTime:(NSTimeInterval)fadeInTime
						  fadeOutTime:(NSTimeInterval)fadeOutTime
							autoClose:(BOOL)inAutoClose;

+ (id)showSplashScreenWithComposition:(NSString *)inCompositionPath
						   attributes:(NSDictionary *)inAttributes
						  minimumTime:(NSTimeInterval)inMinimumTime
							autoClose:(BOOL)inAutoClose;

#pragma mark -
#pragma mark inits
#pragma mark -

- (id)initWithComposition:(NSString *)inCompositionPath
			   attributes:(NSDictionary *)inAttributes
			  minimumTime:(NSTimeInterval)inMinimumTime
			   fadeInTime:(NSTimeInterval)fadeInTime
			  fadeOutTime:(NSTimeInterval)fadeOutTime
				autoClose:(BOOL)inAutoClose
			 withDelegate:(id)delegate;

- (id)initWithComposition:(NSString *)inCompositionPath
			   attributes:(NSDictionary *)inAttributes
			  minimumTime:(NSTimeInterval)inMinimumTime
			   fadeInTime:(NSTimeInterval)fadeInTime
			  fadeOutTime:(NSTimeInterval)fadeOutTime
				autoClose:(BOOL)inAutoClose;

- (id)initWithComposition:(NSString *)inCompositionPath
			   attributes:(NSDictionary *)inAttributes
			  minimumTime:(NSTimeInterval)inMinimumTime
				autoClose:(BOOL)inAutoClose;

- (id)initWithComposition:(NSString *)inCompositionPath;

#pragma mark -
#pragma mark window handling
#pragma mark -

- (void)closeAsync;
- (void)windowDidOpen:(NSNotification*)notification;

#pragma mark -
#pragma mark input keys
#pragma mark -

- (void)setValue:(id)value forAttributeKey:(NSString *)key;

#pragma mark -
#pragma mark accessors
#pragma mark -

- (void)setSplashScreenView:(QCView *)inSplashScreenWindow;
- (QCView *)splashScreenView;

- (void)setNearestEnd:(NSDate *)inNearestEnd;
- (NSDate *)nearestEnd;

- (void)setFadeInTime:(NSTimeInterval)fadeInTime;
- (NSTimeInterval)fadeInTime;

- (void)setFadeOutTime:(NSTimeInterval)fadeOutTime;
- (NSTimeInterval)fadeOutTime;

- (void)setDelegate:(id)inDelegate;
- (id)delegate;

@end
