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>
15 // These values are chosen so that the min text view size is not too small
16 // with the default font (they only affect resizing with the mouse, you can
17 // still use e.g. ":set lines=2" to go below these values).
23 @interface MMTextViewHelper
: NSObject
{
32 NSTrackingRectTag trackingRectTag
;
33 NSColor
*insertionPointColor
;
38 NSDictionary
*markedTextAttributes
;
39 NSMutableAttributedString
*markedText
;
44 - (void)setTextView
:(id
)view
;
45 - (void)setInsertionPointColor
:(NSColor
*)color
;
46 - (NSColor
*)insertionPointColor
;
48 - (void)keyDown
:(NSEvent
*)event
;
49 - (void)insertText
:(id
)string
;
50 - (void)doCommandBySelector
:(SEL
)selector
;
51 - (BOOL
)performKeyEquivalent
:(NSEvent
*)event
;
52 - (void)scrollWheel
:(NSEvent
*)event
;
53 - (void)mouseDown
:(NSEvent
*)event
;
54 - (void)mouseUp
:(NSEvent
*)event
;
55 - (void)mouseDragged
:(NSEvent
*)event
;
56 - (void)mouseMoved
:(NSEvent
*)event
;
57 - (void)mouseEntered
:(NSEvent
*)event
;
58 - (void)mouseExited
:(NSEvent
*)event
;
59 - (void)setFrame
:(NSRect
)frame
;
60 - (void)viewDidMoveToWindow
;
61 - (void)viewWillMoveToWindow
:(NSWindow
*)newWindow
;
62 - (BOOL
)performDragOperation
:(id
<NSDraggingInfo
>)sender
;
63 - (NSDragOperation
)draggingEntered
:(id
<NSDraggingInfo
>)sender
;
64 - (NSDragOperation
)draggingUpdated
:(id
<NSDraggingInfo
>)sender
;
65 - (void)setMouseShape
:(int)shape
;
68 - (BOOL
)hasMarkedText
;
69 - (NSRange
)markedRange
;
70 - (NSDictionary
*)markedTextAttributes
;
71 - (void)setMarkedTextAttributes
:(NSDictionary
*)attr
;
72 - (void)setMarkedText
:(id
)text selectedRange
:(NSRange
)range
;
74 - (NSMutableAttributedString
*)markedText
;
75 - (void)setPreEditRow
:(int)row column
:(int)col
;
78 - (void)setImRange
:(NSRange
)range
;
80 - (void)setMarkedRange
:(NSRange
)range
;
81 - (NSRect
)firstRectForCharacterRange
:(NSRange
)range
;