Skip to content

Instantly share code, notes, and snippets.

@nickjs
Created September 22, 2008 20:55
Show Gist options
  • Save nickjs/12158 to your computer and use it in GitHub Desktop.
Save nickjs/12158 to your computer and use it in GitHub Desktop.
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