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
*MMTextInsetLeftKey
;
30 extern NSString
*MMTextInsetRightKey
;
31 extern NSString
*MMTextInsetTopKey
;
32 extern NSString
*MMTextInsetBottomKey
;
33 extern NSString
*MMTypesetterKey
;
34 extern NSString
*MMCellWidthMultiplierKey
;
35 extern NSString
*MMBaselineOffsetKey
;
36 extern NSString
*MMTranslateCtrlClickKey
;
37 extern NSString
*MMTopLeftPointKey
;
38 extern NSString
*MMOpenInCurrentWindowKey
;
39 extern NSString
*MMNoFontSubstitutionKey
;
40 extern NSString
*MMLoginShellKey
;
41 extern NSString
*MMAtsuiRendererKey
;
42 extern NSString
*MMUntitledWindowKey
;
43 extern NSString
*MMTexturedWindowKey
;
44 extern NSString
*MMZoomBothKey
;
45 extern NSString
*MMCurrentPreferencePaneKey
;
46 extern NSString
*MMLoginShellCommandKey
;
47 extern NSString
*MMLoginShellArgumentKey
;
48 extern NSString
*MMDialogsTrackPwdKey
;
49 #ifdef MM_ENABLE_PLUGINS
50 extern NSString
*MMShowLeftPlugInContainerKey
;
52 extern NSString
*MMOpenLayoutKey
;
53 extern NSString
*MMVerticalSplitKey
;
54 extern NSString
*MMPreloadCacheSizeKey
;
55 extern NSString
*MMLastWindowClosedBehaviorKey
;
56 extern NSString
*MMFakeEscModifierKey
;
57 extern NSString
*MMFakeEscTimeoutKey
;
58 extern NSString
*MMFakeEscOnKeyDownKey
;
61 // Enum for MMUntitledWindowKey
63 MMUntitledWindowNever
= 0,
64 MMUntitledWindowOnOpen
= 1,
65 MMUntitledWindowOnReopen
= 2,
66 MMUntitledWindowAlways
= 3
69 // Enum for MMOpenLayoutKey (first 4 must match WIN_* defines in main.c)
72 MMLayoutHorizontalSplit
= 1,
73 MMLayoutVerticalSplit
= 2,
78 // Enum for MMLastWindowClosedBehaviorKey
80 MMDoNothingWhenLastWindowClosed
= 0,
81 MMHideWhenLastWindowClosed
= 1,
82 MMTerminateWhenLastWindowClosed
= 2,
85 // Enum for MMFakeEscModifierKey
96 @interface
NSIndexSet (MMExtras
)
97 + (id
)indexSetWithVimList
:(NSString
*)list
;
101 @interface
NSDocumentController (MMExtras
)
102 - (void)noteNewRecentFilePath
:(NSString
*)path
;
103 - (void)noteNewRecentFilePaths
:(NSArray
*)paths
;
107 @interface
NSOpenPanel (MMExtras
)
108 - (void)hiddenFilesButtonToggled
:(id
)sender
;
109 - (void)setShowsHiddenFiles
:(BOOL
)show
;
113 @interface
NSMenu (MMExtras
)
114 - (int)indexOfItemWithAction
:(SEL
)action
;
115 - (NSMenuItem
*)itemWithAction
:(SEL
)action
;
116 - (NSMenu
*)findMenuContainingItemWithAction
:(SEL
)action
;
117 - (NSMenu
*)findWindowsMenu
;
118 - (NSMenu
*)findApplicationMenu
;
119 - (NSMenu
*)findServicesMenu
;
120 - (NSMenu
*)findFileMenu
;
124 @interface
NSToolbar (MMExtras
)
125 - (int)indexOfItemWithItemIdentifier
:(NSString
*)identifier
;
126 - (NSToolbarItem
*)itemAtIndex
:(int)idx
;
127 - (NSToolbarItem
*)itemWithItemIdentifier
:(NSString
*)identifier
;
131 @interface
NSTabView (MMExtras
)
132 - (void)removeAllTabViewItems
;
136 @interface
NSNumber (MMExtras
)
142 // Create a view to be used as accessory for open panel. This function assumes
143 // ownership of the view so do not release it.
144 NSView
*openPanelAccessoryView();