//
//  LCFormatBar.h
//  LCToolkit
//
//  Created by Logan Collins on 10/5/07.
//  Copyright 2010 Logan Collins. All rights reserved.
//

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


extern NSString * const LCFormatBarSeparatorItemIdentifier;
extern NSString * const LCFormatBarFlexibleSpaceItemIdentifier;


@protocol LCFormatBarDelegate;


/* LCFormatBar is an iWork-style formatting toolbar that manages layout of a set of controls
 */
@interface LCFormatBar : NSView {
@private
	NSArray *itemIdentifiers;
	NSDictionary *items;
	NSArray *visibleItems;
	
	id <LCFormatBarDelegate> delegate;
}

@property (assign) id <LCFormatBarDelegate> delegate;

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

- (void)reloadItems;

@end


@protocol LCFormatBarDelegate <NSObject>

@required
- (LCFormatBarItem *)formatBar:(LCFormatBar *)formatBar itemForItemIdentifier:(NSString *)itemIdentifier;
- (NSArray *)formatBarDefaultItemIdentifiers:(LCFormatBar *)formatBar;

@end
