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.
11 #import <Cocoa/Cocoa.h>
12 #import "Miscellaneous.h" // Defines MM_ENABLE_ATSUI
16 @
class MMTextViewHelper
;
19 @interface MMCoreTextView
: NSView
<NSTextInput
> {
21 int maxRows
, maxColumns
;
22 NSColor
*defaultBackgroundColor
;
23 NSColor
*defaultForegroundColor
;
34 NSMutableArray
*drawData
;
36 MMTextViewHelper
*helper
;
43 - (id
)initWithFrame
:(NSRect
)frame
;
46 // MMTextStorage methods
50 - (void)getMaxRows
:(int*)rows columns
:(int*)cols
;
51 - (void)setMaxRows
:(int)rows columns
:(int)cols
;
52 - (void)setDefaultColorsBackground
:(NSColor
*)bgColor
53 foreground
:(NSColor
*)fgColor
;
54 - (NSColor
*)defaultBackgroundColor
;
55 - (NSColor
*)defaultForegroundColor
;
56 - (NSRect
)rectForRowsInRange
:(NSRange
)range
;
57 - (NSRect
)rectForColumnsInRange
:(NSRange
)range
;
59 - (void)setFont
:(NSFont
*)newFont
;
60 - (void)setWideFont
:(NSFont
*)newFont
;
64 - (void)setLinespace
:(float)newLinespace
;
69 - (void)setShouldDrawInsertionPoint
:(BOOL
)on
;
70 - (void)setPreEditRow
:(int)row column
:(int)col
;
71 - (void)setMouseShape
:(int)shape
;
72 - (void)setAntialias
:(BOOL
)state
;
73 - (void)setImControl
:(BOOL
)enable
;
74 - (void)activateIm
:(BOOL
)enable
;
75 - (BOOL
)convertPoint
:(NSPoint
)point toRow
:(int *)row column
:(int *)column
;
80 - (void)keyDown
:(NSEvent
*)event
;
81 - (void)insertText
:(id
)string
;
82 - (void)doCommandBySelector
:(SEL
)selector
;
83 - (BOOL
)performKeyEquivalent
:(NSEvent
*)event
;
86 // NSTextContainer methods
88 - (void)setTextContainerInset
:(NSSize
)inset
;
91 // MMCoreTextView methods
93 - (void)performBatchDrawWithData
:(NSData
*)data
;
94 - (NSSize
)desiredSize
;
96 - (NSSize
)constrainRows
:(int *)rows columns
:(int *)cols toSize
:(NSSize
)size
;
100 #endif // !MM_ENABLE_ATSUI