//
//  LCObjectsTimelineManager-Properties.h
//  LogoistCore
//
//  Created by Mendel Kucharzeck on 19.08.12.
//  Copyright (c) 2012 AvisNocturna Software. All rights reserved.
//

#import "LCObjectsTimelineManager.h"

@class LCObjectsTimelineProperty;
@class LCTimelineAnimateableObject;

@interface LCObjectsTimelineManager (Properties)

@property (readonly) NSArray *properties;
@property (readonly) NSArray *propertiesGroupedByObject;    //Returns array of NSDictionary with keys object and properties

@property (assign) BOOL automaticallyAddNewPropertiesForChangedObjects;

- (void) addProperty:(LCObjectsTimelineProperty*)property;
- (void) removeProperty:(LCObjectsTimelineProperty*)property;
- (void) flushAllProperties;

- (LCObjectsTimelineProperty*) findPropertyForObject:(LCTimelineAnimateableObject*)object andPropertyName:(NSString*)propertyName;
- (LCObjectsTimelineProperty*) findOrCreatePropertyForObject:(LCTimelineAnimateableObject*)object andPropertyName:(NSString*)propertyName;

- (NSArray*) allPropertyChangesForTime:(NSTimeInterval)time withThreshold:(NSTimeInterval)threshold;
- (NSArray*) allPropertyChangesWithDefaultThresholdForTime:(NSTimeInterval)time;
@property (readonly) NSArray *allPropertyChanges;

- (NSTimeInterval) nearestSnappingTimeIntervalForTime:(NSTimeInterval)time excludingChanges:(NSSet*)excludeChange foundSnappingTimeDistance:(NSTimeInterval*)r;  //Used for finding a right snapping time, returns -1 if not found

@end
