//
//  LCBaseObject.h
//  LogoistCore
//
//  Created by Mendel Kucharzeck on 14.12.11.
//  Copyright 2011 AvisNocturna Software. All rights reserved.
//

#import "LCTimelineAnimateableObject.h"
#import <AvisNocturnaCrossCore/ANImageHelper-BlendingModes.h>

@class LCObjectsContainer;
@class LCCanvasObjectLayer;
@class LCCanvasRootLayer;
@class LCCombineObject;
@class LCBaseDistorter;

@interface LCBaseObject : LCTimelineAnimateableObject <NSCoding,NSCopying>
{
    LCObjectsContainer *objectsContainer;
    
    LCCanvasObjectLayer *layer;
    BOOL contentIsDirty;

    //Combiners
    LCCombineObject *combineObject;
    
    //Properties
    BOOL enabled;
    BOOL locked;
    float opacity;
    float scaling;
    ANImageHelper_BlendingMode blendingMode;
    NSString *userName;
    
    //Filters
    NSMutableArray *maskDistortFilters;
    NSMutableArray *backgroundFilters;
    NSMutableArray *maskReplaceFilters;
    NSMutableArray *overlayFilters;
    NSMutableArray *finalImageDistortFilters;
    BOOL didIncludeFiltersInLastRenderPass;
    
    //Distorters
    LCBaseDistorter *distorter;

    //Handles
    NSMutableArray *latestHandles;
    BOOL isCurrentlyMovingHandle;
}

- (id)initWithObjectsContainer:(LCObjectsContainer*)o;

- (void) noteObjectChangedAnimated:(BOOL)animated contentIsDirty:(BOOL)dirty;

@property (assign) LCCombineObject *combineObject;
@property (readonly) BOOL isGhostObject;
@property (retain) NSString *userName;

@property (retain) LCBaseDistorter *distorter;

@property (assign) LCObjectsContainer *objectsContainer;

- (CGImageRef) objectIcon;

@property (readonly) NSArray *propertyEditDictionaries;

//Properties
@property (assign) BOOL enabled;
@property (assign) BOOL locked;
@property (assign) float opacity;
@property (assign) float scaling;
@property (assign) ANImageHelper_BlendingMode blendingMode;

@end
