Snapshot 37
[MacVim.git] / src / MacVim / MMTextView.h
blob2547f60857bc42c618eb17b57f213ae4fece593e
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 BOOL antialias;
23 NSRect *invertRects;
24 int numInvertRects;
26 MMTextViewHelper *helper;
29 - (id)initWithFrame:(NSRect)frame;
31 - (void)setPreEditRow:(int)row column:(int)col;
32 - (void)performBatchDrawWithData:(NSData *)data;
33 - (void)setMouseShape:(int)shape;
34 - (void)setAntialias:(BOOL)antialias;
37 // MMTextStorage methods
39 - (NSFont *)font;
40 - (void)setFont:(NSFont *)newFont;
41 - (NSFont *)fontWide;
42 - (void)setWideFont:(NSFont *)newFont;
43 - (NSSize)cellSize;
44 - (void)setLinespace:(float)newLinespace;
45 - (int)maxRows;
46 - (int)maxColumns;
47 - (void)getMaxRows:(int*)rows columns:(int*)cols;
48 - (void)setMaxRows:(int)rows columns:(int)cols;
49 - (NSRect)rectForRowsInRange:(NSRange)range;
50 - (NSRect)rectForColumnsInRange:(NSRange)range;
51 - (void)setDefaultColorsBackground:(NSColor *)bgColor
52 foreground:(NSColor *)fgColor;
53 - (NSColor *)defaultBackgroundColor;
54 - (NSColor *)defaultForegroundColor;
56 - (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
57 - (NSSize)desiredSize;
58 - (NSSize)minSize;
61 - (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
62 - (NSPoint)pointForRow:(int)row column:(int)col;
63 - (NSRect)rectForRow:(int)row column:(int)col numRows:(int)nr
64 numColumns:(int)nc;
66 @end