File: DocumentController.h

package info (click to toggle)
textedit.app 5.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,308 kB
  • sloc: objc: 2,863; makefile: 14
file content (28 lines) | stat: -rw-r--r-- 1,289 bytes parent folder | download | duplicates (2)
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
#import <Cocoa/Cocoa.h>
#import "Document.h"

/* An instance of this subclass is created in the main nib file. */

// NSDocumentController is subclassed to provide for modification of the open panel. Normally, there is no need to subclass the document controller.
@interface DocumentController : NSDocumentController {
    NSMutableDictionary *customOpenSettings;	    // Mapping of document URLs to encoding, ignore HTML, and ignore rich text settings that override the defaults from Preferences
    NSMutableArray *deferredDocuments;
    NSLock *transientDocumentLock;
    NSLock *displayDocumentLock;
}

+ (NSView *)encodingAccessory:(NSStringEncoding)encoding includeDefaultEntry:(BOOL)includeDefaultItem encodingPopUp:(NSPopUpButton **)popup checkBox:(NSButton **)button;

- (Document *)openDocumentWithContentsOfPasteboard:(NSPasteboard *)pb display:(BOOL)display error:(NSError **)error;

- (NSStringEncoding)lastSelectedEncodingForURL:(NSURL *)url;
- (BOOL)lastSelectedIgnoreHTMLForURL:(NSURL *)url;
- (BOOL)lastSelectedIgnoreRichForURL:(NSURL *)url;

- (NSInteger)runModalOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)types;

- (Document *)transientDocumentToReplace;
- (void)displayDocument:(NSDocument *)doc;
- (void)replaceTransientDocument:(NSArray *)documents;

@end