File:  [mozdev] / chimera / MainController.mm
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Wed Jan 30 04:52:38 2002 UTC (17 years, 8 months ago) by macserv
Branches: MAIN
CVS tags: HEAD
Chimera: Header comments modified for consistency

    1: /*
    2:  *  MainController.mm
    3:  */
    4: 
    5: #import "MainController.h"
    6: #import "BrowserWindowController.h"
    7: 
    8: @implementation MainController
    9: 
   10: -(void)awakeFromNib
   11: {
   12:   NSLog(@"MainController -awakeFromNib");
   13:   [self newWindow: nil];
   14: }
   15: 
   16: -(IBAction)newWindow:(id)aSender
   17: {
   18:   [self openBrowserWindowWithURL:@"about:blank"];
   19: }
   20: 
   21: -(IBAction) back:(id)aSender
   22: {
   23:     [[[mApplication keyWindow] windowController] back: aSender]; 
   24: }
   25: 
   26: -(IBAction) forward:(id)aSender
   27: {
   28:     [[[mApplication keyWindow] windowController] forward: aSender]; 
   29: }
   30: 
   31: -(IBAction) reload:(id)aSender
   32: {
   33:     [[[mApplication keyWindow] windowController] reload: aSender]; 
   34: }
   35: 
   36: -(IBAction) stop:(id)aSender
   37: {
   38:     [[[mApplication keyWindow] windowController] stop: aSender]; 
   39: }
   40: 
   41: -(IBAction) home:(id)aSender
   42: {
   43:     [[[mApplication keyWindow] windowController] home: aSender];
   44: }
   45: 
   46: -(void)openBrowserWindowWithURL: (NSString*)aURL
   47: {
   48: 	NSLog(@"Opening Browser with URL: %@", aURL);
   49: 	BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];
   50: 
   51: 	[browser loadURL: aURL];
   52: 	[browser showWindow: self];
   53: }
   54: 
   55: @end

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>