//
//  LCBottomToolbar.h
//  LCToolkit
//
//  Created by Logan Collins on 12/17/07.
//  Copyright 2010 Logan Collins. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "LCBottomToolbarItem.h"


enum {
	LCBottomToolbarDefaultStyle = 0,
	LCBottomToolbarTexturedStyle,
};
typedef NSUInteger LCBottomToolbarStyle;


@protocol LCBottomToolbarDelegate;


/* LCBottomToolbar is an NSToolbar-style view that manages layout of a set of items
 * along the bottom pane of a window, similar to some iApps like iPhoto and iWeb
 */
@interface LCBottomToolbar : NSView {
@private
	NSArray *itemIdentifiers;
	NSDictionary *items;
	NSDictionary *itemViews;
	NSArray *visibleItems;
	
	id <LCBottomToolbarDelegate> delegate;
	
	NSPopUpButton *clipIndicator;
	NSDictionary *labelAttributes;
	
	LCBottomToolbarStyle style;
}

@property (assign) id <LCBottomToolbarDelegate> delegate;

@property LCBottomToolbarStyle style;

- (NSArray *)items;
- (NSArray *)visibleItems;

- (void)reloadItems;
- (void)validateItems;

@end


/* The LCBottomToolbarDelegate protocol is implemented by the toolbar's delegate
 * The delegate provides a set of toolbar items for the toolbar to display
 */
@protocol LCBottomToolbarDelegate <NSObject>

@required
- (LCBottomToolbarItem *)bottomToolbar:(LCBottomToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier;
- (NSArray *)bottomToolbarDefaultItemIdentifiers:(LCBottomToolbar *)toolbar;

@end
