//
//  GSCollectionViewItemView.h
//  Glyphs
//
//  Created by Georg Seifert
//  Copyright 2023 schriftgestaltung.de. All rights reserved.
//

@class GSGlyph;

@interface GSCollectionViewItemView : NSView <NSTextFieldDelegate>

@property(nonatomic, readonly) NSTextField *nameField;

@property (nonatomic, getter=isSelected) BOOL selected;
@property (nonatomic) BOOL activeSelected;

@property (weak, nonatomic) IBOutlet NSViewController *delegate;

@property (nonatomic) BOOL drawChangeState;
#ifndef GLYPHS_LITE
@property (nonatomic) BOOL drawUnicode;
@property (nonatomic) CGFloat smallestNameHeight;
#endif
@property (nonatomic) BOOL drawLabelColor;
@property (nonatomic) BOOL drawExtraInfo;
@property (nonatomic) BOOL drawExtraInfoCustomInfo;
@property (nonatomic) BOOL drawExtraInfoMetricsKeysState;
#ifndef GLYPHS_LITE
- (void)_updateDrawUnicode;
#endif
@end

@interface NSObject (ViewDelegate)
- (void)doubleClick:(id)sender;

- (BOOL)textShouldEndEditing:(NSText *)textObject;

- (void)textDidEndEditing:(NSNotification *)aNotification;

@end
