Fix problems with 'fullscreen' and :mksession
[MacVim.git] / src / MacVim / MMAtsuiTextView.h
blobae176e95c71dcd7c7d4372ff521aed862b7de6ac
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 };
16 @class MMTextViewHelper;
19 @interface MMAtsuiTextView : NSView {
20 // From MMTextStorage
21 int maxRows, maxColumns;
22 NSColor *defaultBackgroundColor;
23 NSColor *defaultForegroundColor;
24 NSSize cellSize;
25 NSFont *font;
26 float linespace;
27 float ascender;
29 // From NSTextView
30 NSSize insetSize;
32 // From vim-cocoa
33 NSImage *contentImage;
34 NSSize imageSize;
35 ATSUStyle atsuStyles[MMMaxCellsPerChar];
36 BOOL antialias;
38 MMTextViewHelper *helper;
41 - (id)initWithFrame:(NSRect)frame;
44 // MMTextStorage methods
46 - (int)maxRows;
47 - (void)getMaxRows:(int*)rows columns:(int*)cols;
48 - (void)setMaxRows:(int)rows columns:(int)cols;
49 - (void)setDefaultColorsBackground:(NSColor *)bgColor
50 foreground:(NSColor *)fgColor;
51 - (NSRect)rectForRowsInRange:(NSRange)range;
52 - (NSRect)rectForColumnsInRange:(NSRange)range;
54 - (void)setFont:(NSFont *)newFont;
55 - (void)setWideFont:(NSFont *)newFont;
56 - (NSFont *)font;
57 - (NSSize)cellSize;
58 - (void)setLinespace:(float)newLinespace;
61 // MMTextView methods
63 - (void)setShouldDrawInsertionPoint:(BOOL)on;
64 - (void)setPreEditRow:(int)row column:(int)col;
65 - (void)hideMarkedTextField;
66 - (void)setMouseShape:(int)shape;
67 - (void)setAntialias:(BOOL)state;
68 - (BOOL)convertPoint:(NSPoint)point toRow:(int *)row column:(int *)column;
71 // NSTextView methods
73 - (void)keyDown:(NSEvent *)event;
74 - (void)insertText:(id)string;
75 - (void)doCommandBySelector:(SEL)selector;
76 - (BOOL)performKeyEquivalent:(NSEvent *)event;
79 // NSTextContainer methods
81 - (void)setTextContainerInset:(NSSize)inset;
84 // MMAtsuiTextView methods
86 - (void)performBatchDrawWithData:(NSData *)data;
87 - (NSSize)desiredSize;
88 - (NSSize)minSize;
89 - (NSSize)constrainRows:(int *)rows columns:(int *)cols toSize:(NSSize)size;
91 @end