-
Notifications
You must be signed in to change notification settings - Fork 1
/
PDFavoritesBar.h
92 lines (62 loc) · 2.17 KB
/
PDFavoritesBar.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//
// PDFavoritesBar.h
// SproutedInterface
//
// Created by Philip Dow on 3/17/06.
// Copyright Sprouted. All rights reserved.
// Inquiries should be directed to [email protected]
//
#define PDFavoritePboardType @"PDFavoritePboardType"
#define PDFavoritesDidChangeNotification @"PDFavoritesDidChangeNotification"
#define PDFavoriteName @"name"
#define PDFavoriteID @"id"
#import <Cocoa/Cocoa.h>
@class PDFavorite;
@interface PDFavoritesBar : NSView {
NSColor *_backgroundColor;
NSMutableArray *_favorites;
NSMutableArray *_vFavorites;
NSMutableArray *_trackingRects;
NSPopUpButton *_morePop;
NSMenuItem *_popTitle;
unsigned _eventFavorite;
BOOL _titleSheet;
id delegate;
id _target;
SEL _action;
NSMenu *contextMenu;
BOOL drawsLabels;
}
- (NSColor*) backgroundColor;
- (void) setBackgroundColor:(NSColor*)color;
- (NSMutableArray*) favorites;
- (void) setFavorites:(NSArray*)favorites;
- (id) delegate;
- (void) setDelegate:(id)anObject;
- (id) target;
- (void) setTarget:(id)target;
- (SEL) action;
- (void) setAction:(SEL)action;
- (BOOL) drawsLabels;
- (void) setDrawsLabels:(BOOL)draws;
- (IBAction) toggleDrawsLabels:(id)sender;
- (void) sendEvent:(unsigned)sender;
- (NSDictionary*) eventFavorite;
- (BOOL) addFavorite:(NSDictionary*)aFavorite atIndex:(unsigned)loc requestTitle:(BOOL)showSheet;
- (void) removeFavoriteAtIndex:(unsigned)loc;
- (void) _generateFavoriteViews:(id)object;
- (void) _positionFavoriteViews:(id)object;
- (void) _initiateDragOperation:(unsigned)favoriteIndex location:(NSPoint)dragStart event:(NSEvent*)theEvent;
- (void) favoritesDidChange:(NSNotification*)aNotification;
- (void) _toolbarDidChangeVisible:(NSNotification*)aNotification;
- (NSString*) _titleFromTitleSheet:(NSString*)defaultTitle;
- (void) _okaySheet:(id)sender;
- (void) _cancelSheet:(id)sender;
- (PDFavorite*) favoriteWithIdentifier:(id)anIdentifier;
- (void) setLabel:(int)label forFavorite:(PDFavorite*)aFavorite;
- (void) rescanLabels;
- (NSRect) frameOfFavoriteAtIndex:(int)theIndex;
@end
@interface NSObject (FavoritesBarDelegate)
- (int) favoritesBar:(PDFavoritesBar*)aFavoritesBar labelOfItemWithIdentifier:(NSString*)anIdentifier;
@end