Annotation of chimera/MainController.mm, revision 1.3

1.3     ! macserv     1: /*
        !             2:  *  MainController.mm
        !             3:  */
1.1       hyatt       4: 
                      5: #import "MainController.h"
                      6: #import "BrowserWindowController.h"
                      7: 
                      8: @implementation MainController
                      9: 
                     10: -(void)awakeFromNib
                     11: {
1.3     ! macserv    12:   NSLog(@"MainController -awakeFromNib");
1.1       hyatt      13:   [self newWindow: nil];
                     14: }
                     15: 
                     16: -(IBAction)newWindow:(id)aSender
                     17: {
1.3     ! macserv    18:   [self openBrowserWindowWithURL:@"about:blank"];
1.1       hyatt      19: }
                     20: 
1.2       hyatt      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: 
1.1       hyatt      46: -(void)openBrowserWindowWithURL: (NSString*)aURL
                     47: {
1.3     ! macserv    48:        NSLog(@"Opening Browser with URL: %@", aURL);
        !            49:        BrowserWindowController* browser = [[BrowserWindowController alloc] initWithWindowNibName: @"BrowserWindow"];
        !            50: 
        !            51:        [browser loadURL: aURL];
        !            52:        [browser showWindow: self];
1.1       hyatt      53: }
                     54: 
                     55: @end

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