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.
12 #import <Cocoa/Cocoa.h>
16 // NSUserDefaults keys
17 extern NSString
*MMTabMinWidthKey
;
18 extern NSString
*MMTabMaxWidthKey
;
19 extern NSString
*MMTabOptimumWidthKey
;
20 extern NSString
*MMTextInsetLeftKey
;
21 extern NSString
*MMTextInsetRightKey
;
22 extern NSString
*MMTextInsetTopKey
;
23 extern NSString
*MMTextInsetBottomKey
;
24 extern NSString
*MMTerminateAfterLastWindowClosedKey
;
25 extern NSString
*MMTypesetterKey
;
26 extern NSString
*MMCellWidthMultiplierKey
;
27 extern NSString
*MMBaselineOffsetKey
;
28 extern NSString
*MMTranslateCtrlClickKey
;
29 extern NSString
*MMTopLeftPointKey
;
30 extern NSString
*MMOpenFilesInTabsKey
;
31 extern NSString
*MMNoFontSubstitutionKey
;
32 extern NSString
*MMLoginShellKey
;
33 extern NSString
*MMAtsuiRendererKey
;
34 extern NSString
*MMUntitledWindowKey
;
35 extern NSString
*MMTexturedWindowKey
;
36 extern NSString
*MMZoomBothKey
;
37 extern NSString
*MMCurrentPreferencePaneKey
;
38 extern NSString
*MMLoginShellCommandKey
;
39 extern NSString
*MMLoginShellArgumentKey
;
40 extern NSString
*MMDialogsTrackPwdKey
;
42 // Enum for MMUntitledWindowKey
44 MMUntitledWindowNever
= 0,
45 MMUntitledWindowOnOpen
= 1,
46 MMUntitledWindowOnReopen
= 2,
47 MMUntitledWindowAlways
= 3
53 @interface
NSIndexSet (MMExtras
)
54 + (id
)indexSetWithVimList
:(NSString
*)list
;
58 @interface
NSDocumentController (MMExtras
)
59 - (void)noteNewRecentFilePath
:(NSString
*)path
;
63 @interface
NSOpenPanel (MMExtras
)
64 - (void)hiddenFilesButtonToggled
:(id
)sender
;
65 - (void)setShowsHiddenFiles
:(BOOL
)show
;
69 @interface
NSMenu (MMExtras
)
70 - (int)indexOfItemWithAction
:(SEL
)action
;
71 - (NSMenuItem
*)itemWithAction
:(SEL
)action
;
72 - (NSMenu
*)findMenuContainingItemWithAction
:(SEL
)action
;
73 - (NSMenu
*)findWindowsMenu
;
74 - (NSMenu
*)findApplicationMenu
;
75 - (NSMenu
*)findServicesMenu
;
76 - (NSMenu
*)findFileMenu
;
80 @interface
NSToolbar (MMExtras
)
81 - (int)indexOfItemWithItemIdentifier
:(NSString
*)identifier
;
82 - (NSToolbarItem
*)itemAtIndex
:(int)idx
;
83 - (NSToolbarItem
*)itemWithItemIdentifier
:(NSString
*)identifier
;
87 @interface
NSTabView (MMExtras
)
88 - (void)removeAllTabViewItems
;
92 @interface
NSNumber (MMExtras
)
98 // Create a view to be used as accessory for open panel. This function assumes
99 // ownership of the view so do not release it.
100 NSView
*openPanelAccessoryView();
102 // Functions to create command strings that can be sent to Vim as input.
103 NSString
*buildTabDropCommand(NSArray
*filenames
);
104 NSString
*buildSelectRangeCommand(NSRange range
);
105 NSString
*buildSearchTextCommand(NSString
*searchText
);