Fix "Special Characters" palette bug
[MacVim.git] / src / MacVim / MMTextViewHelper.h
blob5f56fb7b253f8029cb2f57e1ea2550845c6943ec
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;
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;
67 // Input Manager
68 - (BOOL)hasMarkedText;
69 - (NSRange)markedRange;
70 - (NSDictionary *)markedTextAttributes;
71 - (void)setMarkedTextAttributes:(NSDictionary *)attr;
72 - (void)setMarkedText:(id)text selectedRange:(NSRange)range;
73 - (void)unmarkText;
74 - (NSMutableAttributedString *)markedText;
75 - (void)setPreEditRow:(int)row column:(int)col;
76 - (int)preEditRow;
77 - (int)preEditColumn;
78 - (void)setImRange:(NSRange)range;
79 - (NSRange)imRange;
80 - (void)setMarkedRange:(NSRange)range;
81 - (NSRect)firstRectForCharacterRange:(NSRange)range;
83 @end