63dea584d8cd6f2573f91db935b6c5d41cbe8912
[MacVim.git] / src / MacVim / MMTextView.h
blob63dea584d8cd6f2573f91db935b6c5d41cbe8912
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>
14 @interface MMTextView : NSTextView {
15 BOOL shouldDrawInsertionPoint;
16 NSTrackingRectTag trackingRectTag;
17 BOOL isDragging;
18 BOOL isAutoscrolling;
19 int dragRow;
20 int dragColumn;
21 int dragFlags;
22 NSPoint dragPoint;
23 int insertionPointRow;
24 int insertionPointColumn;
25 int insertionPointShape;
26 int insertionPointFraction;
27 NSRange imRange;
28 NSRange markedRange;
29 NSDictionary *markedTextAttributes;
30 NSMutableAttributedString *markedText;
31 int preEditRow;
32 int preEditColumn;
33 int mouseShape;
34 BOOL antialias;
35 NSRect *invertRects;
36 int numInvertRects;
39 - (id)initWithFrame:(NSRect)frame;
41 - (void)setShouldDrawInsertionPoint:(BOOL)on;
42 - (void)setPreEditRow:(int)row column:(int)col;
43 - (void)performBatchDrawWithData:(NSData *)data;
44 - (void)setMouseShape:(int)shape;
45 - (void)setAntialias:(BOOL)antialias;
48 // MMTextStorage methods
50 - (NSFont *)font;
51 - (void)setFont:(NSFont *)newFont;
52 - (void)setWideFont:(NSFont *)newFont;
53 - (NSSize)cellSize;
54 - (void)setLinespace:(float)newLinespace;
55 - (void)getMaxRows:(int*)rows columns:(int*)cols;
56 - (void)setMaxRows:(int)rows columns:(int)cols;
57 - (NSRect)rectForRowsInRange:(NSRange)range;
58 - (NSRect)rectForColumnsInRange:(NSRange)range;
59 - (void)setDefaultColorsBackground:(NSColor *)bgColor
60 foreground:(NSColor *)fgColor;
62 - (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
63 - (NSSize)desiredSize;
64 - (NSSize)minSize;
66 @end