//
//  WBModelDiagramPanel.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"
#import "MCanvasViewer.h"

@class MCanvasScrollView;

namespace bec
{
  class UIForm;
};
namespace wb
{
  class ModelDiagramForm;
};

@class WBMiniToolbar;
@class WBModelSidebarController;

@interface WBModelDiagramPanel : WBBasePanel 
{
  NSString *_identifier;
  IBOutlet NSView *topView;
  IBOutlet NSView *toolbar;
  IBOutlet WBMiniToolbar *optionsToolbar;
  IBOutlet MCanvasScrollView *scrollView;
  MCanvasViewer *_viewer;
  
  wb::ModelDiagramForm *_formBE;
  
  WBModelSidebarController *mSidebar;
}

- (id)initWithId:(NSString*)oid
          formBE:(wb::ModelDiagramForm*)be;
- (NSView*)topView;

- (NSString*)identifier;
- (bec::UIForm*)formBE;

- (void)setSidebar:(WBModelSidebarController*)sidebar;
- (WBModelSidebarController*)sidebar;

- (void)updateCursor;

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

- (void)canvasToolChanged:(mdc::CanvasView*)canvas;

- (NSView*) toolsToolbar;
- (id)optionsToolbar;
- (void)showOptionsToolbar:(BOOL)flag;

- (MCanvasViewer*)canvasViewer;
- (mdc::CanvasView*)canvas;

- (BOOL)isClosed;
@end
