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
33 BOOL shouldUpdateWindowSize
;
36 - (MMVimView
*)initWithFrame
:(NSRect
)frame vimController
:(MMVimController
*) c
;
38 - (MMTextView
*)textView
;
39 - (MMTextStorage
*)textStorage
;
40 - (NSMutableArray
*)scrollbars
;
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
;
76 @interface MMScroller
: NSScroller
{
81 - (id
)initWithIdentifier
:(long)ident type
:(int)type
;
85 - (void)setRange
:(NSRange
)newRange
;