-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathKFCompletingTextFormatter.h
More file actions
39 lines (31 loc) · 1.1 KB
/
KFCompletingTextFormatter.h
File metadata and controls
39 lines (31 loc) · 1.1 KB
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
//
// KFCompletingTextFormatter.h
// KFCompletingTextFormatter v. 1.0, 8/22, 2003
//
// Copyright (c) 2003 Ken Ferry. Some rights reserved.
// http://homepage.mac.com/kenferry/software.html
//
// This work is licensed under a Creative Commons license:
// http://creativecommons.org/licenses/by-nc/1.0/
//
// Send me an email if you have any problems (after you've read what there is to read).
#import <Cocoa/Cocoa.h>
// KFCompletionsDataSource informal protocol
@interface NSObject ( KFCompletionsDataSource )
// should return nil if there is no valid completion
- (NSString *)completionForPrefix:(NSString *)prefix;
- (BOOL)isACompletion:(NSString *)aString;
@end
@interface KFCompletingTextFormatter : NSFormatter
{
IBOutlet id dataSource;
NSDictionary *kfCompletionMarkingAttributes; // defaults to nil
BOOL kfCommaDelimited; // defaults to NO
}
- (id)dataSource;
- (void)setDataSource:(id)dataSource;
- (BOOL)commaDelimited;
- (void)setCommaDelimited:(BOOL)flag;
- (NSDictionary *)completionMarkingAttributes;
- (void)setCompletionMarkingAttributes:(NSDictionary *)attributesDictionary;
@end