//
//  GlyphsToolProtocol.h
//  GlyphsCore
//
//  Created by Martin Winter on 20.06.18.
//  Copyright © 2018 schriftgestaltung.de. All rights reserved.
//

@class GSWindowController;
@class GSEditViewController;

NS_ASSUME_NONNULL_BEGIN

NS_SWIFT_UI_ACTOR
@protocol GlyphsTool <NSObject>

/// The main window controller.
@property (weak, nullable) GSWindowController *windowController;

/// The current editViewController controller.
@property (weak, nullable) GSEditViewController *editViewController;

#if !TARGET_OS_IOS
- (nullable NSCursor *)standardCursor;
#endif

+ (nonnull NSString *)groupIDKey;

+ (nonnull NSString *)subGroupIDKey;

+ (nonnull NSString *)triggerKey;


/** The group ID defines the position of the tool in the toolbar.

- selection tools (select, text): 10
- editTools (draw): 20
- navigationTools (hand, zoom): 30
*/
@property (nonatomic, readonly) NSUInteger groupID;

/** The sub group ID defines the position in the tool stack in the toolbar.
 when the subGroupID is equal, sorted by name
 */

@property (nonatomic, readonly) NSUInteger subGroupID;

/// The description/name of the plugin.
@property (nonatomic, readonly) NSString *title;

/// The icon displayed in the toolbar.
@property (nonatomic, readonly) NSImage *toolBarIcon;

/// The default keyboard shortcut to select the tool.
@property (nonatomic, readonly, nullable) NSString *trigger;

@end
NS_ASSUME_NONNULL_END
