//
//  WBOverviewPanel.h
//  MySQLWorkbench
//
//  Created by Alfredo Kojima on 6/Oct/08.
//  Copyright 2008 Sun Microsystems Inc. All rights reserved.
//

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

#include "workbench/wb_overview.h"

@class WBOverviewBackgroundView;
@class WBMenuManager;
@class WBOverviewWorkbenchCentral;

@interface WBOverviewPanel : WBBasePanel
{
  IBOutlet WBOverviewWorkbenchCentral *workbenchCentral;
  
  NSScrollView *_scrollView;
  WBOverviewBackgroundView *_contentView;
  NSMutableDictionary *_itemContainers;
  
  WBMenuManager *_menuManager;
  
  bec::NodeId *_lastFoundNode;
  NSString *_searchText;
  
  wb::OverviewBE *_overview;
}

- (id)initWithBE:(wb::OverviewBE*)overview;
- (void)rebuildAll;
- (void)refreshNode:(const bec::NodeId&)node;
- (void)refreshNodeChildren:(const bec::NodeId&)node;
- (void)setMenuManager:(WBMenuManager*)manager;

- (NSView*)topView;
- (NSString*)title;
- (NSString*)identifier;
- (bec::UIForm*)formBE;
- (wb::OverviewBE*)backend;
- (WBMenuManager*)menuManager;

- (void)searchString:(NSString*)text;

- (void)registerContainer:(id)container
                  forItem:(NSString*)item;

- (void)unregisterContainerForItem:(NSString*)item;

- (void)buildMainSections;
@end
