//
//  LCTabBarItemCell.h
//  LCToolkit
//
//  Created by Logan Collins on 9/28/09.
//  Copyright 2010 Logan Collins. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@interface LCTabBarItemCell : NSActionCell {
@private
    NSRect _frame;
    NSSize _stringSize;
	
    NSTrackingArea *_cellTrackingArea;
    NSTrackingArea *_closeButtonTrackingArea;
	
	BOOL _isDirty;
    BOOL _closeButtonOver;
    BOOL _closeButtonPressed;
    BOOL _isInOverflowMenu;
	BOOL _showsCloseButton;
}

// Accessors
@property (retain) NSTrackingArea *cellTrackingArea;
@property (retain) NSTrackingArea *closeButtonTrackingArea;

@property (getter=isDirty) BOOL dirty;
@property BOOL showsCloseButton;
@property BOOL isInOverflowMenu;
@property BOOL closeButtonPressed;
@property BOOL closeButtonOver;

- (CGFloat)width;

- (NSRect)frame;
- (void)setFrame:(NSRect)rect;

- (void)setStringValue:(NSString *)aString;
- (NSSize)stringSize;
- (NSAttributedString *)attributedStringValue;

- (NSRect)closeButtonRectForFrame:(NSRect)cellFrame;
- (CGFloat)minimumWidthOfCell;
- (CGFloat)desiredWidthOfCell;

- (NSImage *)dragImageForRect:(NSRect)cellFrame;

@end
