//
//  REReadDetailsView.h
//  Ehon
//
//  Created by Pierre on 06/05/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <KSToolKit/KSTKCustomViews.h>
@class REComicsViewManager, REDetailsHeadImageComponent, REDetailsComponent, REDetailsComponentAuthorsComponentsController,REDetailsRightPartBox;
@interface REReadDetailsView : NSView <REScrollViewResizeInformedDelegate>
{
	NSMutableArray * componentsArray; //array of displayed Elements // we need an uid to link with elem array, a type. no need for index as index = index in array
	NSMutableArray * componentsElementsArray; //NOT USED //array of all component Elements flagged wether or not they are displayed // this array will be saved in preferences // add default button 
	NSMutableArray * hiddenComponentKeysArray;
	REDetailsHeadImageComponent * componentHeader;
	REDetailsComponent *noteComponent;
	REDetailsRightPartBox * rightPartBox;
	NSImageView * bannerImageView;
	NSTextField * titleTextField;
	int dragOriginIndex;
	NSViewAnimation* dragAnimation;	
	NSArrayController * referenceAC;
	BOOL displayAsVertical,editableMode,drawDrag;
	IBOutlet NSFormatter * datesFormatter,* datesWithoutTimeFormatter, * integersFormatter;
	NSString * hiddenPreferencesKey;
}
//@property (assign,getter=comicsManager)	REComicsViewManager * _comicsManager;
@property (retain) REDetailsComponent *noteComponent;
@property (retain) NSMutableArray * hiddenComponentKeysArray;
@property (retain) 	NSTextField * titleTextField;
@property (retain) REDetailsRightPartBox * rightPartBox;
@property (retain) NSViewAnimation* dragAnimation;
@property (retain) NSMutableArray* componentsArray;
@property (assign) int dragOriginIndex;
@property (assign) 	BOOL displayAsVertical;
@property (assign) 	BOOL drawDrag;
@property (assign) 	BOOL editableMode;
@property (retain) REDetailsHeadImageComponent * componentHeader;
@property (retain) 	NSArrayController * referenceAC;
@property (retain)NSString * hiddenPreferencesKey;
@property (retain,readonly) IBOutlet NSFormatter * datesFormatter;
@property (retain,readonly) IBOutlet NSFormatter * datesWithoutTimeFormatter;	
@property (retain,readonly) IBOutlet NSFormatter * integersFormatter;
@property (retain)	NSImageView * bannerImageView;


-(NSString *)formatDate:(id)aDate;
-(NSString *)formatDateWithoutTime:(id)aDate;
-(NSString *)formatInteger:(id)anInteger;
-(void)addNoteComponentEditable:(BOOL)flag;
-(void)addNoteComponentEditable:(BOOL)flag kvcKey:(NSString*)aKVCKey label:(NSString*)aNote;
-(void)addRightBox;
//@property (assign) // copy for nsstringretain NSInteger yearReleased;
-(void)	recalculateHeight;
-(void)addComponentMode:(int)aMode key:(NSString *)aKey label:(NSString *)aLabel componentConfig:(NSDictionary *)aConfig;
-(void)bindToArrayControllerSelection:(NSArrayController *)anAC titleKVC:(NSString *)aKVC;
-(NSMenu *)componentsMenu;
-(void)loadHiddenComponentFromPreferenceskey:(NSString *)aKey;
-(void)	recalculateHeight;
-(void)bindToArrayControllerSelection:(NSArrayController *)anAC titleKVC:(NSString *)aKVC headerKVC:(NSString *)headKVC;
-(void) forceReloadImage:(id)sender;
@end

@interface REDetailsView : REReadDetailsView{}@end //DEPRECATED BUT STILL USED
