![]() ![]() | ![]() |
Last checkin for the night. This makes tabs fully usable. What's left: Menu item validation code. This will cover all menu items, but most importantly, it will switch the key shortcut for Close Window between cmd+w and shift+cmd+w and Close Tab between blank and cmd+w.
1: /* 2: * Chimera.app 3: * Cocoa application which embeds Gecko 4: * 5: * MainController.h 6: * --------------------------------------------------- 7: * The primary NSObject subclass which handles menuItems, app delegation, 8: * etc. 9: * 10: * Code owners: 11: * David Hyatt <hyatt@netscape.com> 12: * Matt Judy <matt@nibfile.com> 13: * 14: * Copyright (c) 2002 Mozilla.org. All rights reserved. 15: */ 16: 17: #import <Cocoa/Cocoa.h> 18: #import "BrowserWindowController.h" 19: #import "MVPreferencesController.h" 20: 21: class BookmarksService; 22: 23: @interface MainController : NSObject 24: { 25: IBOutlet id mApplication; 26: 27: // The following two items are used by the filter list when saving files. 28: IBOutlet id mFilterView; 29: IBOutlet id mFilterList; 30: 31: IBOutlet id mOfflineMenuItem; 32: 33: // The bookmarks menu. 34: IBOutlet id mBookmarksMenu; 35: 36: BOOL mOffline; 37: 38: BookmarksService* mMenuBookmarks; 39: 40: MVPreferencesController *preferencesController; 41: } 42: 43: -(void)dealloc; 44: 45: // File menu actions. 46: -(IBAction) newWindow:(id)aSender; 47: -(IBAction) openFile:(id)aSender; 48: -(IBAction) openLocation:(id)aSender; 49: -(IBAction) savePage:(id)aSender; 50: -(IBAction) printPreview:(id)aSender; 51: -(IBAction) printPage:(id)aSender; 52: -(IBAction) toggleOfflineMode:(id)aSender; 53: 54: // Edit menu actions. 55: -(IBAction) findInPage:(id)aSender; 56: -(IBAction) findAgain:(id)aSender; 57: 58: // Go menu actions. 59: -(IBAction) goBack:(id)aSender; 60: -(IBAction) goForward:(id)aSender; 61: -(IBAction) goHome:(id)aSender; 62: -(IBAction) previousTab:(id)aSender; 63: -(IBAction) nextTab:(id)aSender; 64: 65: // View menu actions. 66: -(IBAction) doReload:(id)aSender; 67: -(IBAction) doStop:(id)aSender; 68: 69: // Bookmarks menu actions. 70: -(IBAction) addBookmark:(id)aSender; 71: -(IBAction) openMenuBookmark:(id)aSender; 72: 73: //Window menu actions 74: -(IBAction) newTab:(id)aSender; 75: -(IBAction) closeTab:(id)aSender; 76: 77: 78: -(BrowserWindowController*)openBrowserWindowWithURLString: (NSString*)aURL; 79: -(BrowserWindowController*)openBrowserWindowWithURL: (NSURL*)aURL; 80: 81: - (MVPreferencesController *)preferencesController; 82: - (void)displayPreferencesWindow:sender; 83: 84: @end