forked from jerrykrinock/CategoriesObjC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NSDocumentController+MoreRecents.h
40 lines (30 loc) · 1.22 KB
/
NSDocumentController+MoreRecents.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
#import <Cocoa/Cocoa.h>
@interface NSDocumentController (MoreRecents)
/*!
@brief Removes a document with a given URL from the receiver's
list of Recent Documents
@details Due to lack of sufficient API from Apple, this method
actually removes *all* recent documents, then replaces all except
the one specified. Seems to work OK, though.
*/
- (void)forgetRecentDocumentUrl:(NSURL*)url ;
/*!
@brief Returns display names of the current recent documents
@result An array with per-item correspondence to the array you
get from -recentDocumentURLs.
*/
- (NSArray*)recentDocumentDisplayNames ;
/*!
@brief Returns a menu suitable to be the submenu of an "Open Recent"
menu item for the application.
@details Pass in a target and action to specify an action message which
will be sent when one of the items in the menu is clicked. The sender
parameter of the action will be one of the menu items, and this item's
representedObject will be the file URL of a recent document.
Typically, your target should respond to the action by opening the
document specified by the given file URL.
*/
- (NSMenu*)recentDocumentsSubmenuWithTarget:(id)target
action:(SEL)action
fontSize:(CGFloat)fontSize ;
@end