//
//  MSInkTrickster.h
//  MSInkFramework
//
//  Created by Raleigh Ledet on Sun Oct 12 2003.
//  Copyright (c) 2003-2008 Mage Software. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Carbon/Carbon.h>

extern NSString* kExplodedLocation;
extern NSString* kExpoldedAttributedInkObject;

// MSInkTrickster is used to perform slight magic on ink objects. It's main claim to fame, though, is it's ability to send ink data back through Inkwell to be re-recognized.

@class MSAttributedInkData;
@class MSInkObject;

@interface MSInkTrickster : NSObject {
	NSArray *_reconStrArray;
	
	// Ink hackery I wish I didn't have to do
	EventHandlerRef _InkHandlerRef;
}


//  Sends raw attributed ink data back through Inkwell returning ans array of strings that Inkwell's considers possible recognitions.
-(NSArray*) recognizedArrayForAttributedInkData:(MSAttributedInkData*)attrInkData;

// Conveience method to create an ink object with by sending ink data back through Inkwell for recognition
-(MSInkObject*)inkObjectByRecognizingAttributedInkData:(MSAttributedInkData*)attrInkData;

// Returns a new MSAttributedInkData by joining two or more MSInkObject or MSAttributedInkData objects.
-(MSAttributedInkData *)joinInkObjects:(NSArray*)objs atLocations:(NSArray*)locs;

// Returns an NSArray of dictionarys describing MSAttributedInkData objects made from each stoke of the object.
// Dictionary Keys:
//		kExplodedLocation - NSValue (NSPoint) describing the location of the object;
//		kExpoldedAttributedInkObject - An MSAttributedInkData object made up of one stroke.
-(NSArray*)explodeInkObject:(id)obj atLocation:(NSPoint)loc;


// Internal routine. Never call this directly.
-(OSStatus)handleInkTextEvent:(NSEvent*)inkEvent;
@end
