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
;
46 - (void)setTextView
:(id
)view
;
47 - (void)setInsertionPointColor
:(NSColor
*)color
;
48 - (NSColor
*)insertionPointColor
;
50 - (void)keyDown
:(NSEvent
*)event
;
51 - (void)insertText
:(id
)string
;
52 - (void)doCommandBySelector
:(SEL
)selector
;
53 - (BOOL
)performKeyEquivalent
:(NSEvent
*)event
;
54 - (void)scrollWheel
:(NSEvent
*)event
;
55 - (void)mouseDown
:(NSEvent
*)event
;
56 - (void)mouseUp
:(NSEvent
*)event
;
57 - (void)mouseDragged
:(NSEvent
*)event
;
58 - (void)mouseMoved
:(NSEvent
*)event
;
59 - (void)mouseEntered
:(NSEvent
*)event
;
60 - (void)mouseExited
:(NSEvent
*)event
;
61 - (void)setFrame
:(NSRect
)frame
;
62 - (void)viewDidMoveToWindow
;
63 - (void)viewWillMoveToWindow
:(NSWindow
*)newWindow
;
64 - (BOOL
)performDragOperation
:(id
<NSDraggingInfo
>)sender
;
65 - (NSDragOperation
)draggingEntered
:(id
<NSDraggingInfo
>)sender
;
66 - (NSDragOperation
)draggingUpdated
:(id
<NSDraggingInfo
>)sender
;
67 - (void)setMouseShape
:(int)shape
;
68 - (void)changeFont
:(id
)sender
;
71 - (BOOL
)hasMarkedText
;
72 - (NSRange
)markedRange
;
73 - (NSDictionary
*)markedTextAttributes
;
74 - (void)setMarkedTextAttributes
:(NSDictionary
*)attr
;
75 - (void)setMarkedText
:(id
)text selectedRange
:(NSRange
)range
;
77 - (NSMutableAttributedString
*)markedText
;
78 - (void)setPreEditRow
:(int)row column
:(int)col
;
81 - (void)setImRange
:(NSRange
)range
;
83 - (void)setMarkedRange
:(NSRange
)range
;
84 - (NSRect
)firstRectForCharacterRange
:(NSRange
)range
;
85 - (void)setImControl
:(BOOL
)enable
;