- name changes :menukeyequiv ==> :macmenukey
[MacVim/jjgod.git] / MMVimView.h
blobbe0066719283778440ed87717c638038ae724a4d
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>
15 @class PSMTabBarControl;
16 @class MMTextView;
17 @class MMTextStorage;
18 @class MMScroller;
19 @class MMVimController;
22 @interface MMVimView : NSView {
23 PSMTabBarControl *tabBarControl;
24 NSTabView *tabView;
26 MMVimController *vimController;
27 BOOL vimTaskSelectedTab;
28 MMTextView *textView;
29 MMTextStorage *textStorage;
30 NSMutableArray *scrollbars;
32 // This is temporary to make the refactoring easier
33 BOOL shouldUpdateWindowSize;
36 - (MMVimView *)initWithFrame:(NSRect)frame vimController:(MMVimController *) c;
38 - (MMTextView *)textView;
39 - (MMTextStorage *)textStorage;
40 - (NSMutableArray *)scrollbars;
41 - (BOOL)inLiveResize;
42 - (void)cleanup;
45 - (PSMTabBarControl *)tabBarControl;
46 - (NSTabView *)tabView;
47 - (IBAction)addNewTab:(id)sender;
48 - (void)updateTabsWithData:(NSData *)data;
49 - (void)selectTabWithIndex:(int)idx;
50 - (int)representedIndexOfTabViewItem:(NSTabViewItem *)tvi;
51 - (NSTabViewItem *)addNewTabViewItem;
53 - (BOOL)bottomScrollbarVisible;
54 - (BOOL)leftScrollbarVisible;
55 - (BOOL)rightScrollbarVisible;
56 - (void)placeScrollbars;
57 - (void)createScrollbarWithIdentifier:(long)ident type:(int)type;
58 - (void)destroyScrollbarWithIdentifier:(long)ident;
59 - (void)showScrollbarWithIdentifier:(long)ident state:(BOOL)visible;
60 - (void)setScrollbarThumbValue:(float)val proportion:(float)prop
61 identifier:(long)ident;
62 - (MMScroller *)scrollbarForIdentifier:(long)ident index:(unsigned *)idx;
64 - (void)setDefaultColorsBackground:(NSColor *)back foreground:(NSColor *)fore;
66 - (BOOL)shouldUpdateWindowSize;
67 - (NSRect)textViewRectForContentSize:(NSSize)contentSize;
68 - (void)setShouldUpdateWindowSize:(BOOL)b;
71 - (NSSize)contentSizeForTextStorageSize:(NSSize)textViewSize;
72 - (NSSize)textStorageSizeForTextViewSize:(NSSize)textViewSize;
73 @end
75 // TODO: Move!
76 @interface MMScroller : NSScroller {
77 long identifier;
78 int type;
79 NSRange range;
81 - (id)initWithIdentifier:(long)ident type:(int)type;
82 - (long)identifier;
83 - (int)type;
84 - (NSRange)range;
85 - (void)setRange:(NSRange)newRange;
86 @end