mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 18:30:59 +00:00
Graphics primitives
- Implemented CGRectDivide/CPDivideRect. - Implemented CPDrawTiledRects/CPDrawColorTiledRects. - Removed CPDrawGrayBezel and CPDrawGroove, they were not being done in a Cocoa-compliant way, and the Cocoa way is not really useful right now. - Moved border drawing code back to CPScrollView since CPDrawGrayBezel/CPDrawGroove are gone. - Test app to do simple demo of the new functions. - Removed trailing whitespace.
This commit is contained in:
1 parent
18d7dcc226
commit
b4f7df4786
12 files changed
+1015
-113
No files matched your search
+29
-15
@@ -70,7 +70,7 @@ function CPPointMake(x, y)
|
||||
*/
|
||||
function CPRectInset(aRect, dX, dY)
|
||||
{
|
||||
return CPRectMake( aRect.origin.x + dX, aRect.origin.y + dY,
|
||||
return CPRectMake( aRect.origin.x + dX, aRect.origin.y + dY,
|
||||
aRect.size.width - 2 * dX, aRect.size.height - 2*dY);
|
||||
}
|
||||
|
||||
@@ -96,13 +96,13 @@ function CPRectIntegral(aRect)
|
||||
function CPRectIntersection(lhsRect, rhsRect)
|
||||
{
|
||||
var intersection = CPRectMake(
|
||||
Math.max(CPRectGetMinX(lhsRect), CPRectGetMinX(rhsRect)),
|
||||
Math.max(CPRectGetMinY(lhsRect), CPRectGetMinY(rhsRect)),
|
||||
Math.max(CPRectGetMinX(lhsRect), CPRectGetMinX(rhsRect)),
|
||||
Math.max(CPRectGetMinY(lhsRect), CPRectGetMinY(rhsRect)),
|
||||
0, 0);
|
||||
|
||||
|
||||
intersection.size.width = Math.min(CPRectGetMaxX(lhsRect), CPRectGetMaxX(rhsRect)) - CPRectGetMinX(intersection);
|
||||
intersection.size.height = Math.min(CPRectGetMaxY(lhsRect), CPRectGetMaxY(rhsRect)) - CPRectGetMinY(intersection);
|
||||
|
||||
|
||||
return CPRectIsEmpty(intersection) ? CPRectMakeZero() : intersection;
|
||||
}
|
||||
|
||||
@@ -160,13 +160,13 @@ function CPRectStandardize(aRect)
|
||||
standardized.origin.x += width;
|
||||
standardized.size.width = -width;
|
||||
}
|
||||
|
||||
|
||||
if (height < 0.0)
|
||||
{
|
||||
standardized.origin.y += height;
|
||||
standardized.size.height = -height;
|
||||
}
|
||||
|
||||
|
||||
return standardized;
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ function CPRectUnion(lhsRect, rhsRect)
|
||||
minY = Math.min(CPRectGetMinY(lhsRect), CPRectGetMinY(rhsRect)),
|
||||
maxX = Math.max(CPRectGetMaxX(lhsRect), CPRectGetMaxX(rhsRect)),
|
||||
maxY = Math.max(CPRectGetMaxY(lhsRect), CPRectGetMaxY(rhsRect));
|
||||
|
||||
|
||||
return CPRectMake(minX, minY, maxX - minX, maxY - minY);
|
||||
}
|
||||
|
||||
@@ -222,8 +222,8 @@ function CPRectContainsPoint(aRect, aPoint)
|
||||
{
|
||||
return aPoint.x >= CPRectGetMinX(aRect) &&
|
||||
aPoint.y >= CPRectGetMinY(aRect) &&
|
||||
aPoint.x < CPRectGetMaxX(aRect) &&
|
||||
aPoint.y < CPRectGetMaxY(aRect);
|
||||
aPoint.x < CPRectGetMaxX(aRect) &&
|
||||
aPoint.y < CPRectGetMaxY(aRect);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -261,7 +261,7 @@ function CPPointEqualToPoint(lhsPoint, rhsPoint)
|
||||
*/
|
||||
function CPRectEqualToRect(lhsRect, rhsRect)
|
||||
{
|
||||
return CPPointEqualToPoint(lhsRect.origin, rhsRect.origin) &&
|
||||
return CPPointEqualToPoint(lhsRect.origin, rhsRect.origin) &&
|
||||
CPSizeEqualToSize(lhsRect.size, rhsRect.size);
|
||||
}
|
||||
|
||||
@@ -380,6 +380,20 @@ function CPRectIsNull(aRect)
|
||||
return aRect.size.width <= 0.0 || aRect.size.height <= 0.0;
|
||||
}
|
||||
|
||||
/*!
|
||||
Creates two rectangles -- slice and rem -- from inRect, by dividing inRect
|
||||
with a line that's parallel to the side of inRect specified by edge.
|
||||
The size of slice is determined by amount, which specifies the distance from edge.
|
||||
|
||||
slice and rem must not be NULL.
|
||||
|
||||
@group CGRect
|
||||
*/
|
||||
function CPDivideRect(inRect, slice, rem, amount, edge)
|
||||
{
|
||||
CGRectDivide(inRect, slice, rem, amount, edge);
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns \c YES if the two CGSizes are identical.
|
||||
@group CGSize
|
||||
@@ -434,7 +448,7 @@ function CPStringFromRect(aRect)
|
||||
function CPPointFromString(aString)
|
||||
{
|
||||
var comma = aString.indexOf(',');
|
||||
|
||||
|
||||
return { x:parseFloat(aString.substr(1, comma - 1), 10), y:parseFloat(aString.substring(comma + 1, aString.length), 10) };
|
||||
}
|
||||
|
||||
@@ -447,7 +461,7 @@ function CPPointFromString(aString)
|
||||
function CPSizeFromString(aString)
|
||||
{
|
||||
var comma = aString.indexOf(',');
|
||||
|
||||
|
||||
return { width:parseFloat(aString.substr(1, comma - 1), 10), height:parseFloat(aString.substring(comma + 1, aString.length), 10) };
|
||||
}
|
||||
|
||||
@@ -460,7 +474,7 @@ function CPSizeFromString(aString)
|
||||
function CPRectFromString(aString)
|
||||
{
|
||||
var comma = aString.indexOf(',', aString.indexOf(',') + 1);
|
||||
|
||||
|
||||
return { origin:CPPointFromString(aString.substr(1, comma - 1)), size:CPSizeFromString(aString.substring(comma + 2, aString.length)) };
|
||||
}
|
||||
|
||||
@@ -504,6 +518,6 @@ function CPPointMakeZero()
|
||||
return CPPointMake(0, 0, 0);
|
||||
}
|
||||
|
||||
/*!
|
||||
/*!
|
||||
@}
|
||||
*/
|
||||
+64
-81
@@ -26,97 +26,80 @@
|
||||
#include "CoreGraphics/CGGeometry.h"
|
||||
|
||||
|
||||
function CPDrawGrayBezel(aRect)
|
||||
function CPDrawTiledRects(
|
||||
/* CGRect */ boundsRect,
|
||||
/* CGRect */ clipRect,
|
||||
/* CPRectEdge[] */ sides,
|
||||
/* float[] */ grays)
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort];
|
||||
if (sides.length != grays.length)
|
||||
[CPException raise:CPInvalidArgumentException reason:@"sides (length: " + sides.length + ") and grays (length: " + grays.length + ") must have the same length."];
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]);
|
||||
var colors = [];
|
||||
|
||||
var y = _CGRectGetMinY(aRect) + 0.5;
|
||||
for (var i = 0; i < grays.length; ++i)
|
||||
colors.push([CPColor colorWithWhite:grays[i] alpha:1.0]);
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 1.0, y);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]);
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 1.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]);
|
||||
CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:190.0/255.0 alpha:1.0]);
|
||||
|
||||
var x = _CGRectGetMaxX(aRect) - 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 1.0);
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect));
|
||||
|
||||
CGContextMoveToPoint(context, x - 0.5, _CGRectGetMaxY(aRect) - 0.5);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMinX(aRect), _CGRectGetMaxY(aRect) - 0.5);
|
||||
|
||||
x = _CGRectGetMinX(aRect) + 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect));
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect) + 1.0);
|
||||
|
||||
CGContextStrokePath(context);
|
||||
return CPDrawColorTiledRects(boundsRect, clipRect, sides, colors);
|
||||
}
|
||||
|
||||
function CPDrawGroove(aRect, drawTopBorder)
|
||||
function CPDrawColorTiledRects(
|
||||
/* CGRect */ boundsRect,
|
||||
/* CGRect */ clipRect,
|
||||
/* CPRectEdge[] */ sides,
|
||||
/* CPColor[] */ colors)
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort];
|
||||
if (sides.length != colors.length)
|
||||
[CPException raise:CPInvalidArgumentException reason:@"sides (length: " + sides.length + ") and colors (length: " + colors.length + ") must have the same length."];
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:159.0/255.0 alpha:1.0]);
|
||||
var resultRect = _CGRectMakeCopy(boundsRect),
|
||||
slice = _CGRectMakeZero(),
|
||||
remainder = _CGRectMakeZero(),
|
||||
context = [[CPGraphicsContext currentContext] graphicsPort];
|
||||
|
||||
var y = _CGRectGetMinY(aRect) + 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y);
|
||||
|
||||
var x = _CGRectGetMaxX(aRect) - 1.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 2.0);
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect) - 1.0);
|
||||
|
||||
y = _CGRectGetMaxY(aRect) - 1.5;
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 2.0, y);
|
||||
|
||||
x = _CGRectGetMinX(aRect) + 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect));
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect));
|
||||
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor whiteColor]);
|
||||
|
||||
var rect = _CGRectOffset(aRect, 1.0, 1.0);
|
||||
|
||||
rect.size.width -= 1.0;
|
||||
rect.size.height -= 1.0;
|
||||
CGContextStrokeRect(context, _CGRectInset(rect, 0.5, 0.5));
|
||||
|
||||
if (drawTopBorder)
|
||||
for (var sideIndex = 0; sideIndex < sides.length; ++sideIndex)
|
||||
{
|
||||
var side = sides[sideIndex];
|
||||
|
||||
CGRectDivide(resultRect, slice, remainder, 1.0, side);
|
||||
resultRect = remainder;
|
||||
slice = CGRectIntersection(slice, clipRect);
|
||||
|
||||
// Cocoa docs say that only slices that are within the clipRect are actually drawn
|
||||
if (_CGRectIsEmpty(slice))
|
||||
continue;
|
||||
|
||||
var minX, maxX, minY, maxY;
|
||||
|
||||
if (side == CPMinXEdge || side == CPMaxXEdge)
|
||||
{
|
||||
// Make sure we have at least 1 pixel to draw a line
|
||||
if (_CGRectGetWidth(slice) < 1.0)
|
||||
continue;
|
||||
|
||||
minX = _CGRectGetMinX(slice) + 0.5;
|
||||
maxX = minX;
|
||||
minY = _CGRectGetMinY(slice);
|
||||
maxY = _CGRectGetMaxY(slice);
|
||||
}
|
||||
else // CPMinYEdge || CPMaxYEdge
|
||||
{
|
||||
// Make sure we have at least 1 pixel to draw a line
|
||||
if (_CGRectGetHeight(slice) < 1.0)
|
||||
continue;
|
||||
|
||||
minX = _CGRectGetMinX(slice);
|
||||
maxX = _CGRectGetMaxX(slice);
|
||||
minY = _CGRectGetMinY(slice) + 0.5;
|
||||
maxY = minY;
|
||||
}
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]);
|
||||
|
||||
y = _CGRectGetMinY(aRect) + 2.5;
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 2.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 2.0, y);
|
||||
CGContextMoveToPoint(context, minX, minY);
|
||||
CGContextAddLineToPoint(context, maxX, maxY);
|
||||
CGContextSetStrokeColor(context, colors[sideIndex]);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
}
|
||||
|
||||
return resultRect;
|
||||
}
|
||||
+91
-2
@@ -772,11 +772,11 @@
|
||||
break;
|
||||
|
||||
case CPBezelBorder:
|
||||
CPDrawGrayBezel(strokeRect);
|
||||
[self _drawGrayBezelInContext:context bounds:strokeRect];
|
||||
break;
|
||||
|
||||
case CPGrooveBorder:
|
||||
CPDrawGroove(strokeRect, YES);
|
||||
[self _drawGrooveInContext:context bounds:strokeRect];
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -784,6 +784,95 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_drawGrayBezelInContext:(CGContext)context bounds:(CGRect)aRect
|
||||
{
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]);
|
||||
|
||||
var y = _CGRectGetMinY(aRect) + 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 1.0, y);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]);
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 1.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]);
|
||||
CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:190.0/255.0 alpha:1.0]);
|
||||
|
||||
var x = _CGRectGetMaxX(aRect) - 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 1.0);
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect));
|
||||
|
||||
CGContextMoveToPoint(context, x - 0.5, _CGRectGetMaxY(aRect) - 0.5);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMinX(aRect), _CGRectGetMaxY(aRect) - 0.5);
|
||||
|
||||
x = _CGRectGetMinX(aRect) + 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect));
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect) + 1.0);
|
||||
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
|
||||
- (void)_drawGrooveInContext:(CGContext)context bounds:(CGRect)aRect
|
||||
{
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:159.0/255.0 alpha:1.0]);
|
||||
|
||||
var y = _CGRectGetMinY(aRect) + 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y);
|
||||
|
||||
var x = _CGRectGetMaxX(aRect) - 1.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 2.0);
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect) - 1.0);
|
||||
|
||||
y = _CGRectGetMaxY(aRect) - 1.5;
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 2.0, y);
|
||||
|
||||
x = _CGRectGetMinX(aRect) + 0.5;
|
||||
|
||||
CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect));
|
||||
CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect));
|
||||
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor whiteColor]);
|
||||
|
||||
var rect = _CGRectOffset(aRect, 1.0, 1.0);
|
||||
|
||||
rect.size.width -= 1.0;
|
||||
rect.size.height -= 1.0;
|
||||
CGContextStrokeRect(context, _CGRectInset(rect, 0.5, 0.5));
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]);
|
||||
|
||||
y = _CGRectGetMinY(aRect) + 2.5;
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 2.0, y);
|
||||
CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 2.0, y);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
|
||||
|
||||
// CPResponder Overrides
|
||||
|
||||
/*!
|
||||
|
||||
@@ -70,6 +70,11 @@ _function(CGInsetMakeZero())
|
||||
_function(CGInsetMakeCopy(anInset))
|
||||
_function(CGInsetIsEmpty(anInset))
|
||||
|
||||
CGMinXEdge = 0;
|
||||
CGMinYEdge = 1;
|
||||
CGMaxXEdge = 2;
|
||||
CGMaxYEdge = 3;
|
||||
|
||||
CGRectNull = _CGRectMake(Infinity, Infinity, 0.0, 0.0);
|
||||
|
||||
/*!
|
||||
@@ -77,6 +82,50 @@ CGRectNull = _CGRectMake(Infinity, Infinity, 0.0, 0.0);
|
||||
@{
|
||||
*/
|
||||
|
||||
/*!
|
||||
Creates two rectangles -- slice and rem -- from inRect, by dividing inRect
|
||||
with a line that's parallel to the side of inRect specified by edge.
|
||||
The size of slice is determined by amount, which specifies the distance from edge.
|
||||
|
||||
slice and rem must not be NULL, must not be the same object, and must not be the
|
||||
same object as inRect.
|
||||
|
||||
@group CGRect
|
||||
*/
|
||||
function CGRectDivide(inRect, slice, rem, amount, edge)
|
||||
{
|
||||
slice.origin = _CGPointMakeCopy(inRect.origin);
|
||||
slice.size = _CGSizeMakeCopy(inRect.size);
|
||||
rem.origin = _CGPointMakeCopy(inRect.origin);
|
||||
rem.size = _CGSizeMakeCopy(inRect.size);
|
||||
|
||||
switch (edge)
|
||||
{
|
||||
case CGMinXEdge:
|
||||
slice.size.width = amount;
|
||||
rem.origin.x += amount;
|
||||
rem.size.width -= amount;
|
||||
break;
|
||||
|
||||
case CGMaxXEdge:
|
||||
slice.origin.x = _CGRectGetMaxX(slice) - amount;
|
||||
slice.size.width = amount;
|
||||
rem.size.width -= amount;
|
||||
break;
|
||||
|
||||
case CGMinYEdge:
|
||||
slice.size.height = amount;
|
||||
rem.origin.y += amount;
|
||||
rem.size.height -= amount;
|
||||
break;
|
||||
|
||||
case CGMaxYEdge:
|
||||
slice.origin.y = _CGRectGetMaxY(slice) - amount;
|
||||
slice.size.height = amount;
|
||||
rem.size.height -= amount;
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns a \c BOOL indicating whether CGRect \c lhsRect
|
||||
contains CGRect \c rhsRect.
|
||||
@@ -88,7 +137,7 @@ CGRectNull = _CGRectMake(Infinity, Infinity, 0.0, 0.0);
|
||||
function CGRectContainsRect(lhsRect, rhsRect)
|
||||
{
|
||||
var union = CGRectUnion(lhsRect, rhsRect);
|
||||
|
||||
|
||||
return _CGRectEqualToRect(union, lhsRect);
|
||||
}
|
||||
|
||||
@@ -102,12 +151,12 @@ function CGRectContainsRect(lhsRect, rhsRect)
|
||||
function CGRectIntersectsRect(lhsRect, rhsRect)
|
||||
{
|
||||
var intersection = CGRectIntersection(lhsRect, rhsRect);
|
||||
|
||||
|
||||
return !_CGRectIsEmpty(intersection);
|
||||
}
|
||||
|
||||
/*!
|
||||
Makes the origin and size of a CGRect all integers. Specifically, by making
|
||||
Makes the origin and size of a CGRect all integers. Specifically, by making
|
||||
the southwest corner the origin (rounded down), and the northeast corner a CGSize (rounded up).
|
||||
@param aRect the rectangle to operate on
|
||||
@return CGRect the modified rectangle (same as the input)
|
||||
@@ -120,7 +169,7 @@ function CGRectIntegral(aRect)
|
||||
// Store these out separately, if not the GetMaxes will return incorrect values.
|
||||
var x = FLOOR(_CGRectGetMinX(aRect)),
|
||||
y = FLOOR(_CGRectGetMinY(aRect));
|
||||
|
||||
|
||||
aRect.size.width = CEIL(_CGRectGetMaxX(aRect)) - x;
|
||||
aRect.size.height = CEIL(_CGRectGetMaxY(aRect)) - y;
|
||||
|
||||
@@ -140,18 +189,18 @@ function CGRectIntegral(aRect)
|
||||
function CGRectIntersection(lhsRect, rhsRect)
|
||||
{
|
||||
var intersection = _CGRectMake(
|
||||
MAX(_CGRectGetMinX(lhsRect), _CGRectGetMinX(rhsRect)),
|
||||
MAX(_CGRectGetMinY(lhsRect), _CGRectGetMinY(rhsRect)),
|
||||
MAX(_CGRectGetMinX(lhsRect), _CGRectGetMinX(rhsRect)),
|
||||
MAX(_CGRectGetMinY(lhsRect), _CGRectGetMinY(rhsRect)),
|
||||
0, 0);
|
||||
|
||||
|
||||
intersection.size.width = MIN(_CGRectGetMaxX(lhsRect), _CGRectGetMaxX(rhsRect)) - _CGRectGetMinX(intersection);
|
||||
intersection.size.height = MIN(_CGRectGetMaxY(lhsRect), _CGRectGetMaxY(rhsRect)) - _CGRectGetMinY(intersection);
|
||||
|
||||
|
||||
return _CGRectIsEmpty(intersection) ? _CGRectMakeZero() : intersection;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
|
||||
*/
|
||||
function CGRectStandardize(aRect)
|
||||
{
|
||||
@@ -189,28 +238,28 @@ function CGRectUnion(lhsRect, rhsRect)
|
||||
minY = MIN(_CGRectGetMinY(lhsRect), _CGRectGetMinY(rhsRect)),
|
||||
maxX = MAX(_CGRectGetMaxX(lhsRect), _CGRectGetMaxX(rhsRect)),
|
||||
maxY = MAX(_CGRectGetMaxY(lhsRect), _CGRectGetMaxY(rhsRect));
|
||||
|
||||
|
||||
return _CGRectMake(minX, minY, maxX - minX, maxY - minY);
|
||||
}
|
||||
|
||||
function CGPointFromString(aString)
|
||||
{
|
||||
var comma = aString.indexOf(',');
|
||||
|
||||
|
||||
return { x:parseInt(aString.substr(1, comma - 1)), y:parseInt(aString.substring(comma + 1, aString.length)) };
|
||||
}
|
||||
|
||||
function CGSizeFromString(aString)
|
||||
{
|
||||
var comma = aString.indexOf(',');
|
||||
|
||||
|
||||
return { width:parseInt(aString.substr(1, comma - 1)), height:parseInt(aString.substring(comma + 1, aString.length)) };
|
||||
}
|
||||
|
||||
function CGRectFromString(aString)
|
||||
{
|
||||
var comma = aString.indexOf(',', aString.indexOf(',') + 1);
|
||||
|
||||
|
||||
return { origin:CGPointFromString(aString.substr(1, comma - 1)), size:CGSizeFromString(aString.substring(comma + 2, aString.length)) };
|
||||
}
|
||||
|
||||
@@ -233,6 +282,6 @@ function CPStringFromCGInset(anInset)
|
||||
return '{' + anInset.top + ", " + anInset.left + ", " + anInset.bottom + ", " + anInset.right + '}';
|
||||
}
|
||||
|
||||
/*!
|
||||
@}
|
||||
/*!
|
||||
@}
|
||||
*/
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* CPFontMetricsExplorer
|
||||
*
|
||||
* Created by Aparajita Fishman on August 23, 2010.
|
||||
*/
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
|
||||
CPLogRegister(CPLogConsole);
|
||||
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
CPWindow theWindow;
|
||||
|
||||
@outlet CustomDrawView view1;
|
||||
@outlet CustomDrawView view2;
|
||||
@outlet CustomDrawView view3;
|
||||
@outlet CustomDrawView view4;
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
[view1 setDelegate:self];
|
||||
[view2 setDelegate:self];
|
||||
[view3 setDelegate:self];
|
||||
[view4 setDelegate:self];
|
||||
}
|
||||
|
||||
- (void)viewWillDraw:(CPView)aView dirtyRect:(CGRect)dirtyRect
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
innerRect;
|
||||
|
||||
if (aView === view1 || aView === view2)
|
||||
{
|
||||
var bounds = [aView bounds],
|
||||
sides = [CPMinYEdge, CPMaxYEdge, CPMinXEdge, CPMaxXEdge],
|
||||
grays = [192.0/255.0, 1.0, 192.0/255.0, 1.0],
|
||||
clipRect = [aView bounds];
|
||||
|
||||
if (aView === view2)
|
||||
{
|
||||
var remainder = CGRectMakeZero();
|
||||
CGRectDivide(bounds, clipRect, remainder, CGRectGetWidth(bounds) / 2, CGMinXEdge);
|
||||
}
|
||||
|
||||
innerRect = CPDrawTiledRects(bounds, clipRect, sides, grays);
|
||||
}
|
||||
else if (aView === view3)
|
||||
{
|
||||
var bounds = [aView bounds],
|
||||
sides = [CPMinYEdge, CPMaxYEdge, CPMinXEdge, CPMaxXEdge],
|
||||
colors = [[CPColor redColor], [CPColor blueColor], [CPColor whiteColor], [CPColor yellowColor]];
|
||||
|
||||
innerRect = CPDrawColorTiledRects(bounds, bounds, sides, colors);
|
||||
}
|
||||
else if (aView === view4)
|
||||
{
|
||||
var bounds = [aView bounds],
|
||||
sides = [CPMinYEdge, CPMaxYEdge, CPMinXEdge, CPMaxXEdge,
|
||||
CPMinYEdge, CPMaxYEdge, CPMinXEdge, CPMaxXEdge,
|
||||
CPMinYEdge, CPMaxYEdge, CPMinXEdge, CPMaxXEdge],
|
||||
colors = [[CPColor redColor], [CPColor blueColor], [CPColor whiteColor], [CPColor yellowColor],
|
||||
[CPColor redColor], [CPColor blueColor], [CPColor whiteColor], [CPColor yellowColor],
|
||||
[CPColor redColor], [CPColor blueColor], [CPColor whiteColor], [CPColor yellowColor]];
|
||||
|
||||
innerRect = CPDrawColorTiledRects(bounds, bounds, sides, colors);
|
||||
}
|
||||
|
||||
CGContextSetFillColor(context, [CPColor colorWithHexString:@"E1EAFF"]);
|
||||
CGContextFillRect(context, innerRect);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation CustomDrawView : CPView
|
||||
{
|
||||
id _delegate @accessors(property=delegate);
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)dirtyRect
|
||||
{
|
||||
if (_delegate && [_delegate respondsToSelector:@selector(viewWillDraw:dirtyRect:)])
|
||||
[_delegate viewWillDraw:self dirtyRect:dirtyRect];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Main cib file base name</key>
|
||||
<string>MainMenu.cib</string>
|
||||
<key>CPBundleName</key>
|
||||
<string>CPGraphicsTest</string>
|
||||
<key>CPPrincipalClass</key>
|
||||
<string>CPApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1 @@
|
||||
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;57E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;2;64E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;27E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;65E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;66E;E;D;K;10;$classnameS;11;CPTextFieldK;8;$classesA;S;11;CPTextFieldS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;67E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;68E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;72E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;73E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;74E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;75E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;76E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;76E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;73E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;65E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;77E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;68E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;72E;K;17;$aline-break-Line truncated
|
||||
@@ -0,0 +1,509 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1060</int>
|
||||
<string key="IBDocument.SystemVersion">10F569</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">788</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.29</string>
|
||||
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">788</string>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<integer value="372"/>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</array>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.Metadata"/>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
|
||||
<object class="NSCustomObject" id="1021">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1014">
|
||||
<string key="NSClassName">FirstResponder</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="1050">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
<object class="NSWindowTemplate" id="972006081">
|
||||
<int key="NSWindowStyleMask">7</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{408, 597}, {417, 368}}</string>
|
||||
<int key="NSWTFlags">1946157056</int>
|
||||
<string key="NSWindowTitle">CPGraphics Test</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
<nil key="NSViewClass"/>
|
||||
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
<object class="NSView" key="NSWindowView" id="439893737">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="NSTextField" id="138531732">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 328}, {174, 22}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="297713421">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">272630784</int>
|
||||
<string key="NSContents">CPDrawTiledRects</string>
|
||||
<object class="NSFont" key="NSSupport" id="123242968">
|
||||
<string key="NSName">LucidaGrande-Bold</string>
|
||||
<double key="NSSize">18</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="138531732"/>
|
||||
<object class="NSColor" key="NSBackgroundColor" id="44883150">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSColor" key="NSTextColor" id="618459948">
|
||||
<int key="NSColorSpace">6</int>
|
||||
<string key="NSCatalogName">System</string>
|
||||
<string key="NSColorName">controlTextColor</string>
|
||||
<object class="NSColor" key="NSColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MAA</bytes>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSCustomView" id="510619559">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{20, 223}, {163, 96}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSClassName">CustomDrawView</string>
|
||||
</object>
|
||||
<object class="NSCustomView" id="964356138">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{234, 223}, {163, 96}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSClassName">CustomDrawView</string>
|
||||
</object>
|
||||
<object class="NSTextField" id="797197665">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 147}, {223, 22}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="217551338">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">272630784</int>
|
||||
<string key="NSContents">CPDrawColorTiledRects</string>
|
||||
<reference key="NSSupport" ref="123242968"/>
|
||||
<reference key="NSControlView" ref="797197665"/>
|
||||
<reference key="NSBackgroundColor" ref="44883150"/>
|
||||
<reference key="NSTextColor" ref="618459948"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSCustomView" id="141377018">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{20, 42}, {163, 96}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSClassName">CustomDrawView</string>
|
||||
</object>
|
||||
<object class="NSCustomView" id="206176523">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{234, 42}, {163, 96}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<string key="NSClassName">CustomDrawView</string>
|
||||
</object>
|
||||
<object class="NSTextField" id="111856647">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 201}, {169, 14}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="645423282">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">138544128</int>
|
||||
<string key="NSContents">Bezel using full bounds</string>
|
||||
<object class="NSFont" key="NSSupport" id="26">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">11</double>
|
||||
<int key="NSfFlags">3100</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="111856647"/>
|
||||
<reference key="NSBackgroundColor" ref="44883150"/>
|
||||
<reference key="NSTextColor" ref="618459948"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSTextField" id="1027195841">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{229, 201}, {173, 14}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="260441325">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">138544128</int>
|
||||
<string key="NSContents">Bezel clipping half horizontally</string>
|
||||
<reference key="NSSupport" ref="26"/>
|
||||
<reference key="NSControlView" ref="1027195841"/>
|
||||
<reference key="NSBackgroundColor" ref="44883150"/>
|
||||
<reference key="NSTextColor" ref="618459948"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSTextField" id="365912390">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{15, 20}, {169, 14}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="665724348">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">138544128</int>
|
||||
<string key="NSContents">Single border</string>
|
||||
<reference key="NSSupport" ref="26"/>
|
||||
<reference key="NSControlView" ref="365912390"/>
|
||||
<reference key="NSBackgroundColor" ref="44883150"/>
|
||||
<reference key="NSTextColor" ref="618459948"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSTextField" id="763959321">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{227, 20}, {173, 14}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="865258227">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags2">138544128</int>
|
||||
<string key="NSContents">Triple border</string>
|
||||
<reference key="NSSupport" ref="26"/>
|
||||
<reference key="NSControlView" ref="763959321"/>
|
||||
<reference key="NSBackgroundColor" ref="44883150"/>
|
||||
<reference key="NSTextColor" ref="618459948"/>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{417, 368}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
|
||||
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="635946545">
|
||||
<string key="NSClassName">AppController</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="1021"/>
|
||||
<reference key="destination" ref="635946545"/>
|
||||
</object>
|
||||
<int key="connectionID">451</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">theWindow</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="972006081"/>
|
||||
</object>
|
||||
<int key="connectionID">1090</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">view1</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="510619559"/>
|
||||
</object>
|
||||
<int key="connectionID">1118</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">view2</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="964356138"/>
|
||||
</object>
|
||||
<int key="connectionID">1119</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">view3</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="141377018"/>
|
||||
</object>
|
||||
<int key="connectionID">1120</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">view4</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="206176523"/>
|
||||
</object>
|
||||
<int key="connectionID">1121</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1048"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1021"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1014"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1050"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">371</int>
|
||||
<reference key="object" ref="972006081"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="439893737"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">372</int>
|
||||
<reference key="object" ref="439893737"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="138531732"/>
|
||||
<reference ref="797197665"/>
|
||||
<reference ref="141377018"/>
|
||||
<reference ref="510619559"/>
|
||||
<reference ref="964356138"/>
|
||||
<reference ref="206176523"/>
|
||||
<reference ref="111856647"/>
|
||||
<reference ref="1027195841"/>
|
||||
<reference ref="365912390"/>
|
||||
<reference ref="763959321"/>
|
||||
</array>
|
||||
<reference key="parent" ref="972006081"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">450</int>
|
||||
<reference key="object" ref="635946545"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1069</int>
|
||||
<reference key="object" ref="138531732"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="297713421"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1070</int>
|
||||
<reference key="object" ref="297713421"/>
|
||||
<reference key="parent" ref="138531732"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1112</int>
|
||||
<reference key="object" ref="510619559"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1113</int>
|
||||
<reference key="object" ref="964356138"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1114</int>
|
||||
<reference key="object" ref="797197665"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="217551338"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1115</int>
|
||||
<reference key="object" ref="141377018"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1116</int>
|
||||
<reference key="object" ref="206176523"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1117</int>
|
||||
<reference key="object" ref="217551338"/>
|
||||
<reference key="parent" ref="797197665"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1122</int>
|
||||
<reference key="object" ref="111856647"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="645423282"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1123</int>
|
||||
<reference key="object" ref="645423282"/>
|
||||
<reference key="parent" ref="111856647"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1124</int>
|
||||
<reference key="object" ref="1027195841"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="260441325"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1125</int>
|
||||
<reference key="object" ref="260441325"/>
|
||||
<reference key="parent" ref="1027195841"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1126</int>
|
||||
<reference key="object" ref="365912390"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="665724348"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1127</int>
|
||||
<reference key="object" ref="763959321"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="865258227"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1128</int>
|
||||
<reference key="object" ref="865258227"/>
|
||||
<reference key="parent" ref="763959321"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1129</int>
|
||||
<reference key="object" ref="665724348"/>
|
||||
<reference key="parent" ref="365912390"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1069.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1070.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1112.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1113.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1114.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1115.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1116.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1117.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1122.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1123.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1124.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1125.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1126.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1127.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1128.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="1129.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="371.IBEditorWindowLastContentRect">{{469, 508}, {417, 368}}</string>
|
||||
<string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="371.IBWindowTemplateEditedContentRect">{{469, 508}, {417, 368}}</string>
|
||||
<integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/>
|
||||
<string key="371.editorWindowContentRectSynchronizationRect">{{33, 99}, {480, 360}}</string>
|
||||
<string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">1129</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">AppController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="setFontFamily:">id</string>
|
||||
<string key="setFontSize:">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="setFontFamily:">
|
||||
<string key="name">setFontFamily:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="setFontSize:">
|
||||
<string key="name">setFontSize:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="theWindow">NSWindow</string>
|
||||
<string key="view1">NSView</string>
|
||||
<string key="view2">NSView</string>
|
||||
<string key="view3">NSView</string>
|
||||
<string key="view4">NSView</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="theWindow">
|
||||
<string key="name">theWindow</string>
|
||||
<string key="candidateClassName">NSWindow</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="view1">
|
||||
<string key="name">view1</string>
|
||||
<string key="candidateClassName">NSView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="view2">
|
||||
<string key="name">view2</string>
|
||||
<string key="candidateClassName">NSView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="view3">
|
||||
<string key="name">view3</string>
|
||||
<string key="candidateClassName">NSView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="view4">
|
||||
<string key="name">view4</string>
|
||||
<string key="candidateClassName">NSView</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">CustomDrawView</string>
|
||||
<string key="superclassName">NSView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">../registration.xcodeproj</string>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
</data>
|
||||
</archive>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
|
||||
<!--
|
||||
index-debug.html
|
||||
TableCibTest
|
||||
|
||||
Created by Francisco Tolmasky on July 5, 2009.
|
||||
Copyright 2009, 280 North, Inc. All rights reserved.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
|
||||
|
||||
<title>CPGraphics Test</title>
|
||||
|
||||
<script type = "text/javascript">
|
||||
OBJJ_MAIN_FILE = "main.j";
|
||||
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
|
||||
</script>
|
||||
|
||||
<script src = "Frameworks/Debug/Objective-J/Objective-J.js" type = "text/javascript"></script>
|
||||
|
||||
<style type = "text/css">
|
||||
body{margin:0; padding:0;}
|
||||
#container {position: absolute; top:50%; left:50%;}
|
||||
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
|
||||
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
|
||||
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
|
||||
</style>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<STYLE type="text/css">
|
||||
#container { position: relative; top: 50%; }
|
||||
#content { position: relative;}
|
||||
</STYLE>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body style="">
|
||||
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
|
||||
<script type = "text/javascript">
|
||||
document.write("<div id='container'><p id='content'>" +
|
||||
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
|
||||
"Loading CPGraphics Test...</p></div>");
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<div id="container">
|
||||
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
|
||||
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
|
||||
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
|
||||
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
|
||||
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
|
||||
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
|
||||
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
|
||||
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
|
||||
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
|
||||
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang = "en" lang = "en">
|
||||
<!--
|
||||
index.html
|
||||
TableCibTest
|
||||
|
||||
Created by Francisco Tolmasky on July 5, 2009.
|
||||
Copyright 2009, 280 North, Inc. All rights reserved.
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
|
||||
|
||||
<title>CPGraphics Test</title>
|
||||
|
||||
<script type = "text/javascript">
|
||||
OBJJ_MAIN_FILE = "main.j";
|
||||
</script>
|
||||
|
||||
<script src = "Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>
|
||||
|
||||
<style type = "text/css">
|
||||
body{margin:0; padding:0;}
|
||||
#container {position: absolute; top:50%; left:50%;}
|
||||
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
|
||||
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
|
||||
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
|
||||
</style>
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<STYLE type="text/css">
|
||||
#container { position: relative; top: 50%; }
|
||||
#content { position: relative;}
|
||||
</STYLE>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body style="">
|
||||
<div id="loadingcontainer" style=" background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
|
||||
<script type = "text/javascript">
|
||||
document.write("<div id='container'><p id='content'>" +
|
||||
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
|
||||
"Loading CPGraphics Test...</p></div>");
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<div id="container">
|
||||
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
|
||||
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
|
||||
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
|
||||
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
|
||||
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
|
||||
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
|
||||
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
|
||||
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
|
||||
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
|
||||
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</noscript>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* TableCibTest
|
||||
*
|
||||
* Created by Francisco Tolmasky on July 5, 2009.
|
||||
* Copyright 2009, 280 North, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
@import "AppController.j"
|
||||
|
||||
|
||||
function main(args, namedArgs)
|
||||
{
|
||||
CPApplicationMain(args, namedArgs);
|
||||
}
|
||||
Reference in new issue
Block a user