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
widgetsCollection = [[CPCollectionView alloc] initWithFrame:bounds]; | |
[widgetsCollection setMinItemSize:CGSizeMake(100, 100)]; | |
[widgetsCollection setMaxItemSize:CGSizeMake(100, 100)]; | |
[widgetsCollection setAutoresizingMask:CPViewWidthSizable]; | |
[widgetsCollection setDelegate:self]; | |
var itemPrototype = [[CPCollectionViewItem alloc] init]; | |
[itemPrototype setView:[[WidgetView alloc] initWithFrame:CGRectMakeZero()]]; |
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
for (i = 0; i < [[self subviews] count]; i++) { | |
[[self subviews][i] removeFromSuperview]; | |
} |
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
[screensCollectionView reloadContent]; | |
var screenName = [[[screensCollectionView items][0] view] screenName]; | |
[screenName setEditable:YES]; | |
[screenName setBackgroundColor:[CPColor whiteColor]]; | |
[[screenName window] makeFirstResponder:screenName]; | |
[screenName selectText:self]; |
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 newScreen = [[ScreenService sharedScreenService] addScreenWithName:"New Screen"]; | |
[screensCollectionView reloadContent]; | |
var index = [[[ScreenService sharedScreenService] screens] count] - 1; | |
var screenName = [[[screensCollectionView items][index] view] screenName]; | |
[screenName setEditable:YES]; | |
[screenName setBackgroundColor:[CPColor whiteColor]]; | |
[[screenName window] makeFirstResponder:screenName]; | |
[screenName selectText:self]; | |
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
{ | |
"sources" : [ | |
{ | |
"type" : "git", | |
"path" : "git://github.com/280north/cappuccino.git", | |
"parts" : [ | |
{ | |
"src" : "Objective-J", | |
"dst" : "Frameworks/Objective-J", | |
"copyFrom" : "Release/Objective-J" |
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
/* | |
* AppController.j | |
* | |
* Created by __Me__ on __Date__. | |
* Copyright 2008 __MyCompanyName__. All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> | |
@import <AppKit/CPView.j> |
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
/* | |
* AppController.j | |
* | |
* Created by __Me__ on __Date__. | |
* Copyright 2008 __MyCompanyName__. All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> | |
@import <AppKit/CPView.j> |
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
// Attempt at a themeable CPTextView | |
@import <AppKit/CPView.j> | |
@import <AppKit/CPTextField.j> | |
// Code extended from code at http://gist.github.com/9848 | |
@implementation CPTextView : CPControl | |
{ | |
DOMElement FIXME_textArea; |
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
@import <AppKit/CPView.j> | |
// Code extended from code at http://gist.github.com/9848 | |
@implementation CPTextView : CPView | |
{ | |
DOMElement FIXME_textArea; | |
id _delegate; | |
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
- (EditableUIView)parentEditableUIView | |
{ | |
var parentView = [self superview]; | |
while ([parentView class] != [EditableUIView class]) | |
superview = [parentView superview]; | |
return superview; | |
} |