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 (16 years, 10 months ago) by macserv
Branches: MAIN
CVS tags: HEAD
Chimera: Header comments modified for consistency

/*
 *  MainController.mm
 */

#import "MainController.h"
#import "BrowserWindowController.h"

@implementation MainController

-(void)awakeFromNib
{
  NSLog(@"MainController -awakeFromNib");
  [self newWindow: nil];
}

-(IBAction)newWindow:(id)aSender
{
  [self openBrowserWindowWithURL:@"about:blank"];
}

-(IBAction) back:(id)aSender
{
    [[[mApplication keyWindow] windowController] back: aSender]; 
}

-(IBAction) forward:(id)aSender
{
    [[[mApplication keyWindow] windowController] forward: aSender]; 
}

-(IBAction) reload:(id)aSender
{
    [[[mApplication keyWindow] windowController] reload: aSender]; 
}

-(IBAction) stop:(id)aSender
{
    [[[mApplication keyWindow] windowController] stop: aSender]; 
}

-(IBAction) home:(id)aSender
{
    [[[mApplication keyWindow] windowController] home: aSender];
}

-(void)openBrowserWindowWithURL: (NSString*)aURL
{
	NSLog(@"Opening Browser with URL: %@", aURL);
	BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];

	[browser loadURL: aURL];
	[browser showWindow: self];
}

@end

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