/
BCStatusItemView.h
49 lines (38 loc) · 1.49 KB
/
BCStatusItemView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// BCStatusItemView.h
// BCStatusItem
//
// Created by Jeremy Knope on 3/22/10.
// Copyright 2010 Buttered Cat Software. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class BCStatusItemView;
@protocol BCStatusItemViewDelegate
- (NSDragOperation)statusItemView:(BCStatusItemView *)view draggingEntered:(id <NSDraggingInfo>)info;
- (void)statusItemView:(BCStatusItemView *)view draggingExited:(id <NSDraggingInfo>)info;
- (BOOL)statusItemView:(BCStatusItemView *)view prepareForDragOperation:(id <NSDraggingInfo>)info;
- (BOOL)statusItemView:(BCStatusItemView *)view performDragOperation:(id <NSDraggingInfo>)info;
@end
@interface BCStatusItemView : NSView<NSMenuDelegate> // TODO: ifdef this for 10.6 only
{
NSStatusItem *parentStatusItem;
NSMenu *menu;
BOOL highlighted;
BOOL doesHighlight;
NSImage *image;
NSImage *alternateImage;
NSString *title;
NSAttributedString *attributedTitle;
id<BCStatusItemViewDelegate> delegate;
}
@property (assign, nonatomic) BOOL doesHighlight;
@property (copy, nonatomic) NSString *title;
@property (copy, nonatomic) NSAttributedString *attributedTitle;
@property (copy, nonatomic) NSImage *image;
@property (copy, nonatomic) NSImage *alternateImage;
@property (assign, nonatomic) id<BCStatusItemViewDelegate> delegate;
@property (nonatomic, getter = isEnabled) BOOL enabled;
+ (BCStatusItemView *)viewWithStatusItem:(NSStatusItem *)statusItem;
- (id)initWithStatusItem:(NSStatusItem *)statusItem;
//- (void)registerForDraggedTypes:(NSArray *)types;
@end