forked from erkyrath/Inform7-IDE-Mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIFRestrictedTextStorage.h
36 lines (27 loc) · 1.33 KB
/
IFRestrictedTextStorage.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
//
// IFRestrictedTextStorage.h
// Inform-xc2
//
// Created by Andrew Hunter on 04/01/2008.
// Copyright 2008 Andrew Hunter. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "IFSyntaxStorage.h"
#import "IFRestrictedString.h"
///
/// Text storage object that represents a restricted range of another text storage object
///
@interface IFRestrictedTextStorage : NSTextStorage<IFDerivativeStorage> {
NSTextStorage* storage; // The text storage which being restricted
NSRange restriction; // The restriction that is in effect for this object
IFRestrictedString* string; // The restricted string value of this storage object
}
// Initialisation
- (id) initWithTextStorage: (NSTextStorage*) storage; // Creates a new restricted text storage object
- (NSTextStorage*) restrictedStorage; // The text storage object that this object is restricting
// Restricting the range that is being displayed by the storage object
- (BOOL) isRestricted; // YES if this storage object is not showing the entire range of available text
- (void) setRestriction: (NSRange) range; // Restricts the range that this storage object will display
- (void) removeRestriction; // Removes the restriction in effect for this object
- (NSRange) restrictionRange; // The restriction range for this object
@end