-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathIRAttributedDisplayString.m
42 lines (38 loc) · 1.18 KB
/
IRAttributedDisplayString.m
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
//
// IRAttributedDisplayString.m
// Cindex
//
// Created by PL on 4/9/05.
// Copyright 2005 Indexing Research. All rights reserved.
//
#import "IRAttributedDisplayString.h"
@interface IRAttributedDisplayString () {
IRDisplayString * _recordString;
}
@end
// retrieves all its attributes from the underlying IRDisplayString
@implementation IRAttributedDisplayString
- (id)initWithIRIndex:(IRIndexDocument *)doc paragraphs:paragraphs record:(RECN)record {
if (self = [super init]) {
_recordString = [[IRDisplayString alloc] initWithIRIndex:doc paragraphs:paragraphs record:record];
}
return self;
}
- (void)dealloc {
}
- (NSString *)string {
return _recordString;
}
- (NSDictionary *)attributesAtIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange {
return [_recordString attributesAtIndex:index effectiveRange:aRange];
}
- (NSDictionary *)attributesAtIndex:(NSUInteger)index longestEffectiveRange:(NSRangePointer)aRange inRange:(NSRange)rangeLimit{
return [_recordString attributesAtIndex:index longestEffectiveRange:aRange inRange:rangeLimit];
}
- (RECN)record {
return [_recordString record];
}
- (ENTRYINFO *)entryInformation {
return [_recordString entryInformation];
}
@end