/*

 Owner: Stefan Neumärker <stefan@boinx.com>
 Company: Boinx Software Ltd., Germany
 Projects: BXServices

 Abstract: Displays progress and result of transmission by one BXSubmissionController	

 Related: 

 Documentation:	

 */


extern NSString * const BXSubmissionWindowViewTypeProgressKey;
extern NSString * const BXSubmissionWindowViewTypeMediumTextKey;
extern NSString * const BXSubmissionWindowViewTypeLargeTextKey;

extern NSString * const BXSubmissionWindowTypeKey;
extern NSString * const BXSubmissionWindowWindowTitleKey;
extern NSString * const BXSubmissionWindowTitleKey;
extern NSString * const BXSubmissionWindowDescriptionKey;
extern NSString * const BXSubmissionWindowProgressBarKey;
extern NSString * const BXSubmissionWindowDefaultButtonTitleKey;		// Maybe we need here some extra keys for selector and target
extern NSString * const BXSubmissionWindowDefaultButtonActionKey;
extern NSString * const BXSubmissionWindowAlternateButtonTitleKey;		// Maybe we need here some extra keys for selector and target
extern NSString * const BXSubmissionWindowAlternateButtonActionKey;
extern NSString * const BXSubmissionWindowOtherButtonTitleKey;		// Maybe we need here some extra keys for selector and target
extern NSString * const BXSubmissionWindowOtherButtonActionKey;

extern NSString * const BXSubmissionButtonActionCloseKey;
extern NSString * const BXSubmissionButtonActionRetryKey;
extern NSString * const BXSubmissionButtonActionRunNetworkDiagnosisKey;
extern NSString * const BXSubmissionButtonActionSendSessionViaMailKey;

extern NSString * const BXSubmissionWindowFrameKey;



@protocol BXSubmissionWindowControllerDelegate;


@class BXAssistantSession, BXEmbossedTextField, BXGradientView;


@interface BXSubmissionWindowController : NSWindowController
{
	id _delegate;
	
	BXEmbossedTextField *_progressViewTitleTextFieldOutlet;
	NSTextField *_progressViewDescriptionTextFieldOutlet;
	NSProgressIndicator *_progressIndicatorOutlet;
	NSButton *_progressViewDefaultButtonOutlet;
	NSButton *_progressViewAlternateButtonOutlet;
	NSButton *_progressViewOtherButtonOutlet;
	BXGradientView *_backgroundView;

	NSImageView *_animationStartingImageView;
	NSRect _animationStartingFrame;
	
	@private
		BXAssistantSession *_currentAssistantSession;
		NSDictionary *_currentUserInfo;
		NSImage *_animationStartingImage;
		NSRect _animationEndingFrame;
}

@property (assign) id delegate;
@property (nonatomic, retain) IBOutlet BXEmbossedTextField *progressViewTitleTextFieldOutlet;
@property (nonatomic, retain) IBOutlet NSTextField *progressViewDescriptionTextFieldOutlet;
@property (nonatomic, retain) IBOutlet NSProgressIndicator *progressIndicatorOutlet;
@property (nonatomic, retain) IBOutlet NSButton *progressViewDefaultButtonOutlet;
@property (nonatomic, retain) IBOutlet NSButton *progressViewAlternateButtonOutlet;
@property (nonatomic, retain) IBOutlet NSButton *progressViewOtherButtonOutlet;
@property (nonatomic, retain) IBOutlet BXGradientView *backgroundView;;

@property (nonatomic, retain) IBOutlet NSImageView *animationStartingImageViewOutlet;
@property (retain) NSImage *animationStartingImage;
@property (assign) NSRect animationStartingFrame;
@property (assign) NSRect animationEndingFrame;


- (void)fadeOutAssistantBackground;
- (void)updateWindow:(NSNotification *)inNotification;

- (IBAction)defaultButtonClick:(id)inSender;
- (IBAction)alternateButtonClick:(id)inSender;
- (IBAction)otherButtonClick:(id)inSender;

@end



@protocol BXSubmissionWindowControllerDelegate <NSObject>

@optional
- (void)closeSubmissionController:(id)inSender;
- (void)sendSessionAgain:(id)inSender;
- (void)sendSessionViaMail:(id)inSender;
- (void)startNetworkDiagnosis:(id)inSender;


@end