-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAttributedPlainText.h
executable file
·41 lines (30 loc) · 1.09 KB
/
AttributedPlainText.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
//
// AttributedPlainText.h
// Notation
//
// Created by Zachary Schneirov on 1/16/06.
// Copyright 2006 Zachary Schneirov. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#define SEPARATE_ATTRS 0
@interface NSMutableAttributedString (AttributedPlainText)
- (void)trimLeadingWhitespace;
- (void)removeAttachments;
- (void)prefixWithSourceString:(NSString*)source;
#if SEPARATE_ATTRS
+ (NSMutableAttributedString*)attributedStringWithString:(NSString*)text attributesByRange:(NSDictionary*)attributes font:(NSFont*)font;
#endif
- (void)santizeForeignStylesForImporting;
- (void)addLinkAttributesForRange:(NSRange)changedRange;
- (BOOL)restyleTextToFont:(NSFont*)currentFont usingBaseFont:(NSFont*)baseFont;
@end
@interface NSAttributedString (AttributedPlainText)
+ (NSCharacterSet*)antiURLCharacterSet;
- (NSArray*)allLinks;
- (id)findNextLinkAtIndex:(unsigned int)startIndex effectiveRange:(NSRange *)range;
#if SEPARATE_ATTRS
//extract the attributes using their ranges as keys
- (NSDictionary*)attributesByRange;
#endif
+ (NSAttributedString*)timeDelayStringWithNumberOfSeconds:(double)seconds;
@end