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>
15 #define MM_LOG_DEALLOCATIONS 0
18 #if MM_LOG_DEALLOCATIONS
19 # define LOG_DEALLOC NSLog(@"%s %@", _cmd, [self className]);
25 // NSUserDefaults keys
26 extern NSString
*MMTabMinWidthKey
;
27 extern NSString
*MMTabMaxWidthKey
;
28 extern NSString
*MMTabOptimumWidthKey
;
29 extern NSString
*MMShowAddTabButtonKey
;
30 extern NSString
*MMTextInsetLeftKey
;
31 extern NSString
*MMTextInsetRightKey
;
32 extern NSString
*MMTextInsetTopKey
;
33 extern NSString
*MMTextInsetBottomKey
;
34 extern NSString
*MMTypesetterKey
;
35 extern NSString
*MMCellWidthMultiplierKey
;
36 extern NSString
*MMBaselineOffsetKey
;
37 extern NSString
*MMTranslateCtrlClickKey
;
38 extern NSString
*MMTopLeftPointKey
;
39 extern NSString
*MMOpenInCurrentWindowKey
;
40 extern NSString
*MMNoFontSubstitutionKey
;
41 extern NSString
*MMLoginShellKey
;
42 extern NSString
*MMAtsuiRendererKey
;
43 extern NSString
*MMUntitledWindowKey
;
44 extern NSString
*MMTexturedWindowKey
;
45 extern NSString
*MMZoomBothKey
;
46 extern NSString
*MMCurrentPreferencePaneKey
;
47 extern NSString
*MMLoginShellCommandKey
;
48 extern NSString
*MMLoginShellArgumentKey
;
49 extern NSString
*MMDialogsTrackPwdKey
;
50 #ifdef MM_ENABLE_PLUGINS
51 extern NSString
*MMShowLeftPlugInContainerKey
;
53 extern NSString
*MMOpenLayoutKey
;
54 extern NSString
*MMVerticalSplitKey
;
55 extern NSString
*MMPreloadCacheSizeKey
;
56 extern NSString
*MMLastWindowClosedBehaviorKey
;
57 extern NSString
*MMLoadDefaultFontKey
;
60 // Enum for MMUntitledWindowKey
62 MMUntitledWindowNever
= 0,
63 MMUntitledWindowOnOpen
= 1,
64 MMUntitledWindowOnReopen
= 2,
65 MMUntitledWindowAlways
= 3
68 // Enum for MMOpenLayoutKey (first 4 must match WIN_* defines in main.c)
71 MMLayoutHorizontalSplit
= 1,
72 MMLayoutVerticalSplit
= 2,
77 // Enum for MMLastWindowClosedBehaviorKey
79 MMDoNothingWhenLastWindowClosed
= 0,
80 MMHideWhenLastWindowClosed
= 1,
81 MMTerminateWhenLastWindowClosed
= 2,
87 @interface
NSIndexSet (MMExtras
)
88 + (id
)indexSetWithVimList
:(NSString
*)list
;
92 @interface
NSDocumentController (MMExtras
)
93 - (void)noteNewRecentFilePath
:(NSString
*)path
;
94 - (void)noteNewRecentFilePaths
:(NSArray
*)paths
;
98 @interface
NSOpenPanel (MMExtras
)
99 - (void)hiddenFilesButtonToggled
:(id
)sender
;
100 - (void)setShowsHiddenFiles
:(BOOL
)show
;
104 @interface
NSMenu (MMExtras
)
105 - (int)indexOfItemWithAction
:(SEL
)action
;
106 - (NSMenuItem
*)itemWithAction
:(SEL
)action
;
107 - (NSMenu
*)findMenuContainingItemWithAction
:(SEL
)action
;
108 - (NSMenu
*)findWindowsMenu
;
109 - (NSMenu
*)findApplicationMenu
;
110 - (NSMenu
*)findServicesMenu
;
111 - (NSMenu
*)findFileMenu
;
115 @interface
NSToolbar (MMExtras
)
116 - (int)indexOfItemWithItemIdentifier
:(NSString
*)identifier
;
117 - (NSToolbarItem
*)itemAtIndex
:(int)idx
;
118 - (NSToolbarItem
*)itemWithItemIdentifier
:(NSString
*)identifier
;
122 @interface
NSTabView (MMExtras
)
123 - (void)removeAllTabViewItems
;
127 @interface
NSNumber (MMExtras
)
133 // Create a view to be used as accessory for open panel. This function assumes
134 // ownership of the view so do not release it.
135 NSView
*openPanelAccessoryView();