//
//  GlyphsPaletteProtocol.h
//  PalettePlugin
//
//  Created by Georg Seifert on 4.7.07.
//  Copyright 2009 schriftgestaltung.de. All rights reserved.
//

@class GSWindowController;

/** \brief GlyphsPalette: The protocol defining the palette plugin interface
 The protocol defining the palette plugin interface.
 */
NS_SWIFT_UI_ACTOR
@protocol GlyphsPalette

/**
 The window controller managing the window the panel is in
 */
@property (nonatomic, weak) GSWindowController *windowController;
/// The interface version.
@property (readonly, nonatomic) NSUInteger interfaceVersion NS_SWIFT_NONISOLATED;
/// The title of the plugin.
@property (readonly, nonatomic) NSString *title;
/// the view to display in the palette.
@property (readonly, strong, nonatomic) NSView *theView;
/// the minimal height of the view.
@property (readonly, nonatomic) NSInteger minHeight;
/// the maximal height of the view.
@property (readonly, nonatomic) NSInteger maxHeight;

@optional

/**
 a NSMenu that is shown when the user clicks a gear button in the palette title. Useful to open a settings dialog or hide some lesser used UI
 */

@property (readonly, nonatomic) NSMenu *settingsMenu;
/**
 a view that is placed into the header of the pallet (between label and setting menu button)
 */
@property (readonly, nonatomic) NSView *accessoryView;

/** The current height of the palette

 Implement this when your palette is resize-able
 */
@property (assign, nonatomic) NSUInteger currentHeight;

//! do main initialization
- (void)loadPlugin;

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

  - Dimensions: 10
  - FitCurve: 20
  - Layers: 30
  - Transform: 40
  */
@property (readonly, nonatomic) NSUInteger sortID;

@end
