Remove duplicate code in text renderers
[MacVim.git] / src / MacVim / MMTextView.h
blob250f1f9e1b7cd86b5fafe1586646a388c8b42a7b
1 /* vi:set ts=8 sts=4 sw=4 ft=objc:
3 * VIM - Vi IMproved by Bram Moolenaar
4 * MacVim GUI port by Bjorn Winckler
6 * Do ":help uganda" in Vim to read copying and usage conditions.
7 * Do ":help credits" in Vim to see a list of people who contributed.
8 * See README.txt for an overview of the Vim source code.
9 */
11 #import <Cocoa/Cocoa.h>
13 @class MMTextViewHelper;
16 @interface MMTextView : NSTextView {
17 BOOL shouldDrawInsertionPoint;
18 int insertionPointRow;
19 int insertionPointColumn;
20 int insertionPointShape;
21 int insertionPointFraction;
22 NSRange imRange;
23 NSRange markedRange;
24 NSDictionary *markedTextAttributes;
25 NSMutableAttributedString *markedText;
26 int preEditRow;
27 int preEditColumn;
28 BOOL antialias;
29 NSRect *invertRects;
30 int numInvertRects;
32 MMTextViewHelper *helper;
35 - (id)initWithFrame:(NSRect)frame;
37 - (void)setShouldDrawInsertionPoint:(BOOL)on;
38 - (void)setPreEditRow:(int)row column:(int)col;
39 - (void)performBatchDrawWithData:(NSData *)data;
40 - (void)setMouseShape:(int)shape;
41 - (void)setAntialias:(BOOL)antialias;
44 // MMTextStorage methods
46 - (NSFont *)font;
47 - (void)setFont:(NSFont *)newFont;
48 - (void)setWideFont:(NSFont *)newFont;
49 - (NSSize)cellSize;
50 - (void)setLinespace:(float)newLinespace;
51 - (int)maxRows;
52 - (void)getMaxRows:(int*)rows columns:(int*)cols;
53 - (void)setMaxRows:(int)rows columns:(int)cols;
54 - (NSRect)rectForRowsInRange:(NSRange)range;
55 - (NSRect)rectForColumnsInRange:(NSRange)range;
56 - (void)setDefaultColorsBackground:(NSColor *)bgColor
57 foreground:(NSColor *)fgColor;
59 - (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
60 - (NSSize)desiredSize;
61 - (NSSize)minSize;
64 - (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
66 @end