Dialogs are always displayed in the default run loop mode
[MacVim.git] / src / MacVim / Miscellaneous.h
blobc90223eb142d84eb814ea1e8e2f0bce2894eed4f
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.
9 */
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
43 enum {
44 MMUntitledWindowNever = 0,
45 MMUntitledWindowOnOpen = 1,
46 MMUntitledWindowOnReopen = 2,
47 MMUntitledWindowAlways = 3
53 @interface NSIndexSet (MMExtras)
54 + (id)indexSetWithVimList:(NSString *)list;
55 @end
58 @interface NSDocumentController (MMExtras)
59 - (void)noteNewRecentFilePath:(NSString *)path;
60 @end
63 @interface NSOpenPanel (MMExtras)
64 - (void)hiddenFilesButtonToggled:(id)sender;
65 - (void)setShowsHiddenFiles:(BOOL)show;
66 @end
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;
77 @end
80 @interface NSToolbar (MMExtras)
81 - (int)indexOfItemWithItemIdentifier:(NSString *)identifier;
82 - (NSToolbarItem *)itemAtIndex:(int)idx;
83 - (NSToolbarItem *)itemWithItemIdentifier:(NSString *)identifier;
84 @end
87 @interface NSTabView (MMExtras)
88 - (void)removeAllTabViewItems;
89 @end
93 // Create a view to be used as accessory for open panel. This function assumes
94 // ownership of the view so do not release it.
95 NSView *openPanelAccessoryView();
97 // Functions to create command strings that can be sent to Vim as input.
98 NSString *buildTabDropCommand(NSArray *filenames);
99 NSString *buildSelectRangeCommand(NSRange range);
100 NSString *buildSearchTextCommand(NSString *searchText);