mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-05 16:42:58 +00:00
New: Added support for scaling in CPView
This PR adds the support of scaling in CPView. There are two new public methods in CPView : -(void)scaleUnitSquareToSize: and -(void)setScaleSize: -(void)scaleUnitSquareToSize: works exactly as in COCOA, it means if you set a first scale to 0.5 and then 0.5 again, the scaleSize of the view will be 0.25 -(void)setScaleSize: works with the value given. If you set 0.5 after you just seted 0.5 the scaleSize will be 0.5. This method is definitly better in using, specially when using the scaleSize binding with a slider. Test app in Tests/Manual/ScalingTest
This commit is contained in:
1 parent
0b5a98d3fe
commit
ef5f26fd81
12 files changed
+1142
-34
No files matched your search
@@ -351,6 +351,20 @@ function CPBrowserStyleProperty(aProperty)
|
||||
|
||||
r = candidates[PLATFORM_STYLE_JS_PROPERTIES['transition']] || nil;
|
||||
break;
|
||||
|
||||
case 'transformorigin':
|
||||
|
||||
var candidates = {
|
||||
'WebkitTransform' : 'WebkitTransformOrigin',
|
||||
'MozTransform' : 'MozTransformOrigin',
|
||||
'OTransform' : 'OTransformOrigin',
|
||||
'msTransform' : 'MSTransformOrigin',
|
||||
'transform' : 'transformOrigin'
|
||||
};
|
||||
|
||||
r = candidates[PLATFORM_STYLE_JS_PROPERTIES['transform']] || nil;
|
||||
break;
|
||||
|
||||
default:
|
||||
var prefixes = ["Webkit", "Moz", "O", "ms"],
|
||||
strippedProperty = aProperty.split('-').join(' '),
|
||||
|
||||
+254
-33
@@ -199,6 +199,11 @@ var CPViewFlags = { },
|
||||
|
||||
_CPViewFullScreenModeState _fullScreenModeState;
|
||||
|
||||
// Zoom Support
|
||||
BOOL _isScaled;
|
||||
CGSize _hierarchyScaleSize;
|
||||
CGSize _scaleSize;
|
||||
|
||||
// Layout Support
|
||||
BOOL _needsLayout;
|
||||
JSObject _ephemeralSubviews;
|
||||
@@ -334,6 +339,10 @@ var CPViewFlags = { },
|
||||
_isHidden = NO;
|
||||
_hitTests = YES;
|
||||
|
||||
_hierarchyScaleSize = CGSizeMake(1.0 , 1.0);
|
||||
_scaleSize = CGSizeMake(1.0, 1.0);
|
||||
_isScaled = NO;
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
_DOMElement = DOMElementPrototype.cloneNode(false);
|
||||
AppKitTagDOMElement(self, _DOMElement);
|
||||
@@ -561,6 +570,7 @@ var CPViewFlags = { },
|
||||
}
|
||||
|
||||
[aSubview setNextResponder:self];
|
||||
[aSubview _scaleSizeUnitSquareToSize:[self _hierarchyScaleSize]];
|
||||
|
||||
// If the subview is not hidden and one of its ancestors is hidden,
|
||||
// notify the subview that it is now hidden.
|
||||
@@ -960,8 +970,8 @@ var CPViewFlags = { },
|
||||
|
||||
if (YES)
|
||||
{
|
||||
_bounds.size.width = aSize.width;
|
||||
_bounds.size.height = aSize.height;
|
||||
_bounds.size.width = aSize.width * 1 / _scaleSize.width;
|
||||
_bounds.size.height = aSize.height * 1 / _scaleSize.height;
|
||||
}
|
||||
|
||||
if (_layer)
|
||||
@@ -974,7 +984,7 @@ var CPViewFlags = { },
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
CPDOMDisplayServerSetStyleSize(_DOMElement, size.width, size.height);
|
||||
[self _setDisplayServerSetStyleSize:size];
|
||||
|
||||
if (_DOMContentsElement)
|
||||
{
|
||||
@@ -1083,6 +1093,19 @@ var CPViewFlags = { },
|
||||
[CachedNotificationCenter postNotificationName:CPViewFrameDidChangeNotification object:self];
|
||||
}
|
||||
|
||||
/*!
|
||||
This method is used to set the width and height of the _DOMElement. It cares about the scale of the view.
|
||||
When scaling, for instance with a size (0.5, 0.5), the bounds of the view will be multiply by 2. It's why we multiply by the inverse of the scaling.
|
||||
The view will finally keep the same proportion for the user on the screen.
|
||||
*/
|
||||
- (void)_setDisplayServerSetStyleSize:(CGSize)aSize
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
var scale = [self scaleSize];
|
||||
CPDOMDisplayServerSetStyleSize(_DOMElement, aSize.width * 1 / scale.width, aSize.height * 1 / scale.height);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the receiver's bounds. The bounds define the size and location of the receiver inside it's frame. Posts a
|
||||
CPViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.
|
||||
@@ -1580,15 +1603,42 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CPView)hitTest:(CGPoint)aPoint
|
||||
{
|
||||
if (_isHidden || !_hitTests || !CGRectContainsPoint(_frame, aPoint))
|
||||
if (_isHidden || !_hitTests)
|
||||
return nil;
|
||||
|
||||
var frame = _frame,
|
||||
sizeScale = [self _hierarchyScaleSize];
|
||||
|
||||
if (_isScaled)
|
||||
frame = CGRectApplyAffineTransform(_frame, CGAffineTransformMakeScale([_superview _hierarchyScaleSize].width, [_superview _hierarchyScaleSize].height));
|
||||
else
|
||||
frame = CGRectApplyAffineTransform(_frame, CGAffineTransformMakeScale(sizeScale.width, sizeScale.height));
|
||||
|
||||
if (!CGRectContainsPoint(frame, aPoint))
|
||||
return nil;
|
||||
|
||||
var view = nil,
|
||||
i = _subviews.length,
|
||||
adjustedPoint = CGPointMake(aPoint.x - CGRectGetMinX(_frame), aPoint.y - CGRectGetMinY(_frame));
|
||||
adjustedPoint = CGPointMake(aPoint.x - CGRectGetMinX(frame), aPoint.y - CGRectGetMinY(frame));
|
||||
|
||||
if (_inverseBoundsTransform)
|
||||
adjustedPoint = CGPointApplyAffineTransform(adjustedPoint, _inverseBoundsTransform);
|
||||
{
|
||||
var affineTransform = CGAffineTransformMakeCopy(_inverseBoundsTransform);
|
||||
|
||||
if (_isScaled)
|
||||
{
|
||||
affineTransform.tx *= [_superview _hierarchyScaleSize].width;
|
||||
affineTransform.ty *= [_superview _hierarchyScaleSize].height;
|
||||
}
|
||||
else
|
||||
{
|
||||
affineTransform.tx *= sizeScale.width;
|
||||
affineTransform.ty *= sizeScale.height;
|
||||
}
|
||||
|
||||
adjustedPoint = CGPointApplyAffineTransform(adjustedPoint, affineTransform);
|
||||
}
|
||||
|
||||
|
||||
while (i--)
|
||||
if (view = [_subviews[i] hitTest:adjustedPoint])
|
||||
@@ -1909,6 +1959,9 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGPoint)convertPoint:(CGPoint)aPoint fromView:(CPView)aView
|
||||
{
|
||||
if (aView === self)
|
||||
return aPoint;
|
||||
|
||||
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(aView, self));
|
||||
}
|
||||
|
||||
@@ -1919,7 +1972,7 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGPoint)convertPointFromBase:(CGPoint)aPoint
|
||||
{
|
||||
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(nil, self));
|
||||
return [self convertPoint:aPoint fromView:nil];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1930,9 +1983,13 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGPoint)convertPoint:(CGPoint)aPoint toView:(CPView)aView
|
||||
{
|
||||
if (aView === self)
|
||||
return aPoint;
|
||||
|
||||
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(self, aView));
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Converts the point from the receiver’s coordinate system to the base coordinate system.
|
||||
@param aPoint A point specifying a location in the coordinate system of the receiver
|
||||
@@ -1940,7 +1997,7 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGPoint)convertPointToBase:(CGPoint)aPoint
|
||||
{
|
||||
return CGPointApplyAffineTransform(aPoint, _CPViewGetTransform(self, nil));
|
||||
return [self convertPoint:aPoint toView:nil];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1951,6 +2008,9 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGSize)convertSize:(CGSize)aSize fromView:(CPView)aView
|
||||
{
|
||||
if (aView === self)
|
||||
return aSize;
|
||||
|
||||
return CGSizeApplyAffineTransform(aSize, _CPViewGetTransform(aView, self));
|
||||
}
|
||||
|
||||
@@ -1962,6 +2022,9 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGSize)convertSize:(CGSize)aSize toView:(CPView)aView
|
||||
{
|
||||
if (aView === self)
|
||||
return aSize;
|
||||
|
||||
return CGSizeApplyAffineTransform(aSize, _CPViewGetTransform(self, aView));
|
||||
}
|
||||
|
||||
@@ -1973,6 +2036,9 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGRect)convertRect:(CGRect)aRect fromView:(CPView)aView
|
||||
{
|
||||
if (self === aView)
|
||||
return aRect;
|
||||
|
||||
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(aView, self));
|
||||
}
|
||||
|
||||
@@ -1983,7 +2049,7 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGRect)convertRectFromBase:(CGRect)aRect
|
||||
{
|
||||
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(nil, self));
|
||||
return [self convertRect:aRect fromView:nil];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -1994,6 +2060,9 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGRect)convertRect:(CGRect)aRect toView:(CPView)aView
|
||||
{
|
||||
if (self === aView)
|
||||
return aRect;
|
||||
|
||||
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(self, aView));
|
||||
}
|
||||
|
||||
@@ -2004,7 +2073,7 @@ var CPViewFlags = { },
|
||||
*/
|
||||
- (CGRect)convertRectToBase:(CGRect)aRect
|
||||
{
|
||||
return CGRectApplyAffineTransform(aRect, _CPViewGetTransform(self, nil));
|
||||
return [self convertRect:aRect toView:nil];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -2149,6 +2218,88 @@ setBoundsOrigin:
|
||||
|
||||
}
|
||||
|
||||
// Scaling
|
||||
|
||||
/*!
|
||||
Scales the receiver’s coordinate system so that the unit square scales to the specified dimensions.
|
||||
The bounds of the receiver will change, for instance if the given size is (0.5, 0.5) the width and height of the bounds will be multiply by 2.
|
||||
You must call setNeedsDisplay: to redraw the view.
|
||||
@param aSize, the size corresponding the new unit scales
|
||||
*/
|
||||
- (void)scaleUnitSquareToSize:(CGSize)aSize
|
||||
{
|
||||
if (!aSize)
|
||||
return;
|
||||
|
||||
// Reset the bounds
|
||||
var bounds = CGRectMakeCopy([self bounds]);
|
||||
bounds.size.width *= _scaleSize.width;
|
||||
bounds.size.height *= _scaleSize.height;
|
||||
|
||||
[self willChangeValueForKey:@"scaleSize"];
|
||||
_scaleSize = CGSizeMakeCopy([self scaleSize]);
|
||||
_scaleSize.height *= aSize.height;
|
||||
_scaleSize.width *= aSize.width;
|
||||
[self didChangeValueForKey:@"scaleSize"];
|
||||
_isScaled = YES;
|
||||
|
||||
_hierarchyScaleSize = CGSizeMakeCopy([self _hierarchyScaleSize]);
|
||||
_hierarchyScaleSize.height *= aSize.height;
|
||||
_hierarchyScaleSize.width *= aSize.width;
|
||||
|
||||
var scaleAffine = CGAffineTransformMakeScale(1.0 / _scaleSize.width, 1.0 / _scaleSize.height),
|
||||
newBounds = CGRectApplyAffineTransform(CGRectMakeCopy(bounds), scaleAffine);
|
||||
|
||||
[self setBounds:newBounds];
|
||||
|
||||
[_subviews makeObjectsPerformSelector:@selector(_scaleSizeUnitSquareToSize:) withObject:aSize];
|
||||
}
|
||||
|
||||
/*!
|
||||
@ignore
|
||||
Set the _hierarchyScaleSize and call all of the subviews to set their _hierarchyScaleSize
|
||||
*/
|
||||
- (void)_scaleSizeUnitSquareToSize:(CGSize)aSize
|
||||
{
|
||||
_hierarchyScaleSize = CGSizeMakeCopy([_superview _hierarchyScaleSize]);
|
||||
|
||||
if (_isScaled)
|
||||
{
|
||||
_hierarchyScaleSize.width *= _scaleSize.width;
|
||||
_hierarchyScaleSize.height *= _scaleSize.height;
|
||||
}
|
||||
|
||||
[_subviews makeObjectsPerformSelector:@selector(_scaleSizeUnitSquareToSize:) withObject:aSize];
|
||||
}
|
||||
|
||||
/*!
|
||||
Return the _hierarchyScaleSize, this is a CGSize with the real zoom of the view (depending with his parents)
|
||||
*/
|
||||
- (CGSize)_hierarchyScaleSize
|
||||
{
|
||||
return _hierarchyScaleSize || CGSizeMake(1.0, 1.0);
|
||||
}
|
||||
|
||||
/*!
|
||||
Make a zoom in css
|
||||
*/
|
||||
- (void)_applyCSSScalingTranformations
|
||||
{
|
||||
#if PLATFORM(DOM)
|
||||
if (_isScaled)
|
||||
{
|
||||
var scale = [self scaleSize],
|
||||
browserPropertyTransform = CPBrowserStyleProperty(@"transform"),
|
||||
browserPropertyTransformOrigin = CPBrowserStyleProperty(@"transformOrigin");
|
||||
|
||||
self._DOMElement.style[browserPropertyTransform] = 'scale(' + scale.width + ', ' + scale.height + ')';
|
||||
self._DOMElement.style[browserPropertyTransformOrigin] = '0 0';
|
||||
|
||||
[self _setDisplayServerSetStyleSize:[self frameSize]];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Displaying
|
||||
|
||||
/*!
|
||||
@@ -2157,7 +2308,10 @@ setBoundsOrigin:
|
||||
- (void)setNeedsDisplay:(BOOL)aFlag
|
||||
{
|
||||
if (aFlag)
|
||||
{
|
||||
[self _applyCSSScalingTranformations];
|
||||
[self setNeedsDisplayInRect:[self bounds]];
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -2691,6 +2845,40 @@ setBoundsOrigin:
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation CPView (Scaling)
|
||||
|
||||
/*!
|
||||
Set the zoom of the view. This will call scaleUnitSquareToSize: and setNeedsDisplay:
|
||||
This method doesn't care about the last zoom you set in the view
|
||||
@param aSize, the size corresponding the new unit scales
|
||||
*/
|
||||
- (void)setScaleSize:(CGSize)aSize
|
||||
{
|
||||
if (CGSizeEqualToSize(_scaleSize, aSize))
|
||||
return;
|
||||
|
||||
var size = CGSizeMakeZero(),
|
||||
scale = CGSizeMakeCopy([self scaleSize]);
|
||||
|
||||
size.height = aSize.height / scale.height;
|
||||
size.width = aSize.width / scale.width;
|
||||
|
||||
[self scaleUnitSquareToSize:size];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Return the scaleSize of the view, this scaleSize is used to scale in css
|
||||
*/
|
||||
- (CGSize)scaleSize
|
||||
{
|
||||
return _scaleSize || CGSizeMake(1.0, 1.0);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CPView (Theming)
|
||||
#pragma mark Theme States
|
||||
|
||||
@@ -3069,7 +3257,10 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
CPViewWindowKey = @"CPViewWindowKey",
|
||||
CPViewNextKeyViewKey = @"CPViewNextKeyViewKey",
|
||||
CPViewPreviousKeyViewKey = @"CPViewPreviousKeyViewKey",
|
||||
CPReuseIdentifierKey = @"CPReuseIdentifierKey";
|
||||
CPReuseIdentifierKey = @"CPReuseIdentifierKey",
|
||||
CPViewScaleKey = @"CPViewScaleKey",
|
||||
CPViewSizeScaleKey = @"CPViewSizeScaleKey",
|
||||
CPViewIsScaledKey = @"CPViewIsScaledKey";
|
||||
|
||||
@implementation CPView (CPCoding)
|
||||
|
||||
@@ -3136,13 +3327,17 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
if (_toolTip)
|
||||
[self _installToolTipEventHandlers];
|
||||
|
||||
_scaleSize = [aCoder containsValueForKey:CPViewScaleKey] ? [aCoder decodeSizeForKey:CPViewScaleKey] : CGSizeMake(1.0, 1.0);
|
||||
_hierarchyScaleSize = [aCoder containsValueForKey:CPViewSizeScaleKey] ? [aCoder decodeSizeForKey:CPViewSizeScaleKey] : CGSizeMake(1.0, 1.0);
|
||||
_isScaled = [aCoder containsValueForKey:CPViewIsScaledKey] ? [aCoder decodeBoolForKey:CPViewIsScaledKey] : NO;
|
||||
|
||||
// DOM SETUP
|
||||
#if PLATFORM(DOM)
|
||||
_DOMImageParts = [];
|
||||
_DOMImageSizes = [];
|
||||
|
||||
CPDOMDisplayServerSetStyleLeftTop(_DOMElement, NULL, CGRectGetMinX(_frame), CGRectGetMinY(_frame));
|
||||
CPDOMDisplayServerSetStyleSize(_DOMElement, CGRectGetWidth(_frame), CGRectGetHeight(_frame));
|
||||
[self _setDisplayServerSetStyleSize:_frame.size];
|
||||
|
||||
var index = 0,
|
||||
count = _subviews.length;
|
||||
@@ -3265,6 +3460,10 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
|
||||
if (_identifier)
|
||||
[aCoder encodeObject:_identifier forKey:CPReuseIdentifierKey];
|
||||
|
||||
[aCoder encodeSize:[self scaleSize] forKey:CPViewScaleKey];
|
||||
[aCoder encodeSize:[self _hierarchyScaleSize] forKey:CPViewSizeScaleKey];
|
||||
[aCoder encodeBool:_isScaled forKey:CPViewIsScaledKey];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -3294,63 +3493,85 @@ var _CPViewGetTransform = function(/*CPView*/ fromView, /*CPView */ toView)
|
||||
{
|
||||
var frame = view._frame;
|
||||
|
||||
if (view._isScaled)
|
||||
{
|
||||
var affineZoom = CGAffineTransformMakeScale(view._scaleSize.width, view._scaleSize.height);
|
||||
CGAffineTransformConcatTo(transform, affineZoom, transform);
|
||||
}
|
||||
|
||||
transform.tx += CGRectGetMinX(frame);
|
||||
transform.ty += CGRectGetMinY(frame);
|
||||
|
||||
if (view._boundsTransform)
|
||||
{
|
||||
CGAffineTransformConcatTo(transform, view._boundsTransform, transform);
|
||||
var inverseBoundsTransform = CGAffineTransformMakeCopy(view._boundsTransform);
|
||||
|
||||
if (view._isScaled)
|
||||
{
|
||||
var affineZoom = CGAffineTransformMakeScale(view._scaleSize.width, view._scaleSize.height);
|
||||
CGAffineTransformConcatTo(inverseBoundsTransform, affineZoom, inverseBoundsTransform);
|
||||
}
|
||||
|
||||
CGAffineTransformConcatTo(transform, inverseBoundsTransform, transform);
|
||||
}
|
||||
|
||||
view = view._superview;
|
||||
|
||||
}
|
||||
|
||||
// If we hit toView, then we're done.
|
||||
if (view === toView)
|
||||
{
|
||||
return transform;
|
||||
|
||||
}
|
||||
else if (fromView && toView)
|
||||
{
|
||||
fromWindow = [fromView window];
|
||||
toWindow = [toView window];
|
||||
|
||||
if (fromWindow && toWindow && fromWindow !== toWindow)
|
||||
{
|
||||
sameWindow = NO;
|
||||
|
||||
var frame = [fromWindow frame];
|
||||
|
||||
transform.tx += CGRectGetMinX(frame);
|
||||
transform.ty += CGRectGetMinY(frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: For now we can do things this way, but eventually we need to do them the "hard" way.
|
||||
var view = toView;
|
||||
var view = toView,
|
||||
transform2 = CGAffineTransformMakeIdentity();
|
||||
|
||||
while (view)
|
||||
while (view && view != fromView)
|
||||
{
|
||||
var frame = view._frame;
|
||||
var frame = CGRectMakeCopy(view._frame);
|
||||
|
||||
transform.tx -= CGRectGetMinX(frame);
|
||||
transform.ty -= CGRectGetMinY(frame);
|
||||
// FIXME : For now we don't care about rotate transform and so on
|
||||
if (view._isScaled)
|
||||
{
|
||||
transform2.a *= 1 / view._scaleSize.width;
|
||||
transform2.d *= 1 / view._scaleSize.height;
|
||||
}
|
||||
|
||||
transform2.tx += CGRectGetMinX(frame) * transform2.a;
|
||||
transform2.ty += CGRectGetMinY(frame) * transform2.d;
|
||||
|
||||
if (view._boundsTransform)
|
||||
{
|
||||
CGAffineTransformConcatTo(transform, view._inverseBoundsTransform, transform);
|
||||
var inverseBoundsTransform = CGAffineTransformMakeIdentity();
|
||||
inverseBoundsTransform.tx -= view._inverseBoundsTransform.tx * transform2.a;
|
||||
inverseBoundsTransform.ty -= view._inverseBoundsTransform.ty * transform2.d;
|
||||
|
||||
CGAffineTransformConcatTo(transform2, inverseBoundsTransform, transform2);
|
||||
}
|
||||
|
||||
view = view._superview;
|
||||
}
|
||||
|
||||
if (!sameWindow)
|
||||
{
|
||||
var frame = [toWindow frame];
|
||||
transform2.tx = -transform2.tx;
|
||||
transform2.ty = -transform2.ty;
|
||||
|
||||
if (sameWindow)
|
||||
transform = transform2;
|
||||
else
|
||||
CGAffineTransformConcatTo(transform, transform2, transform);
|
||||
|
||||
transform.tx -= CGRectGetMinX(frame);
|
||||
transform.ty -= CGRectGetMinY(frame);
|
||||
}
|
||||
/* var views = [],
|
||||
view = toView;
|
||||
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* ScalingTest
|
||||
*
|
||||
* Created by You on July 23, 2013.
|
||||
* Copyright 2013, Your Company All rights reserved.
|
||||
*/
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
@outlet CPWindow theWindow;
|
||||
@outlet CPSlider sliderView1;
|
||||
@outlet CPSlider sliderView2;
|
||||
@outlet CPView view1;
|
||||
@outlet CPView view2;
|
||||
@outlet CPView view3;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
{
|
||||
// This is called when the application is done loading.
|
||||
}
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
// This is called when the cib is done loading.
|
||||
// You can implement this method on any object instantiated from a Cib.
|
||||
// It's a useful hook for setting up current UI values, and other things.
|
||||
// In this case, we want the window from Cib to become our full browser window
|
||||
|
||||
[theWindow setFullPlatformWindow:YES];
|
||||
}
|
||||
|
||||
- (IBAction)slider1:(id)sender
|
||||
{
|
||||
var factor = [sender objectValue];
|
||||
[view1 setScaleSize:CGSizeMake(factor, factor)];
|
||||
// [view1 scaleUnitSquareToSize:CGSizeMake(factor, factor)];
|
||||
// [view1 setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (IBAction)slider2:(id)sender
|
||||
{
|
||||
var factor = [sender objectValue];
|
||||
[view2 setScaleSize:CGSizeMake(factor, factor)];
|
||||
// [view2 scaleUnitSquareToSize:CGSizeMake(factor, factor)];
|
||||
// [view2 setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (IBAction)slider3:(id)sender
|
||||
{
|
||||
var factor = [sender objectValue];
|
||||
[view3 setScaleSize:CGSizeMake(factor, factor)];
|
||||
// [view2 scaleUnitSquareToSize:CGSizeMake(factor, factor)];
|
||||
// [view2 setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (IBAction)button1:(id)sender
|
||||
{
|
||||
alert("Jolie click !!!");
|
||||
}
|
||||
|
||||
- (IBAction)button2:(id)sender
|
||||
{
|
||||
alert("Nice click !!!");
|
||||
}
|
||||
|
||||
- (IBAction)button3:(id)sender
|
||||
{
|
||||
alert("Wunderbar !!!");
|
||||
}
|
||||
|
||||
- (int)numberOfRowsInTableView:(CPTableView)aTableView
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
<?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>ScalingTest</string>
|
||||
<key>CPBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CPHumanReadableCopyright</key>
|
||||
<string>Copyright © 2013, Your Company All rights reserved.</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Jakefile
|
||||
* ScalingTest
|
||||
*
|
||||
* Created by You on July 23, 2013.
|
||||
* Copyright 2013, Your Company All rights reserved.
|
||||
*/
|
||||
|
||||
var ENV = require("system").env,
|
||||
FILE = require("file"),
|
||||
JAKE = require("jake"),
|
||||
task = JAKE.task,
|
||||
FileList = JAKE.FileList,
|
||||
app = require("cappuccino/jake").app,
|
||||
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
|
||||
OS = require("os");
|
||||
|
||||
app ("ScalingTest", function(task)
|
||||
{
|
||||
ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks";
|
||||
|
||||
if (configuration === "Debug")
|
||||
ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration);
|
||||
|
||||
task.setBuildIntermediatesPath(FILE.join("Build", "ScalingTest.build", configuration));
|
||||
task.setBuildPath(FILE.join("Build", configuration));
|
||||
|
||||
task.setProductName("ScalingTest");
|
||||
task.setIdentifier("com.yourcompany.ScalingTest");
|
||||
task.setVersion("1.0");
|
||||
task.setAuthor("Your Company");
|
||||
task.setEmail("feedback @nospam@ yourcompany.com");
|
||||
task.setSummary("ScalingTest");
|
||||
task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**")));
|
||||
task.setResources(new FileList("Resources/**"));
|
||||
task.setIndexFilePath("index.html");
|
||||
task.setInfoPlistPath("Info.plist");
|
||||
|
||||
if (configuration === "Debug")
|
||||
task.setCompilerFlags("-DDEBUG -g");
|
||||
else
|
||||
task.setCompilerFlags("-O");
|
||||
});
|
||||
|
||||
task ("default", ["ScalingTest"], function()
|
||||
{
|
||||
printResults(configuration);
|
||||
});
|
||||
|
||||
task ("build", ["default"]);
|
||||
|
||||
task ("debug", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Debug";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("release", function()
|
||||
{
|
||||
ENV["CONFIGURATION"] = "Release";
|
||||
JAKE.subjake(["."], "build", ENV);
|
||||
});
|
||||
|
||||
task ("run", ["debug"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Debug", "ScalingTest", "index.html")]);
|
||||
});
|
||||
|
||||
task ("run-release", ["release"], function()
|
||||
{
|
||||
OS.system(["open", FILE.join("Build", "Release", "ScalingTest", "index.html")]);
|
||||
});
|
||||
|
||||
task ("deploy", ["release"], function()
|
||||
{
|
||||
FILE.mkdirs(FILE.join("Build", "Deployment", "ScalingTest"));
|
||||
OS.system(["press", "-f", FILE.join("Build", "Release", "ScalingTest"), FILE.join("Build", "Deployment", "ScalingTest")]);
|
||||
printResults("Deployment")
|
||||
});
|
||||
|
||||
task ("desktop", ["release"], function()
|
||||
{
|
||||
FILE.mkdirs(FILE.join("Build", "Desktop", "ScalingTest"));
|
||||
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ScalingTest"), FILE.join("Build", "Desktop", "ScalingTest", "ScalingTest.app"));
|
||||
printResults("Desktop")
|
||||
});
|
||||
|
||||
task ("run-desktop", ["desktop"], function()
|
||||
{
|
||||
OS.system([FILE.join("Build", "Desktop", "ScalingTest", "ScalingTest.app", "Contents", "MacOS", "NativeHost"), "-i"]);
|
||||
});
|
||||
|
||||
function printResults(configuration)
|
||||
{
|
||||
print("----------------------------");
|
||||
print(configuration+" app built at path: "+FILE.join("Build", configuration, "ScalingTest"));
|
||||
print("----------------------------");
|
||||
}
|
||||
@@ -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;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;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;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;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;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;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;D;K;6;CP$UIDd;2;58E;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;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;67E;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;68E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;101E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;3;104E;D;K;6;CP$UIDd;3;105E;D;K;6;CP$UIDd;3;106E;D;K;6;CP$UIDd;3;107E;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;3;109E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;112E;D;K;6;CP$UIDd;3;113E;D;K;6;CP$UIDd;3;114E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;116E;D;K;6;CP$UIDd;3;117E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;3;119E;D;K;6;CP$UIDd;3;120E;D;K;6;CP$UIDd;3;121E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;123E;D;K;6;CP$UIDd;3;124E;D;K;6;CP$UIDd;3;125E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;127E;D;K;6;CP$UIDd;3;128E;D;K;6;CP$UIDd;3;129E;D;K;6;CP$UIDd;3;130E;D;K;6;CP$UIDd;3;131E;D;K;6;CP$UIDd;3;132E;D;K;6;CP$UIDd;3;133E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;3;142E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;146E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;147E;D;K;6;CP$UIDd;3;148E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;151E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;154E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;156E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;157E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;159E;D;K;6;CP$UIDd;3;161E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;166E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;168E;D;K;6;CP$UIDd;3;169E;D;K;6;CP$UIDd;3;171E;D;K;6;CP$UIDd;3;172E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;173E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;174E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;3;102E;D;K;6;Line truncated
|
||||
@@ -0,0 +1,463 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4457.6" systemVersion="12E55" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment version="1050" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4457.6"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" destination="58" id="142"/>
|
||||
<outlet property="delegate" destination="450" id="451"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder">
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" destination="5" id="39"/>
|
||||
<action selector="centerSelectionInVisibleArea:" destination="210" id="245"/>
|
||||
<action selector="checkSpelling:" destination="201" id="225"/>
|
||||
<action selector="clearRecentDocuments:" destination="126" id="127"/>
|
||||
<action selector="copy:" destination="197" id="224"/>
|
||||
<action selector="cut:" destination="199" id="228"/>
|
||||
<action selector="delete:" destination="202" id="235"/>
|
||||
<action selector="newDocument:" destination="82" id="373"/>
|
||||
<action selector="openDocument:" destination="72" id="374"/>
|
||||
<action selector="paste:" destination="203" id="226"/>
|
||||
<action selector="performClose:" destination="73" id="193"/>
|
||||
<action selector="performFindPanelAction:" destination="209" id="241"/>
|
||||
<action selector="performMiniaturize:" destination="23" id="37"/>
|
||||
<action selector="performZoom:" destination="239" id="240"/>
|
||||
<action selector="redo:" destination="215" id="231"/>
|
||||
<action selector="revertDocumentToSaved:" destination="112" id="364"/>
|
||||
<action selector="runToolbarCustomizationPalette:" destination="298" id="365"/>
|
||||
<action selector="saveDocument:" destination="75" id="362"/>
|
||||
<action selector="saveDocumentAs:" destination="80" id="363"/>
|
||||
<action selector="selectAll:" destination="198" id="232"/>
|
||||
<action selector="showGuessPanel:" destination="204" id="230"/>
|
||||
<action selector="showHelp:" destination="111" id="360"/>
|
||||
<action selector="startSpeaking:" destination="196" id="233"/>
|
||||
<action selector="stopSpeaking:" destination="195" id="227"/>
|
||||
<action selector="toggleAutomaticLinkDetection:" destination="354" id="357"/>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" destination="351" id="356"/>
|
||||
<action selector="toggleContinuousSpellChecking:" destination="219" id="222"/>
|
||||
<action selector="toggleGrammarChecking:" destination="346" id="347"/>
|
||||
<action selector="toggleSmartInsertDelete:" destination="350" id="355"/>
|
||||
<action selector="toggleToolbarShown:" destination="297" id="366"/>
|
||||
<action selector="undo:" destination="207" id="223"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-3" userLabel="Application">
|
||||
<connections>
|
||||
<action selector="terminate:" destination="136" id="449"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<menu title="AMainMenu" systemMenu="main" id="29" userLabel="MainMenu">
|
||||
<items>
|
||||
<menuItem title="NewApplication" id="56">
|
||||
<menu key="submenu" title="NewApplication" systemMenu="apple" id="57">
|
||||
<items>
|
||||
<menuItem title="About NewApplication" id="58">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="236">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="129"/>
|
||||
<menuItem isSeparatorItem="YES" id="143">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Quit NewApplication" keyEquivalent="q" id="136"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="83">
|
||||
<menu key="submenu" title="File" id="81">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="82"/>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="72"/>
|
||||
<menuItem title="Open Recent" id="124">
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="125">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="126"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="79">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Close" keyEquivalent="w" id="73"/>
|
||||
<menuItem title="Save" keyEquivalent="s" id="75"/>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="80">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" id="112">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="217">
|
||||
<menu key="submenu" title="Edit" id="205">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="207"/>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="215">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="206">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="199"/>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="197"/>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="203"/>
|
||||
<menuItem title="Delete" id="202"/>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="198"/>
|
||||
<menuItem isSeparatorItem="YES" id="214">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Find" id="218">
|
||||
<menu key="submenu" title="Find" id="220">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="209"/>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="208"/>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="213">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221"/>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="210"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="216">
|
||||
<menu key="submenu" title="Spelling and Grammar" id="200">
|
||||
<items>
|
||||
<menuItem title="Show Spelling…" keyEquivalent=":" id="204"/>
|
||||
<menuItem title="Check Spelling" keyEquivalent=";" id="201"/>
|
||||
<menuItem title="Check Spelling While Typing" id="219"/>
|
||||
<menuItem title="Check Grammar With Spelling" id="346"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="348">
|
||||
<menu key="submenu" title="Substitutions" id="349">
|
||||
<items>
|
||||
<menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350"/>
|
||||
<menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351"/>
|
||||
<menuItem title="Smart Links" tag="3" keyEquivalent="G" id="354">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="211">
|
||||
<menu key="submenu" title="Speech" id="212">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="196"/>
|
||||
<menuItem title="Stop Speaking" id="195"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="295">
|
||||
<menu key="submenu" title="View" id="296">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="297">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="298"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="19">
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="24">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="23"/>
|
||||
<menuItem title="Zoom" id="239"/>
|
||||
<menuItem isSeparatorItem="YES" id="92">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Bring All to Front" id="5"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="103">
|
||||
<menu key="submenu" title="Help" id="106">
|
||||
<items>
|
||||
<menuItem title="NewApplication Help" keyEquivalent="?" id="111"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="335" y="390" width="740" height="645"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
|
||||
<view key="contentView" identifier="windowView" id="372">
|
||||
<rect key="frame" x="0.0" y="0.0" width="740" height="645"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<slider verticalHuggingPriority="750" id="0rG-H7-LSc">
|
||||
<rect key="frame" x="328" y="588" width="96" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<sliderCell key="cell" state="on" alignment="left" maxValue="2" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="hyE-T9-DMs"/>
|
||||
</slider>
|
||||
<customView id="KqU-it-6gi">
|
||||
<rect key="frame" x="30" y="36" width="693" height="540"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<datePicker verticalHuggingPriority="750" id="UiJ-XK-J0X">
|
||||
<rect key="frame" x="20" y="372" width="139" height="148"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<datePickerCell key="cell" borderStyle="bezel" alignment="left" datePickerStyle="clockAndCalendar" id="oYz-4k-Caq">
|
||||
<font key="font" metaFont="system"/>
|
||||
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
|
||||
<!--1982-02-12 08:00:00 -0800-->
|
||||
<timeZone key="timeZone" name="US/Pacific">
|
||||
<data key="data">
|
||||
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
|
||||
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
|
||||
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
|
||||
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
|
||||
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
|
||||
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
|
||||
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
|
||||
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
|
||||
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
|
||||
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
|
||||
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
|
||||
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
|
||||
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
|
||||
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
|
||||
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
|
||||
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
|
||||
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
|
||||
</data>
|
||||
</timeZone>
|
||||
</calendarDate>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
</datePickerCell>
|
||||
</datePicker>
|
||||
<customView id="MuA-Xs-FkI">
|
||||
<rect key="frame" x="200" y="109" width="400" height="411"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<datePicker verticalHuggingPriority="750" id="cQh-do-9X1">
|
||||
<rect key="frame" x="241" y="190" width="139" height="148"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<datePickerCell key="cell" borderStyle="bezel" alignment="left" datePickerStyle="clockAndCalendar" id="6aD-rc-32L">
|
||||
<font key="font" metaFont="system"/>
|
||||
<calendarDate key="date" timeIntervalSinceReferenceDate="-595929600" calendarFormat="%Y-%m-%d %H:%M:%S %z">
|
||||
<!--1982-02-12 08:00:00 -0800-->
|
||||
<timeZone key="timeZone" name="US/Pacific">
|
||||
<data key="data">
|
||||
VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ
|
||||
y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ
|
||||
5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g
|
||||
8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ
|
||||
AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg
|
||||
DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ
|
||||
HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g
|
||||
KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ
|
||||
OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg
|
||||
Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ
|
||||
VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg
|
||||
Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ
|
||||
cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg
|
||||
f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
|
||||
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
|
||||
AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA
|
||||
AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA
|
||||
</data>
|
||||
</timeZone>
|
||||
</calendarDate>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
</datePickerCell>
|
||||
</datePicker>
|
||||
<button identifier="test" verticalHuggingPriority="750" id="kCk-Gb-Apt">
|
||||
<rect key="frame" x="125" y="132" width="82" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="3D8-ye-1PS">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<customView id="L6g-ww-Qo6">
|
||||
<rect key="frame" x="20" y="29" width="360" height="96"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" id="zCA-96-TBV">
|
||||
<rect key="frame" x="139" y="55" width="82" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="UHh-JP-smr">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<button id="8dh-T6-kWf">
|
||||
<rect key="frame" x="18" y="39" width="61" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="cEU-mp-xT9">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<segmentedControl verticalHuggingPriority="750" id="SpP-qi-A6h">
|
||||
<rect key="frame" x="128" y="32" width="104" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<segmentedCell key="cell" alignment="left" style="rounded" trackingMode="selectOne" id="ORl-FV-Pbr">
|
||||
<font key="font" metaFont="system"/>
|
||||
<segments>
|
||||
<segment width="32"/>
|
||||
<segment width="32" selected="YES" tag="1"/>
|
||||
<segment width="32">
|
||||
<nil key="label"/>
|
||||
</segment>
|
||||
</segments>
|
||||
</segmentedCell>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="backgroundColor">
|
||||
<color key="value" red="0.67494462900357044" green="0.89642068614130432" blue="0.51729022313050843" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</customView>
|
||||
<slider verticalHuggingPriority="750" id="PdA-7g-I0T">
|
||||
<rect key="frame" x="214" y="139" width="96" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<sliderCell key="cell" state="on" alignment="left" maxValue="2" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="p1x-Ct-qda"/>
|
||||
</slider>
|
||||
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" id="Yhe-4C-Snk">
|
||||
<rect key="frame" x="13" y="190" width="214" height="148"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<clipView key="contentView" id="iDa-0p-kr3">
|
||||
<rect key="frame" x="1" y="17" width="212" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="Gfx-oH-stQ" id="JIg-wG-gFe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="212" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<size key="intercellSpacing" width="3" height="2"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
|
||||
<tableColumns>
|
||||
<tableColumn width="116" minWidth="40" maxWidth="1000" id="Vc1-FO-Knt">
|
||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</tableHeaderCell>
|
||||
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="d1b-GC-LvO">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
</tableColumn>
|
||||
<tableColumn width="90" minWidth="40" maxWidth="1000" id="lw1-SV-ry2">
|
||||
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" white="0.33333298560000002" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</tableHeaderCell>
|
||||
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="bzA-wp-jw1">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
|
||||
</tableColumn>
|
||||
</tableColumns>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="450" id="Uf9-ni-njQ"/>
|
||||
<outlet property="delegate" destination="450" id="37c-5P-K0h"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="UGZ-Td-EDC">
|
||||
<rect key="frame" x="1" y="119" width="223" height="15"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="37" id="wCh-dh-geC">
|
||||
<rect key="frame" x="224" y="17" width="15" height="102"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<tableHeaderView key="headerView" id="Gfx-oH-stQ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="212" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</tableHeaderView>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="backgroundColor">
|
||||
<color key="value" red="1" green="0.63145461560717586" blue="0.96005873474956727" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</customView>
|
||||
<slider verticalHuggingPriority="750" id="iGg-dc-J0b">
|
||||
<rect key="frame" x="41" y="336" width="96" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<sliderCell key="cell" state="on" alignment="left" maxValue="2" doubleValue="1" tickMarkPosition="above" sliderType="linear" id="nfM-Jj-R9f"/>
|
||||
</slider>
|
||||
<button verticalHuggingPriority="750" id="6kr-S2-Yjj">
|
||||
<rect key="frame" x="48" y="275" width="82" height="32"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="push" title="Button" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="laM-gL-mR4">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</subviews>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="backgroundColor">
|
||||
<color key="value" red="0.3742909952084108" green="0.62396748378507239" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</customView>
|
||||
</subviews>
|
||||
</view>
|
||||
</window>
|
||||
<customObject id="450" customClass="AppController">
|
||||
<connections>
|
||||
<action selector="button1:" destination="6kr-S2-Yjj" id="Pve-Lr-CPH"/>
|
||||
<action selector="button2:" destination="kCk-Gb-Apt" id="x3y-Pm-gbK"/>
|
||||
<action selector="button3:" destination="zCA-96-TBV" id="oNM-vV-usu"/>
|
||||
<action selector="slider1:" destination="0rG-H7-LSc" id="3C8-Q2-cVW"/>
|
||||
<action selector="slider2:" destination="iGg-dc-J0b" id="9LF-GH-9cz"/>
|
||||
<action selector="slider3:" destination="PdA-7g-I0T" id="ZxU-eU-xaI"/>
|
||||
<outlet property="sliderView1" destination="0rG-H7-LSc" id="yMb-kl-dDl"/>
|
||||
<outlet property="sliderView2" destination="iGg-dc-J0b" id="ML6-DJ-jQX"/>
|
||||
<outlet property="theWindow" destination="371" id="459"/>
|
||||
<outlet property="view1" destination="KqU-it-6gi" id="HHu-Te-ehB"/>
|
||||
<outlet property="view2" destination="MuA-Xs-FkI" id="6S2-Zn-fLG"/>
|
||||
<outlet property="view3" destination="L6g-ww-Qo6" id="qCc-Rs-Inc"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
</objects>
|
||||
<classes>
|
||||
<class className="AppController" superclassName="NSObject">
|
||||
<source key="sourceIdentifier" type="project" relativePath="./Classes/AppController.h"/>
|
||||
<relationships>
|
||||
<relationship kind="action" name="button1:"/>
|
||||
<relationship kind="action" name="button2:"/>
|
||||
<relationship kind="action" name="button3:"/>
|
||||
<relationship kind="action" name="slider1:"/>
|
||||
<relationship kind="action" name="slider2:"/>
|
||||
<relationship kind="action" name="slider3:"/>
|
||||
<relationship kind="outlet" name="sliderView1" candidateClass="NSSlider"/>
|
||||
<relationship kind="outlet" name="sliderView2" candidateClass="NSSlider"/>
|
||||
<relationship kind="outlet" name="theWindow" candidateClass="NSWindow"/>
|
||||
<relationship kind="outlet" name="view1" candidateClass="NSView"/>
|
||||
<relationship kind="outlet" name="view2" candidateClass="NSView"/>
|
||||
<relationship kind="outlet" name="view3" candidateClass="NSView"/>
|
||||
</relationships>
|
||||
</class>
|
||||
</classes>
|
||||
</document>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -0,0 +1,112 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!--
|
||||
index-debug.html
|
||||
ScalingTest
|
||||
|
||||
Created by You on July 23, 2013.
|
||||
Copyright 2013, Your Company All rights reserved.
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!--[if lte IE 8]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<![endif]-->
|
||||
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="apple-touch-icon" href="Resources/icon.png">
|
||||
<link rel="apple-touch-startup-image" href="Resources/default.png">
|
||||
|
||||
<title>ScalingTest</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
OBJJ_MAIN_FILE = "main.j";
|
||||
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"];
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="Frameworks/Debug/Objective-J/Objective-J.js" charset="UTF-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
objj_msgSend_reset();
|
||||
|
||||
// DEBUG OPTIONS:
|
||||
|
||||
// Uncomment to enable printing of backtraces on exceptions:
|
||||
//objj_msgSend_decorate(objj_backtrace_decorator);
|
||||
|
||||
// Uncomment to supress exceptions that take place inside a message
|
||||
//objj_msgSend_decorate(objj_supress_exceptions_decorator)
|
||||
|
||||
// Uncomment to enable runtime type checking:
|
||||
//objj_msgSend_decorate(objj_typecheck_decorator);
|
||||
|
||||
// Uncomment (along with both above) to print backtraces on type check errors:
|
||||
//objj_typecheck_prints_backtrace = true;
|
||||
|
||||
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
|
||||
//CPLogUnregister(CPLogDefault);
|
||||
|
||||
// Uncomment to enable a specific logger:
|
||||
//CPLogRegister(CPLogConsole);
|
||||
//CPLogRegister(CPLogPopup);
|
||||
|
||||
// Tag view DOM elements with a "data-cappuccino-view" attribute that contains
|
||||
// the class name of the view that created them. Comment this or set to false to disable.
|
||||
appkit_tag_dom_elements = true;
|
||||
</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="cappuccino-body">
|
||||
<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 ScalingTest...</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-project.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>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!--
|
||||
index.html
|
||||
ScalingTest
|
||||
|
||||
Created by You on July 23, 2013.
|
||||
Copyright 2013, Your Company All rights reserved.
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<!--[if lte IE 8]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
|
||||
<![endif]-->
|
||||
<!--[if gte IE 9]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<![endif]-->
|
||||
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="apple-touch-icon" href="Resources/icon.png">
|
||||
<link rel="apple-touch-startup-image" href="Resources/default.png">
|
||||
|
||||
<title>ScalingTest</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
OBJJ_MAIN_FILE = "main.j";
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></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="cappuccino-body">
|
||||
<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 ScalingTest...</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-project.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>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* AppController.j
|
||||
* ScalingTest
|
||||
*
|
||||
* Created by You on July 23, 2013.
|
||||
* Copyright 2013, Your Company All rights reserved.
|
||||
*/
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
@import <AppKit/AppKit.j>
|
||||
|
||||
@import "AppController.j"
|
||||
|
||||
|
||||
function main(args, namedArgs)
|
||||
{
|
||||
CPApplicationMain(args, namedArgs);
|
||||
}
|
||||
@@ -53,6 +53,10 @@ var NSViewAutoresizingMask = 0x3F,
|
||||
_superview = [aCoder decodeObjectForKey:@"NSSuperview"];
|
||||
_subviews = [aCoder decodeObjectForKey:@"NSSubviews"];
|
||||
|
||||
_hierarchyScaleSize = CGSizeMake(1.0 , 1.0);
|
||||
_scaleSize = CGSizeMake(1.0, 1.0);
|
||||
_isScaled = NO;
|
||||
|
||||
if (!_subviews)
|
||||
_subviews = [];
|
||||
|
||||
@@ -69,7 +73,7 @@ var NSViewAutoresizingMask = 0x3F,
|
||||
_themeAttributes = {};
|
||||
_themeState = CPThemeStateNormal;
|
||||
[self _loadThemeAttributes];
|
||||
|
||||
|
||||
if ([aCoder containsValueForKey:@"NSReuseIdentifierKey"])
|
||||
_identifier = [aCoder decodeObjectForKey:@"NSReuseIdentifierKey"];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user