//
//  LCBasePathElement.h
//  LogoistCore
//
//  Created by Mendel Kucharzeck on 09.02.12.
//  Copyright (c) 2012 AvisNocturna Software. All rights reserved.
//

#import "LCTimelineAnimateableObject.h"

@class LCPathObject;
@class LCCanvasRootLayer;
@class LCBaseObjectHandle;

@interface LCBasePathElement : LCTimelineAnimateableObject <NSCoding>
{
    NSString *identifier;
    NSInteger pathRun;
    
    CGPoint relativePosition;

    LCPathObject *pathObject;
}

- (id) initWithPathObject:(LCPathObject*)p;
@property (assign) CGPoint relativePosition;
@property (assign) NSInteger pathRun;           //Describes if it is the first move to, the second and so on
@property (readonly) NSString *identifier;

- (LCBaseObjectHandle*) handleWithSuffix:(NSString*)suffix inCanvas:(LCCanvasRootLayer*)canvas;

//For Subclassers
- (void) appendToPath:(CGMutablePathRef)path;
- (NSArray*) handlesForCanvas:(LCCanvasRootLayer*)canvas;

- (BOOL) canBeDeleted;

- (void) willBeginMovingHandle:(LCBaseObjectHandle*)handle;
- (void) handleHasBeenMoved:(LCBaseObjectHandle*)handle withDelta:(CGPoint)delta;
- (void) didFinishMovingHandle:(LCBaseObjectHandle*)handle;
- (void) mouseUpInsideHandle:(LCBaseObjectHandle *)handle;

@end
