Files
cappuccino/Tools/NibApp/AppController.j
T
2008-12-10 23:53:17 -08:00

29 lines
910 B
Plaintext

import <Foundation/CPObject.j>
import <AppKit/CPCib.j>
@implementation AppController : CPObject
{
CPWindow _window;
CPView _view;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
var cib = [[CPCib alloc] initWithContentsOfURL:@"MainMenu.cib"],
theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
[cib instantiateCibWithExternalNameTable:[CPDictionary dictionaryWithObject:self forKey:CPCibOwner]];
[_view setBackgroundColor:[CPColor colorWithCalibratedRed:0.7 green:0.77 blue:0.85 alpha:1.0]];
[contentView addSubview:_view];
[theWindow orderFront:self];
// HACK: shift the window down to accomodate for menubar
[theWindow setFrameOrigin:CGPointMake([theWindow frame].origin.x, [theWindow frame].origin.y + 29)];
}
@end