//
//  MazeView.h
//  Rat
//
//  Created by Curtis Jones on 2009.11.10.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

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

@interface MazeView : NSView
{
	CGImageRef mImage;								// 
	CGContextRef mBitmap;							// 
	CGImageRef mBitmapImage;					// 
	
	ratlibsession_t *mSession;				// ratlib session
	
	BOOL mInTargetMode;								// show crosshair cursor?
	BOOL mIsDirty;										// needs redrawing?
	
	id mEventCallbackTarget;					// 
	SEL mEventCallbackSelector;				// 
}

@property (assign, readwrite) CGImageRef image;
@property (assign, readwrite) ratlibsession_t *session;

@property (assign, readwrite) id target;
@property (assign, readwrite) SEL selector;

- (void)setTargetCursor:(BOOL)aBool;

- (void)drawVisitedInContext:(CGContextRef)context inRect:(NSRect)rect;
- (void)drawTargetInContext:(CGContextRef)context point:(ratlibpoint_t*)point colorR:(float)r colorG:(float)g colorB:(float)b colorA:(float)a;
- (void)drawRect:(NSRect)dirtyRect inContext:(CGContextRef)context;
- (NSRect)rectFromPoint:(ratlibpoint_t*)point width:(NSUInteger)width height:(NSUInteger)height;

@end
