2016-10-26 21:14:02 +00:00
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
@protocol GBImageViewDelegate;
|
|
|
|
|
|
|
|
@interface GBImageViewGridConfiguration : NSObject
|
2021-01-13 18:59:28 +00:00
|
|
|
@property (nonatomic, strong) NSColor *color;
|
|
|
|
@property (nonatomic) NSUInteger size;
|
2016-10-26 21:14:02 +00:00
|
|
|
- (instancetype) initWithColor: (NSColor *) color size: (NSUInteger) size;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface GBImageView : NSImageView
|
2021-01-15 03:58:19 +00:00
|
|
|
@property (nonatomic, strong) NSArray<GBImageViewGridConfiguration *> *horizontalGrids;
|
|
|
|
@property (nonatomic, strong) NSArray<GBImageViewGridConfiguration *> *verticalGrids;
|
2019-06-07 20:38:34 +00:00
|
|
|
@property (nonatomic) bool displayScrollRect;
|
|
|
|
@property NSRect scrollRect;
|
2021-01-13 18:59:28 +00:00
|
|
|
@property (nonatomic, weak) IBOutlet id<GBImageViewDelegate> delegate;
|
2016-10-26 21:14:02 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol GBImageViewDelegate <NSObject>
|
|
|
|
@optional
|
|
|
|
- (void) mouseDidLeaveImageView: (GBImageView *)view;
|
|
|
|
- (void) imageView: (GBImageView *)view mouseMovedToX:(NSUInteger) x Y:(NSUInteger) y;
|
|
|
|
@end
|