|
31 | 31 | BOOL antialias; |
32 | 32 | BOOL ligatures; |
33 | 33 | BOOL thinStrokes; |
34 | | - BOOL drawPending; |
35 | | - NSMutableArray *drawData; |
36 | 34 |
|
37 | 35 | MMTextViewHelper *helper; |
38 | 36 |
|
39 | | - unsigned maxlen; |
40 | | - CGGlyph *glyphs; |
41 | | - CGPoint *positions; |
42 | | - NSMutableArray *fontCache; |
43 | | - |
44 | | - // Issue draws onto an CGImage that caches the drawn results instead of |
45 | | - // directly in drawRect:. This is the default behavior in cases where simply |
46 | | - // drawing incrementally in drawRect: doesn't work. Those cases are: |
47 | | - // 1. Non-native fullscreen |
48 | | - // 2. 10.14+ (views are always layer-backed which means the view buffer will |
49 | | - // be cleared and we can't incrementally draw in drawRect:) |
50 | | - // |
51 | | - // This can be configured by setting MMBufferedDrawingKey in user defaults. |
52 | | - BOOL cgBufferDrawEnabled; |
53 | | - BOOL cgBufferDrawNeedsUpdateContext; |
54 | | - CGContextRef cgContext; |
| 37 | + NSMutableDictionary<NSNumber *, NSFont *> *fontVariants; |
| 38 | + NSMutableSet<NSString *> *characterStrings; |
| 39 | + NSMutableDictionary<NSNumber *,NSCache<NSString *,id> *> *characterLines; |
55 | 40 |
|
56 | | - // *Deprecated* |
57 | | - // Draw onto a CGLayer instead of lazily updating the view's buffer in |
58 | | - // drawRect: which is error-prone and relying on undocumented behaviors |
59 | | - // (that the OS will preserve the old buffer). |
60 | | - // |
61 | | - // This is deprecated. Use cgBufferDrawEnabled instead which is more |
62 | | - // efficient. |
63 | | - // |
64 | | - // This can be configured by setting MMUseCGLayerAlwaysKey in user defaults. |
65 | | - BOOL cgLayerEnabled; |
66 | | - CGLayerRef cgLayer; |
67 | | - CGContextRef cgLayerContext; |
68 | | - NSLock *cgLayerLock; |
69 | | - |
70 | 41 | // These are used in MMCoreTextView+ToolTip.m |
71 | 42 | id trackingRectOwner_; // (not retained) |
72 | 43 | void *trackingRectUserData_; |
|
113 | 84 | - (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column; |
114 | 85 | - (NSRect)rectForRow:(int)row column:(int)column numRows:(int)nr |
115 | 86 | numColumns:(int)nc; |
116 | | -- (void)setCGLayerEnabled:(BOOL)enabled; |
117 | | -- (BOOL)getCGLayerEnabled; |
118 | 87 |
|
119 | 88 | // |
120 | 89 | // NSTextView methods |
121 | 90 | // |
122 | | -- (void)setFrameSize:(NSSize)newSize; |
123 | 91 | - (void)keyDown:(NSEvent *)event; |
124 | 92 | - (void)insertText:(id)string; |
125 | 93 | - (void)doCommandBySelector:(SEL)selector; |
|
0 commit comments