Skip to content

Instantly share code, notes, and snippets.

@jlebrech
Created December 31, 2010 11:58
Show Gist options
  • Save jlebrech/760956 to your computer and use it in GitHub Desktop.
Save jlebrech/760956 to your computer and use it in GitHub Desktop.
@implementation AppController : CPObject
{
CPSplitView verticalSplitter;
CPSplitView horizontalSplitter;
CPArray projects;
ProjectsController projectsController;
ProjectsView projectsView;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask];
var contentView = [theWindow contentView];
verticalSplitter = [[CPSplitView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth([contentView bounds]), CGRectGetHeight([contentView bounds]))];
[verticalSplitter setDelegate:self];
[verticalSplitter setVertical:YES];
[verticalSplitter setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable ];
[contentView addSubview:verticalSplitter];
/*
*
* Projects Navigation
*
*/
var leftView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 250, CGRectGetHeight([verticalSplitter bounds]))];
[leftView setAutoresizingMask:CPViewHeightSizable ];
// search box
//
projectSearchField = [[CPSearchField alloc] initWithFrame:CGRectMake(0, 0, 250, 32)];
[projectSearchField setAutoresizingMask:CPViewMinXMargin | CPViewMinYMargin];
[leftView addSubview:projectSearchField];
// projects list
projectsView = [[ProjectsView alloc] initWithFrame:[leftView bounds]];
//[leftView addSubview:projectsView];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment