//
//  KSTKTabHeadersBar.h
//  Eliott
//
//  Created by pierre on 05/05/08.
//  Copyright 2008 Id-Box. All rights reserved.
//

#import <Cocoa/Cocoa.h>
@class KSTKHeadersBarButton;
@class KSTKHeadersBar;

@interface KSTKTabHeadersBar : NSControl {
	NSMutableArray * cellsArray;
	KSTKHeadersBarButton *selectedCell;
	float _calculatedWidth, _minimumWidth;
	NSPoint _mouseDownLocation;
	NSUInteger _firstCellIndex;
	NSTabView * refTabView;
}
@property (nonatomic,retain) NSMutableArray * cellsArray;
@property (nonatomic,retain) KSTKHeadersBarButton *selectedCell;
@property (nonatomic,retain)	NSTabView * refTabView;
@property (nonatomic,assign) float _calculatedWidth, _minimumWidth;

- (KSTKHeadersBarButton *)addTabViewHeader;
- (KSTKHeadersBarButton *)cellForPoint:(NSPoint)aPoint cellFrame:(NSRectPointer)outFrame;

-(void)selectLeft:(id)sender;
-(void)selectRight:(id)sender;
-(NSMenu *)selectionMenu;
-(void)	removeAllSubviews;
-(IBAction)select:(id)sender;
-(id) initWithFrame:(NSRect)aFrame controller:(id)aController;
-(void) reprocessCalculations;
-(void)reprocessFrameSize;
-(void)recalculateWidth;

- (NSUInteger)firstCellIndex;
- (void)checkFirstCell;
- (void)disposeInSuperview;
- (CGFloat)widthForCellRange:(NSRange)cellRange;
- (void) setTabView:(NSTabView*)aTabView;
@end
