Open and save dialogs track the Vim pwd
[MacVim.git] / src / MacVim / MMVimController.h
blob74ef10691ad86d9f013a528a9cdcaba4abf6c615
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 */
11 #import <Cocoa/Cocoa.h>
12 #import "MacVim.h"
15 // If sendMessage: fails, store the message and resend after a delay.
16 #define MM_RESEND_LAST_FAILURE 0
19 @class MMWindowController;
23 @interface MMVimController : NSObject <MMFrontendProtocol>
25 BOOL isInitialized;
26 MMWindowController *windowController;
27 id backendProxy;
28 BOOL inProcessCommandQueue;
29 NSMutableArray *sendQueue;
30 NSMutableArray *mainMenuItems;
31 NSMutableArray *popupMenuItems;
32 BOOL shouldUpdateMainMenu;
33 NSToolbar *toolbar;
34 NSMutableDictionary *toolbarItemDict;
35 int pid;
36 NSString *serverName;
37 #ifdef MM_RESEND_LAST_FAILURE
38 NSTimer *resendTimer;
39 int resendMsgid;
40 NSData *resendData;
41 #endif
42 NSMenu *lastMenuSearched;
43 NSMenuItem *recentFilesMenuItem;
44 NSMenuItem *recentFilesDummy;
45 NSDictionary *vimState;
48 - (id)initWithBackend:(id)backend pid:(int)processIdentifier
49 recentFiles:(NSMenuItem*)menu;
50 - (id)backendProxy;
51 - (int)pid;
52 - (void)setServerName:(NSString *)name;
53 - (NSString *)serverName;
54 - (MMWindowController *)windowController;
55 - (NSDictionary *)vimState;
56 - (void)cleanup;
57 - (void)dropFiles:(NSArray *)filenames forceOpen:(BOOL)force;
58 - (void)dropString:(NSString *)string;
59 - (void)odbEdit:(NSArray *)filenames server:(OSType)theID path:(NSString *)path
60 token:(NSAppleEventDescriptor *)token;
61 - (void)sendMessage:(int)msgid data:(NSData *)data;
62 - (BOOL)sendMessageNow:(int)msgid data:(NSData *)data
63 timeout:(NSTimeInterval)timeout;
64 - (void)addVimInput:(NSString *)string;
65 - (NSString *)evaluateVimExpression:(NSString *)expr;
66 - (void)updateMainMenu;
67 @end