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 @
class PSMTabBarControl
;
19 @
class MMVimController
;
22 @interface MMVimView
: NSView
{
23 PSMTabBarControl
*tabBarControl
;
26 MMVimController
*vimController
;
27 BOOL vimTaskSelectedTab
;
29 MMTextStorage
*textStorage
;
30 NSMutableArray
*scrollbars
;
32 // This is temporary to make the refactoring easier (XXX)
33 BOOL shouldUpdateWindowSize
;
36 - (MMVimView
*)initWithFrame
:(NSRect
)frame vimController
:(MMVimController
*) c
;
38 - (MMTextView
*)textView
;
39 - (MMTextStorage
*)textStorage
;
40 - (NSMutableArray
*)scrollbars
;
44 - (NSSize
)desiredSizeForActualRowsAndColumns
;
45 - (NSSize
)getDesiredRows
:(int *)r columns
:(int *)c forSize
:(NSSize
)size
;
46 - (void)getActualRows
:(int *)r columns
:(int *)c
;
47 - (void)setActualRows
:(int)r columns
:(int)c
;
49 - (PSMTabBarControl
*)tabBarControl
;
50 - (IBAction
)addNewTab
:(id
)sender
;
51 - (void)updateTabsWithData
:(NSData
*)data
;
52 - (void)selectTabWithIndex
:(int)idx
;
53 - (NSTabViewItem
*)addNewTabViewItem
;
55 - (void)createScrollbarWithIdentifier
:(long)ident type
:(int)type
;
56 - (void)destroyScrollbarWithIdentifier
:(long)ident
;
57 - (void)showScrollbarWithIdentifier
:(long)ident state
:(BOOL
)visible
;
58 - (void)setScrollbarThumbValue
:(float)val proportion
:(float)prop
59 identifier
:(long)ident
;
60 - (void)setScrollbarPosition
:(int)pos length
:(int)len identifier
:(long)ident
;
62 - (void)setDefaultColorsBackground
:(NSColor
*)back foreground
:(NSColor
*)fore
;
64 - (BOOL
)shouldUpdateWindowSize
;
65 - (NSRect
)textViewRectForContentSize
:(NSSize
)contentSize
;
66 - (void)setShouldUpdateWindowSize
:(BOOL
)b
;
68 - (void)placeViews
; // XXX: this should probably not be public