//
//  MyDocument.h
//  Expression
//
//  Created by ashley on 15/11/2008.
//  Copyright __MyCompanyName__ 2008 . All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class EXPModelObject;
@class EXPComponent;
@class PLTMatrix;
@class EXPSetupWindowController;

@interface EXPDocument : NSDocument
{
	EXPModelObject *_model;
	EXPComponent *_lastComponent;
	NSString *_currentTool;
	NSString *_filename;
	NSPoint startPoint;
	BOOL documentNeedsSaving;
	PLTMatrix *_matrix;
	
	EXPSetupWindowController *setupWindowController;
	
//	NSPoint mouseDownPoint;
//	NSString *pathName;
//	NSString *fileStub;
//	NSString *fileName;
	IBOutlet id _mainView;
}

- (void) setFilename:(id)filename;
- (id) filename;
- (void) setMatrix:(id)matrix;
- (id) matrix;

- (IBAction) selectAll:(id)sender;
- (IBAction) solve:(id)sender;
- (IBAction) showSimSetup:(id)sender;
- (IBAction) exportToFile:(id)sender;

- (void) moveComponentsConnectedTo:(EXPComponent *)component by:(NSPoint)change;

- (void) mouseDownAtPoint:(NSPoint)point;
- (void) mouseUpAtPoint:(NSPoint)point;
- (void) mouseDraggedToPoint:(NSPoint)point;

- (IBAction) delete:(id)sender;

- (void) exportDiagramToFile:(NSString *)fileName;

- (void) setCurrentTool:(id)currentTool;
- (id) currentTool;
- (void) setModelObject:(id)model;
- (id) modelObject;
- (id) mainview;

@end