mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 05:27:03 +00:00
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
/*
|
|
* AppController.j
|
|
* __project.name__
|
|
*
|
|
* Created by __user.name__ on __project.date__.
|
|
* Copyright __project.year__, __organization.name__ All rights reserved.
|
|
*/
|
|
|
|
@import <Foundation/Foundation.j>
|
|
@import <AppKit/AppKit.j>
|
|
|
|
@implementation AppController : CPObject
|
|
{
|
|
}
|
|
|
|
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
|
{
|
|
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
|
|
contentView = [theWindow contentView];
|
|
|
|
var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
|
|
|
|
[label setStringValue:@"Hello World!"];
|
|
[label setFont:[CPFont boldSystemFontOfSize:24.0]];
|
|
|
|
[label sizeToFit];
|
|
|
|
[label setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin];
|
|
[label setCenter:[contentView center]];
|
|
|
|
[contentView addSubview:label];
|
|
|
|
[theWindow orderFront:self];
|
|
|
|
// Uncomment the following line to turn on the standard menu bar.
|
|
//[CPMenu setMenuBarVisible:YES];
|
|
}
|
|
|
|
@end
|