diff --git a/AppKit/CPAnimation.j b/AppKit/CPAnimation.j index 77ef2b4c4..c79f1e2bb 100644 --- a/AppKit/CPAnimation.j +++ b/AppKit/CPAnimation.j @@ -123,23 +123,29 @@ ACTUAL_FRAME_RATE = 0; - (void)setAnimationCurve:(CPAnimationCurve)anAnimationCurve { var timingFunctionName; + switch (anAnimationCurve) { - case CPAnimationEaseInOut: timingFunctionName = kCAMediaTimingFunctionEaseInEaseOut; - break; + case CPAnimationEaseInOut: + timingFunctionName = kCAMediaTimingFunctionEaseInEaseOut; + break; - case CPAnimationEaseIn: timingFunctionName = kCAMediaTimingFunctionEaseIn; - break; + case CPAnimationEaseIn: + timingFunctionName = kCAMediaTimingFunctionEaseIn; + break; - case CPAnimationEaseOut: timingFunctionName = kCAMediaTimingFunctionEaseOut; - break; + case CPAnimationEaseOut: + timingFunctionName = kCAMediaTimingFunctionEaseOut; + break; - case CPAnimationLinear: timingFunctionName = kCAMediaTimingFunctionLinear; - break; + case CPAnimationLinear: + timingFunctionName = kCAMediaTimingFunctionLinear; + break; - default: [CPException raise:CPInvalidArgumentException - reason:"Invalid value provided for animation curve"]; - break; + default: + [CPException raise:CPInvalidArgumentException + reason:@"Invalid value provided for animation curve"]; + break; } _animationCurve = anAnimationCurve; diff --git a/AppKit/CPWindow/_CPWindow.j b/AppKit/CPWindow/_CPWindow.j index 890e9e94a..016e03696 100644 --- a/AppKit/CPWindow/_CPWindow.j +++ b/AppKit/CPWindow/_CPWindow.j @@ -198,6 +198,10 @@ var CPWindowActionMessageKeys = [ BOOL _isFullPlatformWindow; _CPWindowFullPlatformWindowSession _fullPlatformWindowSession; + CPWindow _parentWindow; + CPArray _childWindows; + CPWindowOrderingMode _childOrdering @accessors(setter=_setChildOrdering); + CPDictionary _sheetContext; CPWindow _parentView; BOOL _isSheet; @@ -259,6 +263,10 @@ CPTexturedBackgroundWindowMask _acceptsMouseMovedEvents = YES; _isMovable = YES; + _parentWindow = nil; + _childWindows = []; + _childOrdering = CPWindowOut; + _isSheet = NO; _sheetContext = nil; _parentView = nil; @@ -663,10 +671,12 @@ CPTexturedBackgroundWindowMask else { var origin = _frame.origin, - newOrigin = aFrame.origin; + newOrigin = aFrame.origin, + originMoved = !_CGPointEqualToPoint(origin, newOrigin); - if (!_CGPointEqualToPoint(origin, newOrigin)) + if (originMoved) { + delta = _CGPointMake(newOrigin.x - origin.x, newOrigin.y - origin.y); origin.x = newOrigin.x; origin.y = newOrigin.y; @@ -699,9 +709,22 @@ CPTexturedBackgroundWindowMask if ([self _sharesChromeWithPlatformWindow]) [_platformWindow setContentRect:_frame]; + + if (originMoved) + [self _moveChildWindows:delta]; } } +- (void)_moveChildWindows:(CGPoint)delta +{ + [_childWindows enumerateObjectsUsingBlock:function(childWindow) + { + var origin = [childWindow frame].origin; + + [childWindow setFrameOrigin:_CGPointMake(origin.x + delta.x, origin.y + delta.y)]; + }]; +} + /*! Sets the window's frame rect. @param aFrame - The new CGRect of the window. @@ -748,6 +771,11 @@ CPTexturedBackgroundWindowMask @param aSender the object that requested this */ - (void)orderFront:(id)aSender +{ + [self orderWindow:CPWindowAbove relativeTo:0]; +} + +- (void)_orderFront { #if PLATFORM(DOM) // -dw- if a sheet is clicked, the parent window should come up too @@ -775,7 +803,12 @@ CPTexturedBackgroundWindowMask */ - (void)orderBack:(id)aSender { - //[_platformWindow order:CPWindowBelow + [self orderWindow:CPWindowBelow relativeTo:0]; +} + +- (void)_orderBack +{ + // FIXME: Implement this } /*! @@ -783,6 +816,11 @@ CPTexturedBackgroundWindowMask @param the object that requested this */ - (void)orderOut:(id)aSender +{ + [self orderWindow:CPWindowOut relativeTo:0]; +} + +- (void)_orderOut { if ([self isSheet]) { @@ -791,15 +829,13 @@ CPTexturedBackgroundWindowMask return; } + [_parentWindow removeChildWindow:self]; + [_childWindows makeObjectsPerformSelector:@selector(_orderOut)]; + #if PLATFORM(DOM) if ([self _sharesChromeWithPlatformWindow]) [_platformWindow orderOut:self]; -#endif - if ([_delegate respondsToSelector:@selector(windowWillClose:)]) - [_delegate windowWillClose:self]; - -#if PLATFORM(DOM) [_platformWindow order:CPWindowOut window:self relativeTo:nil]; #endif @@ -808,13 +844,20 @@ CPTexturedBackgroundWindowMask /*! Relocates the window in the screen list. - @param aPlace the positioning relative to \c otherWindowNumber + @param orderingMode the positioning relative to \c otherWindowNumber @param otherWindowNumber the window relative to which the receiver should be placed */ -- (void)orderWindow:(CPWindowOrderingMode)aPlace relativeTo:(int)otherWindowNumber +- (void)orderWindow:(CPWindowOrderingMode)orderingMode relativeTo:(int)otherWindowNumber { + if (orderingMode === CPWindowOut) + [self _orderOut]; + else if (orderingMode === CPWindowAbove && otherWindowNumber === 0) + [self _orderFront]; + else if (orderingMode === CPWindowBelow && otherWindowNumber === 0) + [self _orderBack]; #if PLATFORM(DOM) - [_platformWindow order:aPlace window:self relativeTo:CPApp._windows[otherWindowNumber]]; + else + [_platformWindow order:orderingMode window:self relativeTo:CPApp._windows[otherWindowNumber]]; #endif } @@ -1617,7 +1660,7 @@ CPTexturedBackgroundWindowMask var theWindow = [anEvent window], selector = type == CPRightMouseDown ? @selector(rightMouseDown:) : @selector(mouseDown:); - if ([theWindow isKeyWindow] || [theWindow becomesKeyOnlyIfNeeded] && ![_leftMouseDownView needsPanelToBecomeKey]) + if ([theWindow isKeyWindow] || ([theWindow becomesKeyOnlyIfNeeded] && ![_leftMouseDownView needsPanelToBecomeKey])) return [_leftMouseDownView performSelector:selector withObject:anEvent]; else { @@ -2107,6 +2150,9 @@ CPTexturedBackgroundWindowMask */ - (void)close { + if ([_delegate respondsToSelector:@selector(windowWillClose:)]) + [_delegate windowWillClose:self]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPWindowWillCloseNotification object:self]; [self orderOut:nil]; @@ -2315,6 +2361,54 @@ CPTexturedBackgroundWindowMask */ } +/*! + Do NOT modify the array returned by this method! +*/ +- (CPArray)childWindows +{ + return _childWindows; +} + +- (void)addChildWindow:(CPWindow)childWindow ordered:(CPWindowOrderingMode)orderingMode +{ + // Don't add the child if it is already in our list + if ([_childWindows indexOfObject:childWindow] >= 0) + return; + + if (orderingMode === CPWindowAbove || orderingMode === CPWindowBelow) + [_childWindows addObject:childWindow]; + else + [CPException raise:CPInvalidArgumentException + reason:_cmd + @" unrecognized ordering mode " + orderingMode]; + + [childWindow setParentWindow:self]; + [childWindow _setChildOrdering:orderingMode]; + + if ([self isVisible] && ![childWindow isVisible]) + [childWindow orderWindow:orderingMode relativeTo:_windowNumber]; +} + +- (void)removeChildWindow:(CPWindow)childWindow +{ + var index = [_childWindows indexOfObject:childWindow]; + + if (index === CPNotFound) + return; + + [_childWindows removeObjectAtIndex:index]; + [childWindow setParentWindow:nil]; +} + +- (CPWindow)parentWindow +{ + return _parentWindow; +} + +- (CPWindow)setParentWindow:(CPWindow)parentWindow +{ + _parentWindow = parentWindow; +} + - (void)_setFrame:(CGRect)aFrame delegate:(id)delegate duration:(int)duration curve:(CPAnimationCurve)curve { [_frameAnimation stopAnimation]; diff --git a/AppKit/CPWindow/_CPWindowView.j b/AppKit/CPWindow/_CPWindowView.j index 4266085ce..beede5298 100644 --- a/AppKit/CPWindow/_CPWindowView.j +++ b/AppKit/CPWindow/_CPWindowView.j @@ -453,8 +453,8 @@ _CPWindowViewResizeSlop = 3; else if (type === CPLeftMouseDragged) { - var diffX = globalLocation.x - _mouseDraggedPoint.x, - diffY = globalLocation.y - _mouseDraggedPoint.y, + var deltaX = globalLocation.x - _mouseDraggedPoint.x, + deltaY = globalLocation.y - _mouseDraggedPoint.y, newX = _CGRectGetMinX(_resizeFrame), newY = _CGRectGetMinY(_resizeFrame), newWidth = _CGRectGetWidth(_resizeFrame), @@ -469,19 +469,19 @@ _CPWindowViewResizeSlop = 3; case _CPWindowViewResizeRegionTopLeft: case _CPWindowViewResizeRegionLeft: case _CPWindowViewResizeRegionBottomLeft: - if (minSize && diffX > 0) - diffX = MIN(newWidth - minSize.width, diffX); - else if (maxSize && diffX < 0) - diffX = MAX(newWidth - maxSize.width, diffX); + if (minSize && deltaX > 0) + deltaX = MIN(newWidth - minSize.width, deltaX); + else if (maxSize && deltaX < 0) + deltaX = MAX(newWidth - maxSize.width, deltaX); - newX += diffX, - newWidth -= diffX; + newX += deltaX, + newWidth -= deltaX; break; case _CPWindowViewResizeRegionTopRight: case _CPWindowViewResizeRegionRight: case _CPWindowViewResizeRegionBottomRight: - newWidth += diffX; + newWidth += deltaX; break; } @@ -491,19 +491,19 @@ _CPWindowViewResizeSlop = 3; case _CPWindowViewResizeRegionTopLeft: case _CPWindowViewResizeRegionTop: case _CPWindowViewResizeRegionTopRight: - if (minSize && diffY > 0) - diffY = MIN(newHeight - minSize.height, diffY); - else if (maxSize && diffY < 0) - diffY = MAX(newHeight - maxSize.height, diffY); + if (minSize && deltaY > 0) + deltaY = MIN(newHeight - minSize.height, deltaY); + else if (maxSize && deltaY < 0) + deltaY = MAX(newHeight - maxSize.height, deltaY); - newY += diffY, - newHeight -= diffY; + newY += deltaY, + newHeight -= deltaY; break; case _CPWindowViewResizeRegionBottomLeft: case _CPWindowViewResizeRegionBottom: case _CPWindowViewResizeRegionBottomRight: - newHeight += diffY; + newHeight += deltaY; break; } @@ -566,8 +566,10 @@ _CPWindowViewResizeSlop = 3; var theWindow = [self window], frame = [theWindow frame], location = [theWindow convertBaseToGlobal:[anEvent locationInWindow]], - origin = [self _pointWithinScreenFrame:_CGPointMake(_CGRectGetMinX(frame) + (location.x - _mouseDraggedPoint.x), - _CGRectGetMinY(frame) + (location.y - _mouseDraggedPoint.y))]; + deltaX = location.x - _mouseDraggedPoint.x, + deltaY = location.y - _mouseDraggedPoint.y, + origin = [self _pointWithinScreenFrame:_CGPointMake(frame.origin.x + deltaX, + frame.origin.y + deltaY)]; [theWindow setFrameOrigin:origin]; _mouseDraggedPoint = [self _pointWithinScreenFrame:location]; diff --git a/AppKit/Platform/DOM/CPDOMWindowLayer.j b/AppKit/Platform/DOM/CPDOMWindowLayer.j index a919dcff6..ad6a76e4e 100644 --- a/AppKit/Platform/DOM/CPDOMWindowLayer.j +++ b/AppKit/Platform/DOM/CPDOMWindowLayer.j @@ -82,7 +82,7 @@ { // We will have to adjust the z-index of all windows starting at this index. var count = [_windows count], - zIndex = (anIndex == CPNotFound ? count : anIndex), + zIndex = (anIndex === CPNotFound ? count : anIndex), isVisible = aWindow._isVisible; // If the window is already a resident of this layer, remove it. @@ -94,7 +94,7 @@ else ++count; - if (anIndex == CPNotFound || anIndex >= count) + if (anIndex === CPNotFound || anIndex >= count) [_windows addObject:aWindow]; else [_windows insertObject:aWindow atIndex:anIndex]; @@ -113,7 +113,7 @@ aWindow._isVisible = YES; - if ([aWindow isFullBridge]) + if ([aWindow isFullPlatformWindow]) [aWindow setFrame:[aWindow._platformWindow usableContentFrame]]; } } diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index e67c3b7ff..5be94f802 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -284,7 +284,7 @@ var resizeTimer = nil; } } -- (void)orderBack:(id)aSender +- (void)orderBack:(CPWindow)aWindow { if (_DOMWindow) _DOMWindow.blur(); @@ -541,8 +541,11 @@ var resizeTimer = nil; return PlatformWindows; } -- (void)orderFront:(id)aSender +- (void)orderFront:(CPWindow)aWindow { + if ([aWindow parentWindow]) + return; + if (_DOMWindow) return _DOMWindow.focus(); @@ -571,7 +574,7 @@ var resizeTimer = nil; _DOMBodyElement.style.cursor = [[CPCursor currentCursor] _cssString]; } -- (void)orderOut:(id)aSender +- (void)orderOut:(CPWindow)aWindow { if (!_DOMWindow) return; @@ -1399,26 +1402,116 @@ var resizeTimer = nil; return layer; } -- (void)order:(CPWindowOrderingMode)aPlace window:(CPWindow)aWindow relativeTo:(CPWindow)otherWindow +- (void)order:(CPWindowOrderingMode)orderingMode window:(CPWindow)aWindow relativeTo:(CPWindow)otherWindow { [CPPlatform initializeScreenIfNecessary]; // Grab the appropriate level for the layer, and create it if // necessary (if we are not simply removing the window). - var layer = [self layerAtLevel:[aWindow level] create:aPlace !== CPWindowOut]; + var layer = [self layerAtLevel:[aWindow level] create:orderingMode !== CPWindowOut]; - // Ignore otherWindow, simply remove this window from it's level. + // When ordering out, ignore otherWindow, simply remove aWindow from its level. // If layer is nil, this will be a no-op. - if (aPlace === CPWindowOut) + if (orderingMode === CPWindowOut) return [layer removeWindow:aWindow]; + /* + If aWindow is a child of otherWindow and is not yet visible, + aWindow must actually be ordered relative to: + + - otherWindow's last child which is not aWindow, or + - the furthest parent of aWindow + + whichever is frontmost (orderingMode === CPWindowAbove) or rearmost + (orderingMode === CPWindowBelow). + */ + + if (![aWindow isVisible] && otherWindow && [aWindow parentWindow] === otherWindow) + { + var children = [otherWindow childWindows], + lastChild = [children lastObject]; + + if (lastChild === aWindow) + { + if ([children count] > 1) + otherWindow = [children objectAtIndex:[children count] - 2]; + } + else if (lastChild) + otherWindow = lastChild; + + var furthestParent = [self _furthestParentOf:otherWindow]; + + if ((orderingMode === CPWindowAbove && furthestParent._index > otherWindow._index) || + (orderingMode === CPWindowBelow && furthestParent._index < otherWindow._index)) + otherWindow = furthestParent; + } + + /* + If a child window is ordered front, the furthest parent is actually + the one that is ordered front, and all of the descendent children + are ordered after it. + */ + else if (orderingMode === CPWindowAbove && !otherWindow) + aWindow = [self _furthestParentOf:aWindow]; + var insertionIndex = CPNotFound; if (otherWindow) - insertionIndex = aPlace === CPWindowAbove ? otherWindow._index + 1 : otherWindow._index; + insertionIndex = orderingMode === CPWindowAbove ? otherWindow._index + 1 : otherWindow._index; // Place the window at the appropriate index. [layer insertWindow:aWindow atIndex:insertionIndex]; + + // If aWindow is a parent, recursively order all of its children after it + if ([[aWindow childWindows] count]) + [self _orderChildWindowsOf:aWindow furthestParent:[self _furthestParentOf:aWindow] layer:layer]; +} + +- (CPWindow)_furthestParentOf:(CPWindow)aWindow +{ + var parent; + + while ((parent = [aWindow parentWindow])) + aWindow = parent; + + return aWindow; +} + +- (int)_orderChildWindowsOf:(CPWindow)aWindow furthestParent:(CPWindow)furthestParent layer:(CPDOMWindowLayer)aLayer +{ + // When a parent window is ordered, Cocoa orders its child windows + // relative to it or the furthest parent. + var children = [aWindow childWindows], + count = [children count], + parent = aWindow, + index; + + for (var i = 0; i < count; ++i) + { + var child = children[i]; + + if (![child isVisible]) + continue; + + var ordering = [child _childOrdering]; + + if ((ordering === CPWindowAbove && furthestParent._index > parent._index) || + (ordering === CPWindowBelow && furthestParent._index < parent._index)) + parent = furthestParent; + + index = ordering === CPWindowAbove ? parent._index : parent._index - 1; + + [aLayer insertWindow:child atIndex:index]; + + if ([[child childWindows] count]) + index = [self _orderChildWindowsOf:child furthestParent:furthestParent layer:aLayer]; + else + index = [child _childOrdering] === CPWindowAbove ? child._index : child._index - 1; + + parent = child; + } + + return index; } - (void)_removeLayers diff --git a/Tests/Manual/ChildWindows/AppController.j b/Tests/Manual/ChildWindows/AppController.j new file mode 100644 index 000000000..b6837848c --- /dev/null +++ b/Tests/Manual/ChildWindows/AppController.j @@ -0,0 +1,37 @@ +/* + * AppController.j + * ChildWindows + * + * Created by You on January 17, 2013. + * Copyright 2013, Your Company All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + @outlet CPWindow parent; + @outlet CPWindow child; + @outlet CPWindow grandchild; + @outlet CPWindow other; +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ + [parent addChildWindow:child ordered:CPWindowAbove]; + [child addChildWindow:grandchild ordered:CPWindowBelow]; + + [other orderFront:self]; + [parent orderFront:self]; +} + +- (@action)move:(id)sender +{ + var origin = [[sender window] frame].origin, + newOrigin = CGPointMake(origin.x + 20, origin.y + 20); + + [[sender window] setFrameOrigin:newOrigin]; +} + +@end diff --git a/Tests/Manual/ChildWindows/ChildWindows.xcodeproj/project.pbxproj b/Tests/Manual/ChildWindows/ChildWindows.xcodeproj/project.pbxproj new file mode 100644 index 000000000..d5d7a4e7d --- /dev/null +++ b/Tests/Manual/ChildWindows/ChildWindows.xcodeproj/project.pbxproj @@ -0,0 +1,500 @@ + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 0AF74EFC9A920DFF170E38ED + + children + + FDAB46DEBA3FCECEBACF597D + 4D954F6889E4AF7ECD2955EE + 911D41BBBEC5022E7FE88960 + + isa + PBXGroup + name + Classes + sourceTree + <group> + + 4D954F6889E4AF7ECD2955EE + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + _Users_aparajita_Development_Projects_Clients_SlevenBits_cappuccino_Tests_Manual_ChildWindows_AppController.h + path + .XcodeSupport/_Users_aparajita_Development_Projects_Clients_SlevenBits_cappuccino_Tests_Manual_ChildWindows_AppController.h + sourceTree + SOURCE_ROOT + + 6949447C9F5AEB0551AC5495 + + isa + PBXFileReference + lastKnownFileType + ? + name + AppController.j + path + AppController.j + sourceTree + SOURCE_ROOT + + 911D41BBBEC5022E7FE88960 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + _Users_aparajita_Development_Projects_Clients_SlevenBits_cappuccino_Tests_Manual_ChildWindows_AppController.m + path + .XcodeSupport/_Users_aparajita_Development_Projects_Clients_SlevenBits_cappuccino_Tests_Manual_ChildWindows_AppController.m + sourceTree + SOURCE_ROOT + + 94AA4B948739AA205B2E5434 + + fileRef + 911D41BBBEC5022E7FE88960 + isa + PBXBuildFile + + 9EEC4488135749D200615446 + + children + + 9EEC44CB13574A0B00615446 + 9EEC4496135749D200615446 + 0AF74EFC9A920DFF170E38ED + BD4D45AF8334AF37B29B9174 + + isa + PBXGroup + sourceTree + <group> + + 9EEC448A135749D200615446 + + attributes + + LastUpgradeCheck + 0440 + ORGANIZATIONNAME + 280 North, Inc. + + buildConfigurationList + 9EEC448D135749D200615446 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + + mainGroup + 9EEC4488135749D200615446 + productRefGroup + 9EEC4494135749D200615446 + projectDirPath + + projectRoot + + targets + + 9EEC4492135749D200615446 + + + 9EEC448D135749D200615446 + + buildConfigurations + + 9EEC44C3135749D300615446 + 9EEC44C4135749D300615446 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 9EEC448F135749D200615446 + + buildActionMask + 2147483647 + files + + 94AA4B948739AA205B2E5434 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 9EEC4490135749D200615446 + + buildActionMask + 2147483647 + files + + 9EEC4498135749D200615446 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 9EEC4491135749D200615446 + + buildActionMask + 2147483647 + files + + 9EEC44CC13574A0B00615446 + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 9EEC4492135749D200615446 + + buildConfigurationList + 9EEC44C5135749D300615446 + buildPhases + + 9EEC448F135749D200615446 + 9EEC4490135749D200615446 + 9EEC4491135749D200615446 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Another + productName + Another + productReference + 9EEC4493135749D200615446 + productType + com.apple.product-type.application + + 9EEC4493135749D200615446 + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + Another.app + sourceTree + BUILT_PRODUCTS_DIR + + 9EEC4494135749D200615446 + + children + + 9EEC4493135749D200615446 + + isa + PBXGroup + name + Products + sourceTree + <group> + + 9EEC4496135749D200615446 + + children + + 9EEC4497135749D200615446 + 9EEC4499135749D300615446 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 9EEC4497135749D200615446 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Cocoa.framework + path + System/Library/Frameworks/Cocoa.framework + sourceTree + SDKROOT + + 9EEC4498135749D200615446 + + fileRef + 9EEC4497135749D200615446 + isa + PBXBuildFile + + 9EEC4499135749D300615446 + + children + + 9EEC449A135749D300615446 + 9EEC449B135749D300615446 + 9EEC449C135749D300615446 + + isa + PBXGroup + name + Other Frameworks + sourceTree + <group> + + 9EEC449A135749D300615446 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + AppKit.framework + path + System/Library/Frameworks/AppKit.framework + sourceTree + SDKROOT + + 9EEC449B135749D300615446 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + CoreData.framework + path + System/Library/Frameworks/CoreData.framework + sourceTree + SDKROOT + + 9EEC449C135749D300615446 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + System/Library/Frameworks/Foundation.framework + sourceTree + SDKROOT + + 9EEC44C3135749D300615446 + + buildSettings + + ARCHS + $(ARCHS_STANDARD_32_64_BIT) + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS + DEBUG + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNUSED_VARIABLE + YES + MACOSX_DEPLOYMENT_TARGET + 10.6 + ONLY_ACTIVE_ARCH + YES + SDKROOT + macosx + + isa + XCBuildConfiguration + name + Debug + + 9EEC44C4135749D300615446 + + buildSettings + + ARCHS + $(ARCHS_STANDARD_32_64_BIT) + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNUSED_VARIABLE + YES + MACOSX_DEPLOYMENT_TARGET + 10.6 + SDKROOT + macosx + + isa + XCBuildConfiguration + name + Release + + 9EEC44C5135749D300615446 + + buildConfigurations + + 9EEC44C6135749D300615446 + 9EEC44C7135749D300615446 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 9EEC44C6135749D300615446 + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COMBINE_HIDPI_IMAGES + YES + COPY_PHASE_STRIP + NO + GCC_DYNAMIC_NO_PIC + NO + GCC_ENABLE_OBJC_EXCEPTIONS + YES + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Another/Another-Prefix.pch + INFOPLIST_FILE + Another/Another-Info.plist + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + app + + isa + XCBuildConfiguration + name + Debug + + 9EEC44C7135749D300615446 + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COMBINE_HIDPI_IMAGES + YES + COPY_PHASE_STRIP + YES + DEBUG_INFORMATION_FORMAT + dwarf-with-dsym + GCC_ENABLE_OBJC_EXCEPTIONS + YES + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Another/Another-Prefix.pch + INFOPLIST_FILE + Another/Another-Info.plist + PRODUCT_NAME + $(TARGET_NAME) + WRAPPER_EXTENSION + app + + isa + XCBuildConfiguration + name + Release + + 9EEC44CB13574A0B00615446 + + isa + PBXFileReference + lastKnownFileType + folder + name + CappuccinoResources + path + Resources + sourceTree + <group> + + 9EEC44CC13574A0B00615446 + + fileRef + 9EEC44CB13574A0B00615446 + isa + PBXBuildFile + + BD4D45AF8334AF37B29B9174 + + children + + 6949447C9F5AEB0551AC5495 + + isa + PBXGroup + name + Sources + sourceTree + <group> + + FDAB46DEBA3FCECEBACF597D + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + xcc_general_include.h + path + .XcodeSupport/xcc_general_include.h + sourceTree + SOURCE_ROOT + + + rootObject + 9EEC448A135749D200615446 + + diff --git a/Tests/Manual/ChildWindows/ChildWindows.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/Manual/ChildWindows/ChildWindows.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..6de0920af --- /dev/null +++ b/Tests/Manual/ChildWindows/ChildWindows.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Tests/Manual/ChildWindows/Info.plist b/Tests/Manual/ChildWindows/Info.plist new file mode 100644 index 000000000..b912d882b --- /dev/null +++ b/Tests/Manual/ChildWindows/Info.plist @@ -0,0 +1,10 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + ChildWindows + + diff --git a/Tests/Manual/ChildWindows/Jakefile b/Tests/Manual/ChildWindows/Jakefile new file mode 100644 index 000000000..91e834bb8 --- /dev/null +++ b/Tests/Manual/ChildWindows/Jakefile @@ -0,0 +1,94 @@ +/* + * Jakefile + * ChildWindows + * + * Created by You on January 17, 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 ("ChildWindows", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "ChildWindows.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("ChildWindows"); + task.setIdentifier("com.yourcompany.ChildWindows"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("ChildWindows"); + task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setResources(new FileList("Resources/**")); + task.setIndexFilePath("index.html"); + task.setInfoPlistPath("Info.plist"); + task.setNib2CibFlags("-R Resources/"); + + if (configuration === "Debug") + task.setCompilerFlags("-DDEBUG -g"); + else + task.setCompilerFlags("-O"); +}); + +task ("default", ["ChildWindows"], 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", "ChildWindows", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "ChildWindows", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "ChildWindows")); + OS.system(["press", "-f", FILE.join("Build", "Release", "ChildWindows"), FILE.join("Build", "Deployment", "ChildWindows")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "ChildWindows")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "ChildWindows"), FILE.join("Build", "Desktop", "ChildWindows", "ChildWindows.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "ChildWindows", "ChildWindows.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "ChildWindows")); + print("----------------------------"); +} diff --git a/Tests/Manual/ChildWindows/Resources/MainMenu.cib b/Tests/Manual/ChildWindows/Resources/MainMenu.cib new file mode 100644 index 000000000..e0b9e3c7c --- /dev/null +++ b/Tests/Manual/ChildWindows/Resources/MainMenu.cib @@ -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;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;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;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;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;2;34E;D;K;6;CP$UIDd;1;0E;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;1;0E;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;1;0E;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;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;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;11E;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;11E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;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;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;41E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;42E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;43E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;32E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;44E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;35E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;45E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;38E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;46E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;24E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;47E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;41E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;49E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;50E;K;30;_CPCibWindowTemplateWTFlagsKeyD;K;6;CP$UIDd;2;51E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;52E;K;33;_CPCibWindowTemplateScreenRectKeyD;K;6;CP$UIDd;2;53E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;54E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;55E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;26E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;57E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;57E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;58E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;59E;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;27E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;26E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;60E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;26E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;63E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;64E;K;6;$afontD;K;6;CP$UIDd;2;66E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;67E;K;11;$aalignmentD;K;6;CP$UIDd;2;68E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;69E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;70E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;71E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;69E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;2;73E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;67E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;68E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;8;CPButtonK;8;$classesA;S;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;29E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;26E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;74E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;75E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;26E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;76E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;77E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;78E;K;6;$afontD;K;6;CP$UIDd;2;79E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;56E;K;11;$aalignmentD;K;6;CP$UIDd;2;67E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;56E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;68E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;80E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;2;70E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;2;81E;K;23;CPButtonHighlightsByKeyD;K;6;CP$UIDd;2;82E;K;23;CPButtonShowsStateByKeyD;K;6;CP$UIDd;2;56E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;2;69E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;2;67E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;56E;K;24;CPButtonPeriodicDelayKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonPeriodicIntervalKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;83E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;49E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;50E;K;30;_CPCibWindowTemplateWTFlagsKeyD;K;6;CP$UIDd;2;51E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;84E;K;33;_CPCibWindowTemplateScreenRectKeyD;K;6;CP$UIDd;2;53E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;54E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;85E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;33E;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;86E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;86E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;87E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;27E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;33E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;88E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;33E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;63E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;64E;K;6;$afontD;K;6;CP$UIDd;2;66E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;67E;K;11;$aalignmentD;K;6;CP$UIDd;2;68E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;69E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;70E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;71E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;69E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;2;73E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;67E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;68E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;49E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;50E;K;30;_CPCibWindowTemplateWTFlagsKeyD;K;6;CP$UIDd;2;51E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;89E;K;33;_CPCibWindowTemplateScreenRectKeyD;K;6;CP$UIDd;2;53E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;54E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;90E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;36E;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;91E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;91E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;92E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;27E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;93E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;63E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;64E;K;6;$afontD;K;6;CP$UIDd;2;66E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;67E;K;11;$aalignmentD;K;6;CP$UIDd;2;68E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;69E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;70E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;71E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;69E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;2;73E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;67E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;68E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;49E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;50E;K;30;_CPCibWindowTemplateWTFlagsKeyD;K;6;CP$UIDd;2;51E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;94E;K;33;_CPCibWindowTemplateScreenRectKeyD;K;6;CP$UIDd;2;53E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;54E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;95E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;39E;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;57E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;57E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;96E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;27E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;39E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;60E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;39E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;63E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;64E;K;6;$afontD;K;6;CP$UIDd;2;66E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;67E;K;11;$aalignmentD;K;6;CP$UIDd;2;68E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;69E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;70E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;71E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;69E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;69E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;2;73E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;67E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;68E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;24E;E;E;S;8;delegateS;5;childS;10;grandchildS;5;otherS;6;parentS;5;move:S;32;{10000000000000, 10000000000000}S;8;CPWindowd;10;1948778496S;22;{{62, 67}, {207, 169}}S;21;{{0, 0}, {1440, 878}}d;1;7S;6;Parentd;1;0S;20;{{0, 0}, {207, 169}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;E;E;S;6;normalS;21;{{49, 70}, {104, 29}}S;19;{{0, 0}, {104, 29}}d;2;45S;9;textfieldS;28;bezeled+editable+placeholderD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;65E;K;13;CPFontNameKeyD;K;6;CP$UIDd;2;97E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;2;98E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;81E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;81E;K;17;CPFontIsSystemKeyD;K;6;CP$UIDd;2;69E;E;d;1;2d;1;4T;S;0;d;4;3072D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;72E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;2;99E;E;S;20;{{70, 27}, {62, 25}}S;18;{{0, 0}, {62, 25}}d;2;36S;6;buttonS;8;borderedD;K;6;$classD;K;6;CP$UIDd;2;65E;K;13;CPFontNameKeyD;K;6;CP$UIDd;2;97E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;2;98E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;69E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;81E;K;17;CPFontIsSystemKeyD;K;6;CP$UIDd;2;69E;E;S;4;MoveF;d;2;14S;13;AppControllerS;24;{{223, 149}, {303, 169}}S;20;Parent/Child - AboveS;20;{{0, 0}, {303, 169}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;34E;E;E;S;21;{{97, 70}, {104, 29}}S;24;{{484, 110}, {294, 169}}S;24;Child/Grandchild - BelowS;20;{{0, 0}, {294, 169}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;37E;E;E;S;21;{{93, 70}, {104, 29}}S;24;{{182, 370}, {207, 169}}S;5;OtherD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;40E;E;E;S;28;_CPFontSystemFacePlaceholderd;2;-1D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;100E;E;E;d;1;1E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/ChildWindows/Resources/MainMenu.xib b/Tests/Manual/ChildWindows/Resources/MainMenu.xib new file mode 100644 index 000000000..e99dcdc1a --- /dev/null +++ b/Tests/Manual/ChildWindows/Resources/MainMenu.xib @@ -0,0 +1,680 @@ + + + + 1050 + 12C3012 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2844 + + + YES + NSButton + NSButtonCell + NSCustomObject + NSTextField + NSTextFieldCell + NSView + NSWindowTemplate + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{62, 642}, {207, 169}} + 1948778496 + Parent + NSWindow + + + + + 256 + + YES + + + 301 + {{55, 73}, {96, 22}} + + + + YES + + -1804599231 + 272630784 + + + LucidaGrande + 13 + 1044 + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + NO + + + + 268 + {{66, 111}, {74, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Move + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + {207, 169} + + + + + {{0, 0}, {1440, 878}} + {10000000000000, 10000000000000} + YES + + + AppController + + + 7 + 2 + {{223, 560}, {303, 169}} + 1948778496 + Parent/Child - Above + NSWindow + + + + + 256 + + YES + + + 301 + {{103, 73}, {96, 22}} + + + + YES + + -1804599231 + 272630784 + + + + YES + + + + NO + + + {303, 169} + + + + + {{0, 0}, {1440, 878}} + {10000000000000, 10000000000000} + YES + + + 7 + 2 + {{484, 599}, {294, 169}} + 1948778496 + Child/Grandchild - Below + NSWindow + + + + + 256 + + YES + + + 301 + {{99, 73}, {96, 22}} + + + + YES + + -1804599231 + 272630784 + + + + YES + + + + NO + + + {294, 169} + + + + + {{0, 0}, {1440, 878}} + {10000000000000, 10000000000000} + YES + + + 7 + 2 + {{182, 339}, {207, 169}} + 1948778496 + Other + NSWindow + + + + + 256 + + YES + + + 301 + {{55, 73}, {96, 22}} + + + + YES + + -1804599231 + 272630784 + + + + YES + + + + NO + + + {207, 169} + + + + + {{0, 0}, {1440, 878}} + {10000000000000, 10000000000000} + YES + + + + + YES + + + delegate + + + + 451 + + + + child + + + + 468 + + + + grandchild + + + + 469 + + + + parent + + + + 470 + + + + other + + + + 475 + + + + move: + + + + 478 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + 450 + + + + + 456 + + + YES + + + + + + 457 + + + + + 460 + + + YES + + + + + + 461 + + + YES + + + + + + 462 + + + YES + + + + + + 463 + + + + + 464 + + + YES + + + + + + 465 + + + YES + + + + + + 466 + + + YES + + + + + + 467 + + + + + 471 + + + YES + + + + + + 472 + + + YES + + + + + + 473 + + + YES + + + + + + 474 + + + + + 476 + + + YES + + + + + + 477 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 371.IBNSWindowAutoPositionCentersHorizontal + 371.IBNSWindowAutoPositionCentersVertical + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 372.IBPluginDependency + 450.IBPluginDependency + 456.IBPluginDependency + 457.IBPluginDependency + 460.IBNSWindowAutoPositionCentersHorizontal + 460.IBNSWindowAutoPositionCentersVertical + 460.IBPluginDependency + 460.IBWindowTemplateEditedContentRect + 460.NSWindowTemplate.visibleAtLaunch + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 464.IBNSWindowAutoPositionCentersHorizontal + 464.IBNSWindowAutoPositionCentersVertical + 464.IBPluginDependency + 464.IBWindowTemplateEditedContentRect + 464.NSWindowTemplate.visibleAtLaunch + 465.IBPluginDependency + 466.IBPluginDependency + 467.IBPluginDependency + 471.IBNSWindowAutoPositionCentersHorizontal + 471.IBNSWindowAutoPositionCentersVertical + 471.IBPluginDependency + 471.IBWindowTemplateEditedContentRect + 471.NSWindowTemplate.visibleAtLaunch + 472.IBPluginDependency + 473.IBPluginDependency + 474.IBPluginDependency + 476.IBPluginDependency + 477.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 478 + + + + YES + + AppController + NSObject + + move: + id + + + move: + + move: + id + + + + YES + + YES + child + grandchild + other + parent + + + YES + NSWindow + NSWindow + NSWindow + NSWindow + + + + YES + + YES + child + grandchild + other + parent + + + YES + + child + NSWindow + + + grandchild + NSWindow + + + other + NSWindow + + + parent + NSWindow + + + + + IBProjectSource + ./Classes/AppController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/Tests/Manual/ChildWindows/Resources/spinner.gif b/Tests/Manual/ChildWindows/Resources/spinner.gif new file mode 100644 index 000000000..a5e705f6c Binary files /dev/null and b/Tests/Manual/ChildWindows/Resources/spinner.gif differ diff --git a/Tests/Manual/ChildWindows/index-debug.html b/Tests/Manual/ChildWindows/index-debug.html new file mode 100644 index 000000000..0d7b3e2f2 --- /dev/null +++ b/Tests/Manual/ChildWindows/index-debug.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + ChildWindows + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/ChildWindows/index.html b/Tests/Manual/ChildWindows/index.html new file mode 100644 index 000000000..9d778d2dd --- /dev/null +++ b/Tests/Manual/ChildWindows/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + ChildWindows + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/ChildWindows/main.j b/Tests/Manual/ChildWindows/main.j new file mode 100644 index 000000000..ce0e04ccf --- /dev/null +++ b/Tests/Manual/ChildWindows/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * ChildWindows + * + * Created by You on January 17, 2013. + * Copyright 2013, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +}