//
//  LCNavigationController.h
//  LCToolkit
//
//  Created by Logan Collins on 6/21/10.
//  Copyright 2010 Logan Collins. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
#import "LCViewController.h"
#import "LCNavigationBar.h"


@class LCNavigationBar;


/* LCNavigationController is an NSViewController subclass that manages
 * a stack of child view controllers, allowing navigation between them
 * similar to the UIKit's UIViewController.
 */
@interface LCNavigationController : LCViewController <LCNavigationBarDelegate> {
@private
	NSMutableArray *viewControllers;
	
	CATransition *transition;
	
	IBOutlet NSView *containerView;
	LCNavigationBar *navigationBar;
}

- (id)initWithRootViewController:(LCViewController *)viewController;

@property (assign) IBOutlet LCNavigationBar *navigationBar;

@property (copy) NSArray *viewControllers;
@property (readonly) LCViewController *topViewController;

- (void)setViewControllers:(NSArray *)array animated:(BOOL)isAnimated;

- (void)pushViewController:(LCViewController *)viewController animated:(BOOL)isAnimated;
- (void)popViewControllerAnimated:(BOOL)isAnimated;
- (void)popToRootViewControllerAnimated:(BOOL)isAnimated;
- (void)popToViewController:(LCViewController *)viewController animated:(BOOL)isAnimated;

@end
