//
//  GSMetricStore.h
//  GlyphsCore
//
//  Created by Georg Seifert on 05.12.12.
//  Copyright (c) 2012 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GSBase.h>
#import <GlyphsCore/GSContainerProtocol.h>
#import <GlyphsCore/GSContentProtocol.h>
#if !defined(GLYPHS_LITE) && !defined(LIBCORE)
#import <GlyphsCore/GSIdentifiableParameter.h>
#endif

@class GSMetric;
NS_ASSUME_NONNULL_BEGIN
/**
 @note `GSIdentifiableParameter` compliance: Returns the `parameterIdentifier` of its `metric` property, if applicable.
 */
#if !defined(GLYPHS_LITE) && !defined(LIBCORE)
@interface GSMetricStore : NSObject <NSCopying, GSIdentifiableParameter, GSContentProtocol, GSItemProtocol>
#else
@interface GSMetricStore : NSObject <NSCopying, GSItemProtocol>
#endif
{
	CGFloat _position;
	CGFloat _overshoot;
}

- (instancetype)initWithPosition:(CGFloat)position;

- (instancetype)initWithPosition:(CGFloat)position overshoot:(CGFloat)overshoot;

@property (nonatomic, weak) GSMetric *metric;

@property (nonatomic, assign) CGFloat position;

- (void)setPositionFast:(CGFloat)position;

@property (nonatomic, assign) CGFloat overshoot;

- (void)setOvershootFast:(CGFloat)overshoot;

// an object based mirror of overshoot to allow nil (for NSNotFound)
@property (nonatomic, strong, nullable) NSNumber *overshootValue;

// will return self.metric.title
@property (nonatomic, readonly) NSString *title;

@end
NS_ASSUME_NONNULL_END
