Add Vimball (vba) as supported filetype
[MacVim.git] / src / MacVim / MMTextViewHelper.h
blobd192acf50b196cd2304659ab47ba4fc2c21f88aa
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 {
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).
18 MMMinRows = 4,
19 MMMinColumns = 30
23 @interface MMTextViewHelper : NSObject {
24 id textView;
25 BOOL isDragging;
26 int dragRow;
27 int dragColumn;
28 int dragFlags;
29 NSPoint dragPoint;
30 BOOL isAutoscrolling;
31 int mouseShape;
32 NSTrackingRectTag trackingRectTag;
33 NSColor *insertionPointColor;
35 // Input Manager
36 NSRange imRange;
37 NSRange markedRange;
38 NSDictionary *markedTextAttributes;
39 NSMutableAttributedString *markedText;
40 int preEditRow;
41 int preEditColumn;
42 BOOL imControl;
43 BOOL imState;
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;
70 // Input Manager
71 - (BOOL)hasMarkedText;
72 - (NSRange)markedRange;
73 - (NSDictionary *)markedTextAttributes;
74 - (void)setMarkedTextAttributes:(NSDictionary *)attr;
75 - (void)setMarkedText:(id)text selectedRange:(NSRange)range;
76 - (void)unmarkText;
77 - (NSMutableAttributedString *)markedText;
78 - (void)setPreEditRow:(int)row column:(int)col;
79 - (int)preEditRow;
80 - (int)preEditColumn;
81 - (void)setImRange:(NSRange)range;
82 - (NSRange)imRange;
83 - (void)setMarkedRange:(NSRange)range;
84 - (NSRect)firstRectForCharacterRange:(NSRange)range;
85 - (void)setImControl:(BOOL)enable;
87 @end