//
//  GSFilterPlugin.h
//  GlyphsCore
//
//  Created by Georg Seifert on 19.01.10.
//  Copyright 2010 schriftgestaltung.de. All rights reserved.
//

#import <GlyphsCore/GlyphsFilterCoreProtocol.h>
#import <GlyphsApp/GlyphsFilterPluginProtocol.h>

@class GSFontMaster;
@class GSDialogController;
@class GSGlyphViewController;

#if !TARGET_OS_IOS
@interface GSFilterPlugin : NSViewController <GlyphsFilterCore, GlyphsFilterPlugin>
#else
@interface GSFilterPlugin : UIView <GlyphsFilterCore, GlyphsFilterPlugin>
#endif
{
#ifndef LIBCORE
	/// will be set by Glyphs
	__unsafe_unretained GSGlyphViewController *_controller;
#endif
	/// will be set by Glyphs
	BOOL rerun;

	/// if the plugin run is called through runFilterWithLayer: you might mant to pay attention to the current selection state.
	BOOL _checkSelection;
	/// for your internal use.
	BOOL returnValue;

	GSFontMaster *__unsafe_unretained _fontMaster;
	NSMutableArray<GSLayer *> *_layers;
	NSMutableArray<GSLayer *> *_shadowLayers;
	GSDialogController *_dialog;
}

@property (weak) IBOutlet NSControl *myFirstResponder;

- (void)cancelDialog:(id)sender;

- (void)process:(id)sender;

- (NSError *)setup;

- (void)final;

#if TARGET_OS_IOS
- (void)customParameterString:(UIView *)sender;

- (void)confirmDialog:(id)sender;
#endif

@end
