mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 21:47:04 +00:00
29 lines
910 B
Plaintext
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 |