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> | |
CPTextViewDidFocusNotification = @"CPTextViewDidFocusNotification"; | |
CPTextViewDidBlurNotification = @"CPTextViewDidBlurNotification"; | |
@implementation CPTextView : CPControl | |
{ | |
DOMElement _inputElement; | |
id _delegate; | |
CPScrollView _scrollView; |
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
def export(request): | |
project_data = simplejson.loads(request.raw_post_data) | |
output = PdfFileWriter() | |
count = 0 | |
for screen in project_data['screens']: | |
os.system("echo \"%s\" | wkhtmltopdf -O Landscape - %s.pdf" % | |
(screen['html'].encode("utf-8").replace("\"", "\\\""), | |
count)) | |
count = count + 1 |
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
def export(request): | |
project_data = simplejson.loads(request.raw_post_data) | |
output = PdfFileWriter() | |
for screen in project_data['screens']: | |
os.system("echo \"%s\" | wkhtmltopdf -O Landscape - test.pdf" % | |
(screen['html'].encode("utf-8").replace("\"", "\\\""))) | |
input = PdfFileReader(file("test.pdf", "rb")) | |
output.addPage(input.getPage(0)) |
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
from mockingbird.project.models import Project, Screen, Widget, Subwidget | |
from mockingbird.settings import SECRET_KEY | |
from mockingbird.utils import json_view | |
from django.db import transaction | |
from django.core.exceptions import ObjectDoesNotExist | |
from django.core.exceptions import MultipleObjectsReturned | |
import subprocess | |
import StringIO | |
import sys | |
import cgi |
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
from mockingbird.project.models import Project, Screen, Widget, Subwidget | |
from mockingbird.settings import SECRET_KEY | |
from mockingbird.utils import json_view | |
from django.db import transaction | |
from django.core.exceptions import ObjectDoesNotExist | |
from django.core.exceptions import MultipleObjectsReturned | |
import subprocess | |
import StringIO | |
import sys | |
import cgi |
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 progress = [[CPProgressIndicator alloc] initWithFrame:CGRectMake(64.0, 64.0)]; | |
[progress setStyle:CPProgressIndicatorBarStyle]; | |
[progress setMaxValue:100]; | |
[progress setMinValue:0]; | |
[progress setDoubleValue:25]; | |
[progress setIndeterminate:NO]; | |
[progress sizeToFit]; | |
[progress startAnimation:self]; | |
[contentView addSubview:progress]; |
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> | |
@import "base64.j" | |
/* | |
* Canvas2Image v0.1 | |
* Copyright (c) 2008 Jacob Seidelin, [email protected] | |
* MIT License [http://www.opensource.org/licenses/mit-license.php] | |
*/ | |
/******* Canvas2Image code starts here *******/ |
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
<div style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 2px; top: 2px; width: 1000px; height: 600px; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"> | |
<div style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 113px; top: 99px; width: 124px; height: 22px;"> | |
<div style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 55px; top: 11px; width: 15px; height: 0px;"> | |
<div style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 0px; top: 0px; width: 0px; height: 0px; text-align: center;"> | |
</div> | |
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAACWCAYAAAABv9LBAAAAIElEQVRoge3BMQEAAADCoPVPbQwfoAAAAAAAAAAAgI8BI74AAfof59cAAAAASUVORK5CYII=" style="margin: 0px; padding: 0px; overflow: hidden; top: 0px; left: 0px; z-index: -100; position: absolute; visibility |
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
<DIV style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 2px; top: 2px; width: 1000px; height: 600px; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"> | |
<DIV style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 113px; top: 99px; width: 124px; height: 22px;"> | |
<DIV style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 55px; top: 11px; width: 15px; height: 0px;"> | |
<DIV style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 0px; top: 0px; width: 0px; height: 0px; text-align: center;" /> | |
<IMG src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAACWCAYAAAABv9LBAAAAIElEQVRoge3BMQEAAADCoPVPbQwfoAAAAAAAAAAAgI8BI74AAfof59cAAAAASUVORK5CYII=" style="margin: 0px; padding: 0px; overflow: hidden; top: 0px; left: 0px; z-index: -100; position: absolute; visibility: visible |
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
- (void)keyDown:(CPEvent)anEvent | |
{ | |
switch ([anEvent keyCode]) { | |
case CPReturnKeyCode: | |
[self addSelectedWidgetToScreen]; | |
break; | |
case CPRightArrowKeyCode: | |
[self selectNextWidget]; | |
break; | |
case CPLeftArrowKeyCode: |