Dialogs are always displayed in the default run loop mode
[MacVim.git] / src / MacVim / MMAtsuiTextView.h
blob48c976a1b8ca96aa80595198ea3f9378ca5c6f0f
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 NSTextView
27 NSSize insetSize;
29 // From vim-cocoa
30 NSImage *contentImage;
31 NSSize imageSize;
32 ATSUStyle atsuStyles[MMMaxCellsPerChar];
33 BOOL antialias;
36 - (id)initWithFrame:(NSRect)frame;
39 // MMTextStorage methods
41 - (void)getMaxRows:(int*)rows columns:(int*)cols;
42 - (void)setMaxRows:(int)rows columns:(int)cols;
43 - (void)setDefaultColorsBackground:(NSColor *)bgColor
44 foreground:(NSColor *)fgColor;
45 - (NSRect)rectForRowsInRange:(NSRange)range;
46 - (NSRect)rectForColumnsInRange:(NSRange)range;
48 - (void)setFont:(NSFont *)newFont;
49 - (void)setWideFont:(NSFont *)newFont;
50 - (NSFont *)font;
51 - (NSSize)cellSize;
52 - (void)setLinespace:(float)newLinespace;
55 // MMTextView methods
57 - (void)setShouldDrawInsertionPoint:(BOOL)on;
58 - (void)setPreEditRow:(int)row column:(int)col;
59 - (void)hideMarkedTextField;
60 - (void)setMouseShape:(int)shape;
61 - (void)setAntialias:(BOOL)state;
64 // NSTextView methods
66 - (void)keyDown:(NSEvent *)event;
67 - (void)insertText:(id)string;
68 - (void)doCommandBySelector:(SEL)selector;
69 - (BOOL)performKeyEquivalent:(NSEvent *)event;
72 // NSTextContainer methods
74 - (void)setTextContainerInset:(NSSize)inset;
77 // MMAtsuiTextView methods
79 - (void)performBatchDrawWithData:(NSData *)data;
80 - (NSSize)desiredSize;
81 - (NSSize)minSize;
82 - (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
84 @end