Created
September 22, 2008 20:55
-
-
Save nickjs/12158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var LEDefaultContentWindow | |
@implementation LEContentWindow : CPWindowController | |
{ | |
LEButtonTabs tabSet; | |
} | |
+ (LEContentWindow)defaultWindow | |
{ | |
if(!LEDefaultContentWindow) | |
LEDefaultContentWindow = [[LEContentWindow alloc] init]; | |
return LEDefaultContentWindow; | |
} | |
- (LEContentWindow)init | |
{ | |
var theWindow = [[CPPanel alloc] initWithContentRect:CGRectMake(0,0,400,400) styleMask:CPClosableWindowMask | CPHUDBackgroundWindowMask]; | |
if(theWindow){ | |
self = [super initWithWindow:theWindow]; | |
[theWindow setFloatingPanel:YES]; | |
[theWindow setTitle:"Content"]; | |
var bounds = [[theWindow contentView] bounds]; | |
} | |
if(self){ | |
tabSet = [[LEButtonTabs alloc] initWithFrame:CGRectMake(0,0,CGRectGetWidth(bounds),CGRectGetHeight(bounds))]; | |
[[theWindow contentView] addSubview:tabSet]; | |
[tabSet addItemsWithTitles:['One']] | |
[self showWindow:self]; | |
} | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment