File->Close sends performClose:
[MacVim.git] / src / MacVim / MMAtsuiTextView.h
blob9f7e88dc1a70b942be14f7482916f5561bd7bf9c
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 enum { MMMaxCellsPerChar = 2 };
17 @interface MMAtsuiTextView : NSView {
18 // From MMTextStorage
19 int maxRows, maxColumns;
20 NSColor *defaultBackgroundColor;
21 NSColor *defaultForegroundColor;
22 NSSize cellSize;
23 NSFont *font;
24 float linespace;
26 // From vim-cocoa
27 NSImage *contentImage;
28 NSSize imageSize;
29 ATSUStyle atsuStyles[MMMaxCellsPerChar];
32 - (id)initWithFrame:(NSRect)frame;
35 // MMTextStorage methods
37 - (void)getMaxRows:(int*)rows columns:(int*)cols;
38 - (void)setMaxRows:(int)rows columns:(int)cols;
39 - (void)setDefaultColorsBackground:(NSColor *)bgColor
40 foreground:(NSColor *)fgColor;
41 - (NSRect)rectForRowsInRange:(NSRange)range;
42 - (NSRect)rectForColumnsInRange:(NSRange)range;
44 - (void)setFont:(NSFont *)newFont;
45 - (void)setWideFont:(NSFont *)newFont;
46 - (NSFont *)font;
47 - (NSSize)cellSize;
48 - (void)setLinespace:(float)newLinespace;
51 // MMTextView methods
53 - (NSEvent *)lastMouseDownEvent;
54 - (void)setShouldDrawInsertionPoint:(BOOL)on;
55 - (void)setPreEditRow:(int)row column:(int)col;
56 - (void)hideMarkedTextField;
59 // NSTextView methods
61 - (void)keyDown:(NSEvent *)event;
62 - (void)insertText:(id)string;
63 - (void)doCommandBySelector:(SEL)selector;
64 - (BOOL)performKeyEquivalent:(NSEvent *)event;
67 // MMAtsuiTextView methods
69 - (void)performBatchDrawWithData:(NSData *)data;
70 - (NSSize)desiredSize;
71 - (NSSize)minSize;
72 - (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
74 @end