//
//  GSUnicodeInfoPopover.h
//  GlyphsApp
//
//  Created by Georg Seifert on 31.07.25.
//  Copyright © 2025 schriftgestaltung.de. All rights reserved.
//

#include <unicode/utypes.h>

NS_ASSUME_NONNULL_BEGIN

@protocol GSUnicodeInfoPopoverDelegate <NSObject>

- (BOOL)canShowCharacter:(UTF32Char)infoChar;

- (void)showCharacter:(UTF32Char)infoChar;

@optional

- (void)addCharacter:(UTF32Char)infoChar;

@end

@interface GSUnicodeInfoPopover : NSViewController

+ (void)showInfoPopoverForGlyph:(UChar32)infoChar delegate:(NSObject <GSUnicodeInfoPopoverDelegate> *)delegate sender:(NSButton *)sender;

@property (weak) NSObject <GSUnicodeInfoPopoverDelegate> *delegate;

@property (nonatomic) UTF32Char infoChar;

@property (weak) IBOutlet NSPopover *popover;

@property (weak) IBOutlet NSPopUpButton *fontSelector;

@property (weak) IBOutlet NSTextField *infoCharField;
@property (weak) IBOutlet NSTextField *nameField;
@property (weak) IBOutlet NSTextField *categoryField;
@property (weak) IBOutlet NSTextField *combiningClassField;
@property (weak) IBOutlet NSTextField *bidiClassField;
@property (weak) IBOutlet NSTextField *bidiMirroredField;
@property (weak) IBOutlet NSGridView *infoGrid;
@property (weak) IBOutlet NSButton *unicodeCheckerButton;

@end

NS_ASSUME_NONNULL_END
