//
//  LCDetailsViewItem.h
//  LCToolkit
//
//  Created by Logan Collins on 8/1/08.
//  Copyright 2010 Logan Collins. All rights reserved.
//

#import <Cocoa/Cocoa.h>


@class LCDetailsView, LCDetailsViewItemHeaderView;


/* LCDetailsViewItem defines a section for an LCDetailsView
 * A details view item is collapsible, hideable and optionally resizeable
 */
@interface LCDetailsViewItem : NSViewController {
@private
	NSView *containerView;
	NSImage *image;
	BOOL collapsed;
	BOOL hidden;
	LCDetailsView *detailsView;
	NSView *firstKeyView;
	NSView *lastKeyView;
	BOOL resizable;
	CGFloat minSize;
	CGFloat maxSize;
	LCDetailsViewItemHeaderView *headerView;
	NSView *resizeView;
}

+ (Class)headerViewClass;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil; // Designated initializer
- (id)initWithView:(NSView *)aView;

// Views
@property (retain) LCDetailsView *detailsView;
@property (readonly) NSView *containerView;

// Attributes
@property (copy) NSImage *image;
@property (getter=isCollapsed) BOOL collapsed;
@property (getter=isHidden) BOOL hidden;
@property (getter=isResizable) BOOL resizable;

// Key views
@property (retain) IBOutlet NSView *firstKeyView;
@property (retain) IBOutlet NSView *lastKeyView;

// Size
@property CGFloat size;
@property CGFloat minSize;
@property CGFloat maxSize;

@end


@interface LCDetailsViewItemHeaderView : NSView {
@private
	LCDetailsViewItem *item;
	BOOL highlighted;
}

@property (assign) LCDetailsViewItem *item;

@end
