forked from erkyrath/Inform7-IDE-Mac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIFSourceFileView.h
42 lines (28 loc) · 1.48 KB
/
IFSourceFileView.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
42
//
// IFSourceFileView.h
// Inform
//
// Created by Andrew Hunter on Mon Feb 16 2004.
// Copyright (c) 2004 Andrew Hunter. All rights reserved.
//
#import <AppKit/AppKit.h>
#import "IFContextMatcher.h"
// Variation on NSTextView that supports line highlighting
// Highlight array contains entries of type NSArray
// Each entry contains (line, style) as NSNumbers
@interface IFSourceFileView : NSTextView {
IFContextMatcher* syntaxDictionary; // Context matcher used to implement a syntax dictionary
BOOL tornAtTop; // YES if we should draw a 'tear' at the top of the view
BOOL tornAtBottom; // YES if we should draw a 'tear' at the bottom of the view
NSRect lastUsedRect; // The last known 'used' rect (used to determine whether or not to update the bottom tear)
}
// Matching syntax
- (void) setSyntaxDictionaryMatcher: (IFContextMatcher*) matcher; // Context matcher that's used to implement a syntax dictionary
// Drawing 'tears' at the top and bottom
- (void) setTornAtTop: (BOOL) tornAtTop; // Sets whether or not a 'tear' should appear at the top of the view
- (void) setTornAtBottom: (BOOL) tornAtBottom; // Sets whether or not a 'tear' should appear at the bottom of the view
@end
@interface NSObject(IFSourceFileViewDelegate)
- (void) sourceFileShowPreviousSection: (id) sender; // User clicked on the top tear
- (void) sourceFileShowNextSection: (id) sender; // User clicked on the bottom tear
@end