diff --git a/AppKit/AppKit.j b/AppKit/AppKit.j index 6dd81c956..2a34e76f4 100644 --- a/AppKit/AppKit.j +++ b/AppKit/AppKit.j @@ -21,6 +21,7 @@ */ @import "CALayer.j" +@import "CPAccordionView.j" @import "CPAlert.j" @import "CPAnimation.j" @import "CPApplication.j" @@ -37,14 +38,18 @@ @import "CPCibControlConnector.j" @import "CPCibLoading.j" @import "CPCibOutletConnector.j" +@import "CPCibRuntimeAttributesConnector.j" +@import "CPCibHelpConnector.j" @import "CPClipView.j" @import "CPCollectionView.j" @import "CPCollectionViewItem.j" @import "CPColor.j" @import "CPColorPanel.j" +@import "CPColorSpace.j" @import "CPColorWell.j" @import "CPCompatibility.j" @import "CPControl.j" +@import "CPController.j" @import "CPCookie.j" @import "CPCursor.j" @import "CPDocument.j" @@ -55,6 +60,7 @@ @import "CPFont.j" @import "CPFontManager.j" @import "CPGeometry.j" +@import "CPGradient.j" @import "CPGraphics.j" @import "CPImage.j" @import "CPImageView.j" @@ -99,5 +105,6 @@ @import "CPViewAnimation.j" @import "CPViewController.j" @import "CPWebView.j" +@import "CPWorkspace.j" @import "CPWindow.j" @import "CPWindowController.j" diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 832c06443..fad82a6c2 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -117,21 +117,21 @@ CPCriticalAlertStyle = 2; */ + (CPAlert)alertWithMessageText:(CPString)aMessage defaultButton:(CPString)defaultButtonTitle alternateButton:(CPString)alternateButtonTitle otherButton:(CPString)otherButtonTitle informativeTextWithFormat:(CPString)informativeText { - var alert = [[self alloc] init]; + var newAlert = [[self alloc] init]; - [alert setMessageText:aMessage]; - [alert addButtonWithTitle:defaultButtonTitle]; + [newAlert setMessageText:aMessage]; + [newAlert addButtonWithTitle:defaultButtonTitle]; if (alternateButtonTitle) - [alert addButtonWithTitle:alternateButtonTitle]; + [newAlert addButtonWithTitle:alternateButtonTitle]; if (otherButtonTitle) - [alert addButtonWithTitle:otherButtonTitle]; + [newAlert addButtonWithTitle:otherButtonTitle]; if (informativeText) - [alert setInformativeText:informativeText]; + [newAlert setInformativeText:informativeText]; - return alert; + return newAlert; } /*! @@ -142,12 +142,12 @@ CPCriticalAlertStyle = 2; */ + (CPAlert)alertWithError:(CPString)anErrorMessage { - var alert = [[self alloc] init]; + var newAlert = [[self alloc] init]; - [alert setMessageText:anErrorMessage]; - [alert setAlertStyle:CPCriticalAlertStyle]; + [newAlert setMessageText:anErrorMessage]; + [newAlert setAlertStyle:CPCriticalAlertStyle]; - return alert; + return newAlert; } /*! diff --git a/AppKit/CPAnimation.j b/AppKit/CPAnimation.j index c8321ab7b..148db1f6f 100644 --- a/AppKit/CPAnimation.j +++ b/AppKit/CPAnimation.j @@ -122,6 +122,7 @@ ACTUAL_FRAME_RATE = 0; */ - (void)setAnimationCurve:(CPAnimationCurve)anAnimationCurve { + var timingFunctionName; switch (anAnimationCurve) { case CPAnimationEaseInOut: timingFunctionName = kCAMediaTimingFunctionEaseInEaseOut; diff --git a/AppKit/CPArrayController.j b/AppKit/CPArrayController.j index f8486c4b8..359876612 100644 --- a/AppKit/CPArrayController.j +++ b/AppKit/CPArrayController.j @@ -564,7 +564,7 @@ - (BOOL)setSelectionIndexes:(CPIndexSet)indexes { [self _selectionWillChange] - var r = [self __setSelectionIndexes:indexes]; + var r = [self __setSelectionIndexes:indexes avoidEmpty:NO]; [self _selectionDidChange]; return r; } @@ -583,6 +583,11 @@ @ignore */ - (BOOL)__setSelectionIndexes:(CPIndexSet)indexes +{ + [self __setSelectionIndexes:indexes avoidEmpty:_avoidsEmptySelection]; +} + +- (BOOL)__setSelectionIndexes:(CPIndexSet)indexes avoidEmpty:(BOOL)avoidEmpty { var newIndexes = indexes; @@ -591,7 +596,7 @@ if (![newIndexes count]) { - if (_avoidsEmptySelection && [[self arrangedObjects] count]) + if (avoidEmpty && [[self arrangedObjects] count]) newIndexes = [CPIndexSet indexSetWithIndex:0]; } else @@ -606,7 +611,7 @@ // Remove out of bounds indexes. [newIndexes removeIndexesInRange:CPMakeRange(objectsCount, [newIndexes lastIndex] + 1)]; // When avoiding empty selection and the deleted selection was at the bottom, select the last item. - if (![newIndexes count] && _avoidsEmptySelection && objectsCount) + if (![newIndexes count] && avoidEmpty && objectsCount) newIndexes = [CPIndexSet indexSetWithIndex:objectsCount - 1]; } @@ -647,7 +652,7 @@ [self willChangeValueForKey:@"selectionIndexes"]; [self _selectionWillChange]; - var r = [self __setSelectedObjects:objects]; + var r = [self __setSelectedObjects:objects avoidEmpty:NO]; [self didChangeValueForKey:@"selectionIndexes"]; [self _selectionDidChange]; @@ -659,6 +664,11 @@ @ignore */ - (BOOL)__setSelectedObjects:(CPArray)objects +{ + [self __setSelectedObjects:objects avoidEmpty:_avoidsEmptySelection]; +} + +- (BOOL)__setSelectedObjects:(CPArray)objects avoidEmpty:(BOOL)avoidEmpty { var set = [CPIndexSet indexSet], count = [objects count], @@ -672,7 +682,7 @@ [set addIndex:index]; } - [self __setSelectionIndexes:set]; + [self __setSelectionIndexes:set avoidEmpty:avoidEmpty]; return YES; } @@ -1066,22 +1076,45 @@ var destination = [_info objectForKey:CPObservedObjectKey], keyPath = [_info objectForKey:CPObservedKeyPathKey], options = [_info objectForKey:CPOptionsKey], - isCompound = [self handlesContentAsCompoundValue]; + isCompound = [self handlesContentAsCompoundValue], + dotIndex = keyPath.lastIndexOf("."), + firstPart = dotIndex !== CPNotFound ? keyPath.substring(0, dotIndex) : nil, + isSelectionProxy = firstPart && [[destination valueForKeyPath:firstPart] isKindOfClass:CPControllerSelectionProxy]; - if (!isCompound) + if (!isCompound && !isSelectionProxy) { newValue = [destination mutableArrayValueForKeyPath:keyPath]; } else { - // handlesContentAsCompoundValue == YES so we cannot just set up a proxy. + // 1. If handlesContentAsCompoundValue we cannot just set up a proxy. // Every read and every write must go through transformValue and // reverseTransformValue, and the resulting object cannot be described by // a key path. + + // 2. If isSelectionProxy, we don't want to proxy a proxy - that's bad + // for performance and won't work with markers. + newValue = [destination valueForKeyPath:keyPath]; } - newValue = [self transformValue:newValue withOptions:options]; + var isPlaceholder = CPIsControllerMarker(newValue); + if (isPlaceholder) + { + if (newValue === CPNotApplicableMarker && [options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) + { + [CPException raise:CPGenericException + reason:@"can't transform non applicable key on: " + _source + " value: " + newValue]; + } + + newValue = [self _placeholderForMarker:newValue]; + + // This seems to be what Cocoa does. + if (!newValue) + newValue = [CPMutableArray array]; + } + else + newValue = [self transformValue:newValue withOptions:options]; if (isCompound) { diff --git a/AppKit/CPBezierPath.j b/AppKit/CPBezierPath.j index 261913d9e..908c5ca2a 100644 --- a/AppKit/CPBezierPath.j +++ b/AppKit/CPBezierPath.j @@ -20,7 +20,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Copyright 2009 280 North, Inc. - */ @import @@ -276,7 +275,7 @@ var DefaultLineWidth = 1.0; /*! Append the contents of a CPBezierPath object. */ -- (void)appendBezierPath:(NSBezierPath *)other +- (void)appendBezierPath:(CPBezierPath)other { CGPathAddPath(_path, nil, other._path); } diff --git a/AppKit/CPBox.j b/AppKit/CPBox.j index 90b4bb87d..8151b33d6 100644 --- a/AppKit/CPBox.j +++ b/AppKit/CPBox.j @@ -35,6 +35,16 @@ CPLineBorder = 1; CPBezelBorder = 2; CPGrooveBorder = 3; +// CPTitlePosition +CPNoTitle = 0; +CPAboveTop = 1; +CPAtTop = 2; +CPBelowTop = 3; +CPAboveBottom = 4; +CPAtBottom = 5; +CPBelowBottom = 6; + + /*! @ingroup appkit @class CPBox @@ -54,6 +64,10 @@ CPGrooveBorder = 3; CPSize _contentMargin; CPView _contentView; + + CPString _title @accessors(getter=title); + int _titlePosition @accessors(getter=titlePosition); + CPTextField _titleView; } + (id)boxEnclosingView:(CPView)aView @@ -61,7 +75,7 @@ CPGrooveBorder = 3; var box = [[self alloc] initWithFrame:CGRectMakeZero()], enclosingView = [aView superview]; - [box setAutoresizingMask:[aView autoresizingMask]]; + [box setAutoresizingMask:[aView autoresizingMask]]; [box setFrameFromContentFrame:[aView frame]]; [enclosingView replaceSubview:aView with:box]; @@ -84,6 +98,9 @@ CPGrooveBorder = 3; _borderWidth = 1.0; _contentMargin = CGSizeMake(0.0, 0.0); + _titlePosition = CPNoTitle; + _titleView = [CPTextField labelWithTitle:@""]; + _contentView = [[CPView alloc] initWithFrame:[self bounds]]; [_contentView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; @@ -278,18 +295,100 @@ CPGrooveBorder = 3; - (void)setFrameFromContentFrame:(CPRect)aRect { - [self setFrame:CGRectInset(aRect, -(_contentMargin.width + _borderWidth), -(_contentMargin.height + _borderWidth))]; + var offset = [self _titleHeightOffset]; + + [self setFrame:CGRectInset(aRect, -(_contentMargin.width + _borderWidth), -(_contentMargin.height + offset[0] + _borderWidth))]; + + [self setNeedsDisplay:YES]; +} + +- (void)setTitle:(CPString)aTitle +{ + if (aTitle == _title) + return; + + _title = aTitle; + + [self _manageTitlePositioning]; +} + +- (void)setTitlePosition:(int)aTitlePotisition +{ + if (aTitlePotisition == _titlePosition) + return; + + _titlePosition = aTitlePotisition; + + [self _manageTitlePositioning]; +} + +- (void)_manageTitlePositioning +{ + if (_titlePosition == CPNoTitle) + { + [_titleView removeFromSuperview]; + [self setNeedsDisplay:YES]; + return; + } + + [_titleView setStringValue:_title]; + [_titleView sizeToFit]; + [self addSubview:_titleView]; + + switch (_titlePosition) + { + case CPAtTop: + case CPAboveTop: + case CPBelowTop: + [_titleView setFrameOrigin:CPPointMake(5.0, 0.0)]; + [_titleView setAutoresizingMask:CPViewNotSizable]; + break; + + case CPAboveBottom: + case CPAtBottom: + case CPBelowBottom: + var h = [_titleView frameSize].height; + [_titleView setFrameOrigin:CPPointMake(5.0, [self frameSize].height - h)]; + [_titleView setAutoresizingMask:CPViewMinYMargin]; + break; + } + + [self sizeToFit]; [self setNeedsDisplay:YES]; } - (void)sizeToFit { - var contentFrame = [_contentView frame]; + var contentFrame = [_contentView frame], + offset = [self _titleHeightOffset]; + if (!contentFrame) + return; + + [_contentView setAutoresizingMask:CPViewNotSizable]; [self setFrameSize:CGSizeMake(contentFrame.size.width + _contentMargin.width * 2, - contentFrame.size.height + _contentMargin.height * 2)]; + contentFrame.size.height + _contentMargin.height * 2 + offset[0])]; + [_contentView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; - [_contentView setFrameOrigin:CGPointMake(_contentMargin.width, _contentMargin.height)]; + [_contentView setFrameOrigin:CGPointMake(_contentMargin.width, _contentMargin.height + offset[1])]; +} + +- (float)_titleHeightOffset +{ + if (_titlePosition == CPNoTitle) + return [0.0, 0.0]; + + switch (_titlePosition) + { + case CPAtTop: + return [[_titleView frameSize].height, [_titleView frameSize].height]; + + case CPAtBottom: + return [[_titleView frameSize].height, 0.0]; + + default: + return [0.0, 0.0]; + } } - (void)drawRect:(CPRect)rect @@ -297,7 +396,7 @@ CPGrooveBorder = 3; if (_borderType === CPNoBorder) return; - var bounds = [self bounds]; + var bounds = CGRectMakeCopy([self bounds]); switch (_boxType) { @@ -312,6 +411,16 @@ CPGrooveBorder = 3; break; } + if (_titlePosition == CPAtTop) + { + bounds.origin.y += [_titleView frameSize].height; + bounds.size.height -= [_titleView frameSize].height; + } + if (_titlePosition == CPAtBottom) + { + bounds.size.height -= [_titleView frameSize].height; + } + switch (_borderType) { case CPBezelBorder: @@ -386,7 +495,10 @@ var CPBoxTypeKey = @"CPBoxTypeKey", CPBoxFillColorKey = @"CPBoxFillColorKey", CPBoxCornerRadiusKey = @"CPBoxCornerRadiusKey", CPBoxBorderWidthKey = @"CPBoxBorderWidthKey", - CPBoxContentMarginKey = @"CPBoxContentMarginKey"; + CPBoxContentMarginKey = @"CPBoxContentMarginKey", + CPBoxTitle = @"CPBoxTitle", + CPBoxTitlePosition = @"CPBoxTitlePosition", + CPBoxTitleView = @"CPBoxTitleView"; @implementation CPBox (CPCoding) @@ -407,10 +519,16 @@ var CPBoxTypeKey = @"CPBoxTypeKey", _contentMargin = [aCoder decodeSizeForKey:CPBoxContentMarginKey]; + _title = [aCoder decodeObjectForKey:CPBoxTitle]; + _titlePosition = [aCoder decodeIntForKey:CPBoxTitlePosition]; + _titleView = [aCoder decodeObjectForKey:CPBoxTitleView] || [CPTextField labelWithTitle:_title]; + _contentView = [self subviews][0]; [self setAutoresizesSubviews:YES]; [_contentView setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; + + [self _manageTitlePositioning]; } return self; @@ -429,6 +547,10 @@ var CPBoxTypeKey = @"CPBoxTypeKey", [aCoder encodeFloat:_cornerRadius forKey:CPBoxCornerRadiusKey]; [aCoder encodeFloat:_borderWidth forKey:CPBoxBorderWidthKey]; + [aCoder encodeObject:_title forKey:CPBoxTitle]; + [aCoder encodeInt:_titlePosition forKey:CPBoxTitlePosition]; + [aCoder encodeObject:_titleView forKey:CPBoxTitleView]; + [aCoder encodeSize:_contentMargin forKey:CPBoxContentMarginKey]; } diff --git a/AppKit/CPBrowser.j b/AppKit/CPBrowser.j index a231fc851..31c21f7c8 100644 --- a/AppKit/CPBrowser.j +++ b/AppKit/CPBrowser.j @@ -258,7 +258,7 @@ var column = [[CPTableColumn alloc] initWithIdentifier:@"Image"], view = [[CPImageView alloc] initWithFrame:CGRectMakeZero()]; - [view setImageScaling:CPScaleProportionally]; + [view setImageScaling:CPImageScaleProportionallyDown]; [column setDataView:view]; [column setResizingMask:CPTableColumnNoResizing]; @@ -988,7 +988,7 @@ var _CPBrowserResizeControlBackgroundImage = nil; isHighlighted = [self themeState] & CPThemeStateSelectedDataView; [imageView setImage: _isLeaf ? (isHighlighted ? _highlightedBranchImage : _branchImage) : nil]; - [imageView setImageScaling:CPScaleNone]; + [imageView setImageScaling:CPImageScaleNone]; } - (void)encodeWithCoder:(CPCoder)aCoder diff --git a/AppKit/CPButton.j b/AppKit/CPButton.j index 095d3d0a3..b79b72c93 100644 --- a/AppKit/CPButton.j +++ b/AppKit/CPButton.j @@ -141,9 +141,9 @@ CPButtonImageOffset = 3.0; } /*! - Initializes and returns a newly allocated CPButton object with a specified frame rectangle. - @param aFrame The frame rectangle for the created button object. - @return An initialized CPView object or nil if the object couldn't be created. + Initializes and returns a newly allocated CPButton object with a specified frame rectangle. + @param aFrame The frame rectangle for the created button object. + @return An initialized CPView object or nil if the object couldn't be created. */ - (id)initWithFrame:(CGRect)aFrame { @@ -155,7 +155,7 @@ CPButtonImageOffset = 3.0; [self setValue:CPCenterTextAlignment forThemeAttribute:@"alignment"]; [self setValue:CPCenterVerticalTextAlignment forThemeAttribute:@"vertical-alignment"]; [self setValue:CPImageLeft forThemeAttribute:@"image-position"]; - [self setValue:CPScaleNone forThemeAttribute:@"image-scaling"]; + [self setValue:CPImageScaleNone forThemeAttribute:@"image-scaling"]; [self setBezelStyle:CPRoundRectBezelStyle]; [self setBordered:YES]; @@ -180,7 +180,7 @@ CPButtonImageOffset = 3.0; // Setting the state /*! - Returns a Boolean value indicating whether the button allows a mixed state. + Returns a Boolean value indicating whether the button allows a mixed state. @return \c YES if the button has a 'mixed' state in addition to on and off. */ - (BOOL)allowsMixedState @@ -206,8 +206,8 @@ CPButtonImageOffset = 3.0; } /*! - Sets the value of the button using an Objective-J object. - @param anObjectValue The value of the button interpreted as an Objective-J object. + Sets the value of the button using an Objective-J object. + @param anObjectValue The value of the button interpreted as an Objective-J object. */ - (void)setObjectValue:(id)anObjectValue { @@ -244,11 +244,11 @@ CPButtonImageOffset = 3.0; } /*! - Returns the button's next state. - @return The button's state. A button can have two or three states. - If it has two, this value is either \c CPOffState (the normal or unpressed state) - or \c CPOnState (the alternate or pressed state). - If it has three, this value can be \c CPOnState (the feature is in effect everywhere), \c CPOffState (the feature is in effect nowhere), or \c CPMixedState (the feature is in effect somewhere). + Returns the button's next state. + @return The button's state. A button can have two or three states. + If it has two, this value is either \c CPOffState (the normal or unpressed state) + or \c CPOnState (the alternate or pressed state). + If it has three, this value can be \c CPOnState (the feature is in effect everywhere), \c CPOffState (the feature is in effect nowhere), or \c CPMixedState (the feature is in effect somewhere). */ - (CPInteger)nextState { @@ -294,9 +294,9 @@ CPButtonImageOffset = 3.0; } /*! - Sets the title displayed by the button when in its normal state. - @param aTitle The string to set as the button's title. This title is always shown on buttons - that don’t use their alternate contents when highlighting or displaying their alternate state. + Sets the title displayed by the button when in its normal state. + @param aTitle The string to set as the button's title. This title is always shown on buttons + that don’t use their alternate contents when highlighting or displaying their alternate state. */ - (void)setTitle:(CPString)aTitle { @@ -310,9 +310,9 @@ CPButtonImageOffset = 3.0; } /*! - Returns the title displayed on the button when it’s in its normal state. - @return The title displayed on the receiver when it’s in its normal state - or the empty string if the button doesn’t display a title. + Returns the title displayed on the button when it’s in its normal state. + @return The title displayed on the receiver when it’s in its normal state + or the empty string if the button doesn’t display a title. */ - (CPString)title { @@ -802,9 +802,7 @@ var CPButtonImageKey = @"CPButtonImageKey", _title = [aCoder decodeObjectForKey:CPButtonTitleKey]; _alternateTitle = [aCoder decodeObjectForKey:CPButtonAlternateTitleKey]; - - if ([aCoder containsValueForKey:CPButtonAllowsMixedStateKey]) - _allowsMixedState = [aCoder decodeBoolForKey:CPButtonAllowsMixedStateKey]; + _allowsMixedState = [aCoder decodeBoolForKey:CPButtonAllowsMixedStateKey]; [self setImageDimsWhenDisabled:[aCoder decodeObjectForKey:CPButtonImageDimsWhenDisabledKey]]; diff --git a/AppKit/CPCheckBox.j b/AppKit/CPCheckBox.j index 887126aaf..c13c3b5cc 100644 --- a/AppKit/CPCheckBox.j +++ b/AppKit/CPCheckBox.j @@ -100,48 +100,25 @@ CPCheckBoxImageOffset = 4.0; { } -- (void)setValueFor:(CPString)theBinding +- (void)_updatePlaceholdersWithOptions:(CPDictionary)options { - var destination = [_info objectForKey:CPObservedObjectKey], - keyPath = [_info objectForKey:CPObservedKeyPathKey], - options = [_info objectForKey:CPOptionsKey], - newValue = [destination valueForKeyPath:keyPath], - isPlaceholder = CPIsControllerMarker(newValue); + [super _updatePlaceholdersWithOptions:options]; - if (isPlaceholder) - { - switch (newValue) - { - case CPMultipleValuesMarker: - newValue = CPMixedState; - break; + [self _setPlaceholder:CPMixedState forMarker:CPMultipleValuesMarker isDefault:YES]; + [self _setPlaceholder:CPOffState forMarker:CPNoSelectionMarker isDefault:YES]; + [self _setPlaceholder:CPOffState forMarker:CPNotApplicableMarker isDefault:YES]; + [self _setPlaceholder:CPOffState forMarker:CPNullMarker isDefault:YES]; +} - case CPNoSelectionMarker: - newValue = CPOffState; - break; +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding +{ + [_source setAllowsMixedState:(aValue === CPMixedState)]; + [_source setState:aValue]; +} - case CPNotApplicableMarker: - if ([options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) - [CPException raise:CPGenericException reason:@"can't transform non applicable key on: "+_source+" value: "+newValue]; - - newValue = CPOffState; - break; - } - - if (newValue === CPMixedState) - { - [_source setAllowsMixedState:YES]; - } - else - { - // Cocoa will always set allowsMixedState to NO - // This behavior will be fine for Cappuccino as well if we (like Cocoa) - // default the CPConditionallySetsEnabledBindingOption to YES - [_source setAllowsMixedState:NO]; - } - } - - [_source setState:newValue]; +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + [_source setState:aValue]; } @end diff --git a/AppKit/CPCollectionView.j b/AppKit/CPCollectionView.j index ec57e1b69..3053b67e7 100644 --- a/AppKit/CPCollectionView.j +++ b/AppKit/CPCollectionView.j @@ -40,23 +40,23 @@ @par Delegate Methods - @delegate -(void)collectionViewDidChangeSelection:(CPCollectionView)collectionView; + @delegate - (void)collectionViewDidChangeSelection:(CPCollectionView)collectionView; Called when the selection in the collection view has changed. @param collectionView the collection view who's selection changed - @delegate -(void)collectionView:(CPCollectionView)collectionView didDoubleClickOnItemAtIndex:(int)index; + @delegate - (void)collectionView:(CPCollectionView)collectionView didDoubleClickOnItemAtIndex:(int)index; Called when the user double-clicks on an item in the collection view. @param collectionView the collection view that received the double-click @param index the index of the item that received the double-click - @delegate -(CPData)collectionView:(CPCollectionView)collectionView dataForItemsAtIndexes:(CPIndexSet)indices forType:(CPString)aType; + @delegate - (CPData)collectionView:(CPCollectionView)collectionView dataForItemsAtIndexes:(CPIndexSet)indices forType:(CPString)aType; Invoked to obtain data for a set of indices. @param collectionView the collection view to obtain data for @param indices the indices to return data for @param aType the data type @return a data object containing the index items - @delegate -(CPArray)collectionView:(CPCollectionView)collectionView dragTypesForItemsAtIndexes:(CPIndexSet)indices; + @delegate - (CPArray)collectionView:(CPCollectionView)collectionView dragTypesForItemsAtIndexes:(CPIndexSet)indices; Invoked to obtain the data types supported by the specified indices for placement on the pasteboard. @param collectionView the collection view the items reside in @param indices the indices to obtain drag types @@ -340,19 +340,21 @@ */ - (void)setSelectionIndexes:(CPIndexSet)anIndexSet { - if ([_selectionIndexes isEqual:anIndexSet] || !_isSelectable) + if (!anIndexSet) + anIndexSet = [CPIndexSet indexSet]; + if (!_isSelectable || [_selectionIndexes isEqual:anIndexSet]) return; var index = CPNotFound; - while ((index = [_selectionIndexes indexGreaterThanIndex:index]) != CPNotFound) + while ((index = [_selectionIndexes indexGreaterThanIndex:index]) !== CPNotFound) [_items[index] setSelected:NO]; _selectionIndexes = anIndexSet; var index = CPNotFound; - while ((index = [_selectionIndexes indexGreaterThanIndex:index]) != CPNotFound) + while ((index = [_selectionIndexes indexGreaterThanIndex:index]) !== CPNotFound) [_items[index] setSelected:YES]; var binderClass = [[self class] _binderClassForBinding:@"selectionIndexes"]; @@ -473,7 +475,7 @@ } var superview = [self superview], - proposedHeight = y + itemSize.height + _verticalMargin; + proposedHeight = y + itemSize.height + _verticalMargin; if ([superview isKindOfClass:[CPClipView class]]) { @@ -559,6 +561,8 @@ */ - (void)setMinItemSize:(CGSize)aSize { + if (aSize === nil || aSize === undefined) + [CPException raise:CPInvalidArgumentException reason:"Invalid value provided for minimum size"]; if (CGSizeEqualToSize(_minItemSize, aSize)) return; @@ -665,6 +669,13 @@ indexes = [CPIndexSet indexSetWithIndex:index]; [self setSelectionIndexes:indexes]; + + // TODO Is it allowable for collection view items to become the first responder? In that case they + // may have become that at this point by virtue of CPWindow's sendEvent: mouse down handling, and + // the following line will rudely snatch it away from them. For most cases though, clicking on an + // item should naturally make the collection view the first responder so that keyboard navigation + // is enabled. + [[self window] makeFirstResponder:self]; } else if (_allowsEmptySelection) [self setSelectionIndexes:[CPIndexSet indexSet]]; @@ -965,14 +976,15 @@ var CPCollectionViewMinItemSizeKey = @"CPCollectionViewMinItemSizeK { [super awakeFromCib]; - if (CGSizeEqualToSize(_minItemSize, CGSizeMakeZero()) || CGSizeEqualToSize(_maxItemSize, CGSizeMakeZero())) + var prototypeView = [_itemPrototype view]; + if (prototypeView && (CGSizeEqualToSize(_minItemSize, CGSizeMakeZero()) || CGSizeEqualToSize(_maxItemSize, CGSizeMakeZero()))) { var item = _itemPrototype; if (CGSizeEqualToSize(_minItemSize, CGSizeMakeZero())) - _minItemSize = [[item view] frameSize]; + _minItemSize = [prototypeView frameSize]; else if (CGSizeEqualToSize(_maxItemSize, CGSizeMakeZero())) - _maxItemSize = [[item view] frameSize]; + _maxItemSize = [prototypeView frameSize]; } } @@ -989,11 +1001,11 @@ var CPCollectionViewMinItemSizeKey = @"CPCollectionViewMinItemSizeK _itemSize = CGSizeMakeZero(); - _minItemSize = [aCoder decodeSizeForKey:CPCollectionViewMinItemSizeKey] || CGSizeMakeZero(); - _maxItemSize = [aCoder decodeSizeForKey:CPCollectionViewMaxItemSizeKey] || CGSizeMakeZero(); + _minItemSize = [aCoder decodeSizeForKey:CPCollectionViewMinItemSizeKey]; + _maxItemSize = [aCoder decodeSizeForKey:CPCollectionViewMaxItemSizeKey]; - _maxNumberOfRows = [aCoder decodeIntForKey:CPCollectionViewMaxNumberOfRowsKey] || 0; - _maxNumberOfColumns = [aCoder decodeIntForKey:CPCollectionViewMaxNumberOfColumnsKey] || 0; + _maxNumberOfRows = [aCoder decodeIntForKey:CPCollectionViewMaxNumberOfRowsKey]; + _maxNumberOfColumns = [aCoder decodeIntForKey:CPCollectionViewMaxNumberOfColumnsKey]; _verticalMargin = [aCoder decodeFloatForKey:CPCollectionViewVerticalMarginKey]; diff --git a/AppKit/CPColor.j b/AppKit/CPColor.j index 88bdbcffe..4446e92b3 100644 --- a/AppKit/CPColor.j +++ b/AppKit/CPColor.j @@ -133,7 +133,7 @@ function CPColorWithImages() } /*! - Creates a color in the RGB color space, with an alpha value. + Creates a color in the RGB colorspace, with an alpha value. Each component should be between the range of 0.0 to 1.0. For the alpha component, a value of 1.0 is opaque, and 0.0 means completely transparent. @@ -147,13 +147,13 @@ function CPColorWithImages() */ + (CPColor)colorWithRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha { - return [[CPColor alloc] _initWithRGBA:[red, green, blue, alpha]]; + return [[CPColor alloc] _initWithRGBA:[MAX(0.0, MIN(1.0, red)), MAX(0.0, MIN(1.0, green)), MAX(0.0, MIN(1.0, blue)), MAX(0.0, MIN(1.0, alpha))]]; } /*! @deprecated in favor of colorWithRed:green:blue:alpha: - Creates a color in the RGB color space, with an alpha value. + Creates a color in the RGB colorspace, with an alpha value. Each component should be between the range of 0.0 to 1.0. For the alpha component, a value of 1.0 is opaque, and 0.0 means completely transparent. @@ -228,12 +228,12 @@ function CPColorWithImages() switch (FLOOR(hue / 60)) { - case 0: return [CPColor colorWithCalibratedRed: b green: t blue: p alpha: alpha]; - case 1: return [CPColor colorWithCalibratedRed: q green: b blue: p alpha: alpha]; - case 2: return [CPColor colorWithCalibratedRed: p green: b blue: t alpha: alpha]; - case 3: return [CPColor colorWithCalibratedRed: p green: q blue: b alpha: alpha]; - case 4: return [CPColor colorWithCalibratedRed: t green: p blue: b alpha: alpha]; - case 5: return [CPColor colorWithCalibratedRed: b green: p blue: q alpha: alpha]; + case 0: return [CPColor colorWithCalibratedRed:b green:t blue:p alpha:alpha]; + case 1: return [CPColor colorWithCalibratedRed:q green:b blue:p alpha:alpha]; + case 2: return [CPColor colorWithCalibratedRed:p green:b blue:t alpha:alpha]; + case 3: return [CPColor colorWithCalibratedRed:p green:q blue:b alpha:alpha]; + case 4: return [CPColor colorWithCalibratedRed:t green:p blue:b alpha:alpha]; + case 5: return [CPColor colorWithCalibratedRed:b green:p blue:q alpha:alpha]; } } @@ -253,6 +253,17 @@ function CPColorWithImages() return rgba ? [[CPColor alloc] _initWithRGBA: rgba] : null; } +/*! + Creates a color in the sRGB colorspace with the given components and alpha values. + Values below 0.0 are treated as 0.0 and values above 1.0 are treated as 1.0. +*/ ++ (CPColor)colorWithSRGBRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha +{ + // TODO If Cappuccino is ported to a colorspace aware platform, this color should be in + // sRGBColorSpace. + return [self colorWithRed:red green:green blue:blue alpha:alpha]; +} + /*! Returns a black color object. (RGBA=[0.0, 0.0, 0.0, 1.0]) */ diff --git a/AppKit/CPColorSpace.j b/AppKit/CPColorSpace.j new file mode 100644 index 000000000..536258646 --- /dev/null +++ b/AppKit/CPColorSpace.j @@ -0,0 +1,62 @@ +/* + * CPColorSpace.j + * AppKit + * + * Created by Alexander Ljungberg. + * Copyright 2012, SlevenBits Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +var sRGBColorSpace = nil; + +/*! + Represent color spaces. +*/ +@implementation CPColorSpace : CPObject +{ + CGColorSpace _cgColorSpace; +} + +/*! + Return an object representing the standard sRGB color space. +*/ ++ (CPColorSpace)sRGBColorSpace +{ + if (!sRGBColorSpace) + sRGBColorSpace = [[self alloc] initWithCGColorSpace:CGColorSpaceCreateDeviceRGB()]; + return sRGBColorSpace; +} + +- (id)initWithCGColorSpace:(CGColorSpace)cgColorSpace +{ + if (self = [super init]) + { + _cgColorSpace = cgColorSpace; + } + + return self; +} + +/*! + Return a Core Graphics color space representing the receiver. +*/ +- (CGColorSpace)CGColorSpace +{ + return _cgColorSpace; +} + +@end + diff --git a/AppKit/CPColorWell.j b/AppKit/CPColorWell.j index 6360b42e9..9b86c4c6c 100644 --- a/AppKit/CPColorWell.j +++ b/AppKit/CPColorWell.j @@ -46,6 +46,22 @@ var _CPColorWellDidBecomeExclusiveNotification = @"_CPColorWellDidBecomeExclusiv CPView _wellView; } ++ (Class)_binderClassForBinding:(CPString)theBinding +{ + if (theBinding == CPValueBinding) + return [CPColorWellValueBinder class]; + + return [super _binderClassForBinding:theBinding]; +} + +- (void)_reverseSetBinding +{ + var binderClass = [[self class] _binderClassForBinding:CPValueBinding], + theBinding = [binderClass getBinding:CPValueBinding forObject:self]; + + [theBinding reverseSetValueFor:@"color"]; +} + - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; @@ -262,6 +278,48 @@ var _CPColorWellDidBecomeExclusiveNotification = @"_CPColorWellDidBecomeExclusiv @end +@implementation CPColorWellValueBinder : CPBinder +{ +} + +- (void)_updatePlaceholdersWithOptions:(CPDictionary)options +{ + var placeholderColor = [CPColor blueColor]; + + [self _setPlaceholder:placeholderColor forMarker:CPMultipleValuesMarker isDefault:YES]; + [self _setPlaceholder:placeholderColor forMarker:CPNoSelectionMarker isDefault:YES]; + [self _setPlaceholder:placeholderColor forMarker:CPNotApplicableMarker isDefault:YES]; + [self _setPlaceholder:placeholderColor forMarker:CPNullMarker isDefault:YES]; +} + +- (void)setValueFor:(CPString)theBinding +{ + var destination = [_info objectForKey:CPObservedObjectKey], + keyPath = [_info objectForKey:CPObservedKeyPathKey], + options = [_info objectForKey:CPOptionsKey], + newValue = [destination valueForKeyPath:keyPath], + isPlaceholder = CPIsControllerMarker(newValue); + + if (isPlaceholder) + { + if (newValue === CPNotApplicableMarker && [options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) + { + [CPException raise:CPGenericException + reason:@"can't transform non applicable key on: " + _source + " value: " + newValue]; + } + + newValue = [self _placeholderForMarker:newValue]; + } + else + { + newValue = [self transformValue:newValue withOptions:options]; + } + + [_source setColor:newValue]; +} + +@end + var CPColorWellColorKey = "CPColorWellColorKey", CPColorWellBorderedKey = "CPColorWellBorderedKey"; diff --git a/AppKit/CPControl.j b/AppKit/CPControl.j index 1d2a567f3..563b0352f 100644 --- a/AppKit/CPControl.j +++ b/AppKit/CPControl.j @@ -28,42 +28,48 @@ @import "CPView.j" @import "CPKeyValueBinding.j" -CPLeftTextAlignment = 0; -CPRightTextAlignment = 1; -CPCenterTextAlignment = 2; -CPJustifiedTextAlignment = 3; -CPNaturalTextAlignment = 4; +CPLeftTextAlignment = 0; +CPRightTextAlignment = 1; +CPCenterTextAlignment = 2; +CPJustifiedTextAlignment = 3; +CPNaturalTextAlignment = 4; -CPRegularControlSize = 0; -CPSmallControlSize = 1; -CPMiniControlSize = 2; +CPRegularControlSize = 0; +CPSmallControlSize = 1; +CPMiniControlSize = 2; -CPLineBreakByWordWrapping = 0; -CPLineBreakByCharWrapping = 1; -CPLineBreakByClipping = 2; -CPLineBreakByTruncatingHead = 3; -CPLineBreakByTruncatingTail = 4; -CPLineBreakByTruncatingMiddle = 5; +CPLineBreakByWordWrapping = 0; +CPLineBreakByCharWrapping = 1; +CPLineBreakByClipping = 2; +CPLineBreakByTruncatingHead = 3; +CPLineBreakByTruncatingTail = 4; +CPLineBreakByTruncatingMiddle = 5; -CPTopVerticalTextAlignment = 1; -CPCenterVerticalTextAlignment = 2; -CPBottomVerticalTextAlignment = 3; +CPTopVerticalTextAlignment = 1; +CPCenterVerticalTextAlignment = 2; +CPBottomVerticalTextAlignment = 3; -CPScaleProportionally = 0; -CPScaleToFit = 1; -CPScaleNone = 2; +// Deprecated for use with images, use the CPImageScale constants +CPScaleProportionally = 0; +CPScaleToFit = 1; +CPScaleNone = 2; -CPNoImage = 0; -CPImageOnly = 1; -CPImageLeft = 2; -CPImageRight = 3; -CPImageBelow = 4; -CPImageAbove = 5; -CPImageOverlaps = 6; +CPImageScaleProportionallyDown = 0; +CPImageScaleAxesIndependently = 1; +CPImageScaleNone = 2; +CPImageScaleProportionallyUpOrDown = 3; -CPOnState = 1; -CPOffState = 0; -CPMixedState = -1; +CPNoImage = 0; +CPImageOnly = 1; +CPImageLeft = 2; +CPImageRight = 3; +CPImageBelow = 4; +CPImageAbove = 5; +CPImageOverlaps = 6; + +CPOnState = 1; +CPOffState = 0; +CPMixedState = -1; CPControlNormalBackgroundColor = "CPControlNormalBackgroundColor"; CPControlSelectedBackgroundColor = "CPControlSelectedBackgroundColor"; @@ -784,9 +790,10 @@ var CPControlBlackColor = [CPColor blackColor]; Sets the image scaling of the control.
-    CPScaleProportionally
-    CPScaleToFit
-    CPScaleNone
+    CPImageScaleProportionallyDown
+    CPImageScaleAxesIndependently
+    CPImageScaleNone
+    CPImageScaleProportionallyUpOrDown
     
*/ - (void)setImageScaling:(CPImageScaling)scaling diff --git a/AppKit/CPEvent.j b/AppKit/CPEvent.j index 80d931f76..4f309e350 100644 --- a/AppKit/CPEvent.j +++ b/AppKit/CPEvent.j @@ -179,7 +179,8 @@ CPDOMEventTouchCancel = "touchcancel"; var _CPEventPeriodicEventPeriod = 0, _CPEventPeriodicEventTimer = nil, - _CPEventUpperCaseRegex = new RegExp("[A-Z]"); + _CPEventUpperCaseRegex = new RegExp("[A-Z]"), + _CPEventStartupMilliseconds = new Date().getTime(); /*! @ingroup appkit @@ -209,6 +210,14 @@ var _CPEventPeriodicEventPeriod = 0, float _deltaZ; } +/*! + Returns the current time in fractional seconds since startup. +*/ ++ (CPTimeInterval)currentTimestamp +{ + return (new Date().getTime() - _CPEventStartupMilliseconds) / 1000; +} + /*! Creates a new keyboard event. @@ -389,7 +398,7 @@ var _CPEventPeriodicEventPeriod = 0, } /*! - Returns the time the event occurred. + Returns the time the event occurred in seconds since startup. */ - (CPTimeInterval)timestamp { diff --git a/AppKit/CPFlashView.j b/AppKit/CPFlashView.j index 1bec0894e..841b5fc8c 100644 --- a/AppKit/CPFlashView.j +++ b/AppKit/CPFlashView.j @@ -104,10 +104,10 @@ var IEFlashCLSID = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; - (void)setFlashVars:(CPDictionary)aDictionary { var varString = @"", - enumerator = [aDictionary keyEnumerator]; + enumerator = [aDictionary keyEnumerator], + key; - var key; - while (key = [enumerator nextObject]) + while ((key = [enumerator nextObject]) !== nil) varString = [varString stringByAppendingFormat:@"&%@=%@", key, [aDictionary objectForKey:key]]; if (!_params) @@ -146,7 +146,7 @@ var IEFlashCLSID = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; var enumerator = [_params keyEnumerator], key; - while (_DOMObjectElement && (key = [enumerator nextObject])) + while (_DOMObjectElement && (key = [enumerator nextObject]) !== nil) { var param = document.createElement(@"param"); param.name = key; @@ -178,7 +178,7 @@ var IEFlashCLSID = "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; paramEnumerator = [_params keyEnumerator], key; - while (key = [paramEnumerator nextObject]) + while ((key = [paramEnumerator nextObject]) !== nil) paramString = [paramString stringByAppendingFormat:@"", key, [_params objectForKey:key]]; _DOMObjectElement = document.createElement(@"object"); diff --git a/AppKit/CPFont.j b/AppKit/CPFont.j index 51fa59689..f125ffe5d 100644 --- a/AppKit/CPFont.j +++ b/AppKit/CPFont.j @@ -142,7 +142,7 @@ var _CPFonts = {}, */ + (CPFont)fontWithName:(CPString)aName size:(float)aSize { - return _CPCachedFont(aName, aSize, NO, NO) || [[CPFont alloc] _initWithName:aName size:aSize bold:NO italic:NO]; + return [CPFont fontWithName:aName size:aSize bold:NO italic:NO]; } /*! @@ -154,7 +154,7 @@ var _CPFonts = {}, */ + (CPFont)fontWithName:(CPString)aName size:(float)aSize italic:(BOOL)italic { - return _CPCachedFont(aName, aSize, NO, NO) || [[CPFont alloc] _initWithName:aName size:aSize bold:NO italic:italic]; + return [CPFont fontWithName:aName size:aSize bold:NO italic:italic]; } /*! @@ -165,7 +165,7 @@ var _CPFonts = {}, */ + (CPFont)boldFontWithName:(CPString)aName size:(float)aSize { - return _CPCachedFont(aName, aSize, YES, NO) || [[CPFont alloc] _initWithName:aName size:aSize bold:YES italic:NO]; + return [CPFont fontWithName:aName size:aSize bold:YES italic:NO]; } /*! @@ -177,7 +177,7 @@ var _CPFonts = {}, */ + (CPFont)boldFontWithName:(CPString)aName size:(float)aSize italic:(BOOL)italic { - return _CPCachedFont(aName, aSize, NO, NO) || [[CPFont alloc] _initWithName:aName size:aSize bold:YES italic:italic]; + return [CPFont fontWithName:aName size:aSize bold:YES italic:italic]; } /*! @@ -187,7 +187,7 @@ var _CPFonts = {}, */ + (CPFont)systemFontOfSize:(CPSize)aSize { - return _CPCachedFont(_CPFontSystemFontFace, aSize, NO, NO) || [[CPFont alloc] _initWithName:_CPFontSystemFontFace size:aSize bold:NO italic:NO]; + return [CPFont fontWithName:_CPFontSystemFontFace size:aSize bold:NO italic:NO]; } /*! @@ -197,15 +197,15 @@ var _CPFonts = {}, */ + (CPFont)boldSystemFontOfSize:(CPSize)aSize { - return _CPCachedFont(_CPFontSystemFontFace, aSize, YES, NO) || [[CPFont alloc] _initWithName:_CPFontSystemFontFace size:aSize bold:YES italic:NO]; + return [CPFont fontWithName:_CPFontSystemFontFace size:aSize bold:YES italic:NO]; } /* FIXME Font Descriptor @ignore */ -- (id)_initWithName:(CPString)aName size:(float)aSize bold:(BOOL)isBold ++ (CPFont)fontWithName:(CPString)aName size:(float)aSize bold:(BOOL)bold italic:(BOOL)italic { - return [self _initWithName:aName size:aSize bold:isBold italic:NO]; + return _CPCachedFont(aName, aSize, bold, italic) || [[CPFont alloc] _initWithName:aName size:aSize bold:bold italic:italic]; } - (id)_initWithName:(CPString)aName size:(float)aSize bold:(BOOL)isBold italic:(BOOL)isItalic diff --git a/AppKit/CPGradient.j b/AppKit/CPGradient.j new file mode 100644 index 000000000..725a5c71c --- /dev/null +++ b/AppKit/CPGradient.j @@ -0,0 +1,123 @@ +/* + * CPGradient.j + * AppKit + * + * Created by Alexander Ljungberg. + * Copyright 2012, SlevenBits Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +CPGradientDrawsBeforeStartingLocation = kCGGradientDrawsBeforeStartLocation; +CPGradientDrawsAfterEndingLocation = kCGGradientDrawsAfterEndLocation; + +/*! + A class for drawing linear and radial gradients with a convenient API. +*/ +@implementation CPGradient : CPObject +{ + CGGradient _gradient; +} + +- (id)initWithColors:(CPArray)someColors +{ + var count = [someColors count]; + + if (count < 2) + [CPException raise:CPInvalidArgumentException reason:@"at least 2 colors required"]; + + var distance = 1.0 / (count - 1), + locations = [CPMutableArray array], + location = 0.0; + + for (var i = 0; i < count; i++) + { + [locations addObject:location]; + location += distance; + } + + return [self initWithColors:someColors atLocations:locations colorSpace:nil]; +} + +- (id)initWithColors:(CPArray)someColors atLocations:(CPArray)someLocations colorSpace:(CPColorSpace)aColorSpace +{ + if (self = [super init]) + { + var cgColors = [], + count = [someColors count], + colorSpace = [aColorSpace CGColorSpace] || CGColorSpaceCreateDeviceRGB; + for (var i = 0; i < count; i++) + cgColors.push(CGColorCreate(colorSpace, [someColors[i] components])); + _gradient = CGGradientCreateWithColors(colorSpace, cgColors, someLocations); + } + + return self; +} + +- (void)drawInRect:(CGRect)rect angle:(float)angle +{ + var ctx = [[CPGraphicsContext currentContext] graphicsPort]; + + CGContextSaveGState(ctx); + CGContextClipToRect(ctx, rect); + CGContextAddRect(ctx, rect); + + var startPoint, + endPoint; + + // Modulo of negative values doesn't work as expected in JS. + angle = ((angle % 360.0) + 360.0) % 360.0; + + if (angle < 90.0) + startPoint = _CGPointMake(_CGRectGetMinX(rect), _CGRectGetMinY(rect)); + else if (angle < 180.0) + startPoint = _CGPointMake(_CGRectGetMaxX(rect), _CGRectGetMinY(rect)); + else if (angle < 270.0) + startPoint = _CGPointMake(_CGRectGetMaxX(rect), _CGRectGetMaxY(rect)); + else + startPoint = _CGPointMake(_CGRectGetMinX(rect), _CGRectGetMaxY(rect)); + + // A line segment comes out of the starting point at the given angle, with the first colour + // at the starting point and the last at the end. To do what drawInRect: is supposed to do + // we want the opposite corner of the starting corner to just reach the final colour stop. + // So when the angle isn't a right angle, the segment has to extend beyond the edge of the + // rectangle just far enough. This is hard to describe without a picture but if we place + // another line through the opposite corner at -90 degrees, it'll help form some triangles + // from which we can derive this formula: + // + // length = cos(angle) * (rectWidth + rectHeight * tan(angle)) + // + // This simplifies down to (in the first quadrant) rectWidth * cos(a) + rectHeight * sin(a). + + var radians = PI * angle / 180.0, + length = ABS(_CGRectGetWidth(rect) * COS(radians)) + ABS(_CGRectGetHeight(rect) * SIN(radians)); + + endPoint = _CGPointMake(startPoint.x + length * COS(radians), + startPoint.y + length * SIN(radians)); + + [self drawFromPoint:startPoint toPoint:endPoint options:CPGradientDrawsBeforeStartingLocation | CPGradientDrawsAfterEndingLocation]; + CGContextRestoreGState(ctx); +} + +- (void)drawFromPoint:(NSPoint)startingPoint toPoint:(NSPoint)endingPoint options:(NSGradientDrawingOptions)options +{ + var ctx = [[CPGraphicsContext currentContext] graphicsPort]; + + // TODO kCGGradientDrawsBeforeStartLocation and kCGGradientDrawsAfterEndLocation are not actually supported + // by CGContextDrawLinearGradient yet. + CGContextDrawLinearGradient(ctx, _gradient, startingPoint, endingPoint, options); +} + +@end diff --git a/AppKit/CPGraphicsContext.j b/AppKit/CPGraphicsContext.j index 9e93eee4e..741cca2d0 100644 --- a/AppKit/CPGraphicsContext.j +++ b/AppKit/CPGraphicsContext.j @@ -86,4 +86,17 @@ var CPGraphicsContextCurrent = nil; return _graphicsPort; } +/*! + (Not implemented. Always returns Cappuccino's default, `YES`.) + + Return `isFlipped` of the receiver's focused view, unless no view is focused in which case the receiver's + `flipped` flag, as set by `graphicsContextWithGraphicsPort:flipped:`, is returned. + + Note: Cappuccino is flipped by default. +*/ +- (BOOL)isFlipped +{ + return YES; +} + @end diff --git a/AppKit/CPImageView.j b/AppKit/CPImageView.j index bebbe79a0..8540a9c1c 100644 --- a/AppKit/CPImageView.j +++ b/AppKit/CPImageView.j @@ -26,11 +26,6 @@ @import "CPImage.j" @import "CPShadowView.j" - -CPScaleProportionally = 0; -CPScaleToFit = 1; -CPScaleNone = 2; - CPImageAlignCenter = 0; CPImageAlignTop = 1; CPImageAlignTopLeft = 2; @@ -41,15 +36,7 @@ CPImageAlignBottomLeft = 6; CPImageAlignBottomRight = 7; CPImageAlignRight = 8; -var CPImageViewShadowBackgroundColor = nil, - CPImageViewEmptyPlaceholderImage = nil; - -var LEFT_SHADOW_INSET = 3.0, - RIGHT_SHADOW_INSET = 3.0, - TOP_SHADOW_INSET = 3.0, - BOTTOM_SHADOW_INSET = 5.0, - VERTICAL_SHADOW_INSET = TOP_SHADOW_INSET + BOTTOM_SHADOW_INSET, - HORIZONTAL_SHADOW_INSET = LEFT_SHADOW_INSET + RIGHT_SHADOW_INSET; +var CPImageViewEmptyPlaceholderImage = nil; /*! @ingroup appkit @@ -77,6 +64,14 @@ var LEFT_SHADOW_INSET = 3.0, CPImageViewEmptyPlaceholderImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"empty.png"]]; } ++ (Class)_binderClassForBinding:(CPString)theBinding +{ + if (theBinding === CPValueBinding || theBinding === CPValueURLBinding || theBinding === CPValuePathBinding) + return [CPImageViewValueBinder class]; + + return [super _binderClassForBinding:theBinding]; +} + - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; @@ -240,7 +235,7 @@ var LEFT_SHADOW_INSET = 3.0, [super setImageScaling:anImageScaling]; #if PLATFORM(DOM) - if ([self currentValueForThemeAttribute:@"image-scaling"] === CPScaleToFit) + if ([self currentValueForThemeAttribute:@"image-scaling"] === CPImageScaleAxesIndependently) { CPDOMDisplayServerSetStyleLeftTop(_DOMImageElement, NULL, 0.0, 0.0); } @@ -297,19 +292,19 @@ var LEFT_SHADOW_INSET = 3.0, imageScaling = [self currentValueForThemeAttribute:@"image-scaling"], x = 0.0, y = 0.0, - insetWidth = (_hasShadow ? HORIZONTAL_SHADOW_INSET : 0.0), - insetHeight = (_hasShadow ? VERTICAL_SHADOW_INSET : 0.0), + insetWidth = (_hasShadow ? [_shadowView horizontalInset] : 0.0), + insetHeight = (_hasShadow ? [_shadowView verticalInset] : 0.0), boundsWidth = _CGRectGetWidth(bounds), boundsHeight = _CGRectGetHeight(bounds), width = boundsWidth - insetWidth, height = boundsHeight - insetHeight; - if (imageScaling === CPScaleToFit) + if (imageScaling === CPImageScaleAxesIndependently) { -#if PLATFORM(DOM) - _DOMImageElement.width = ROUND(width); - _DOMImageElement.height = ROUND(height); -#endif + #if PLATFORM(DOM) + _DOMImageElement.width = ROUND(width); + _DOMImageElement.height = ROUND(height); + #endif } else { @@ -318,17 +313,19 @@ var LEFT_SHADOW_INSET = 3.0, if (size.width == -1 && size.height == -1) return; - if (imageScaling === CPScaleProportionally) + switch (imageScaling) { - // The max size it can be is size.width x size.height, so only - // only proportion otherwise. - if (width >= size.width && height >= size.height) - { - width = size.width; - height = size.height; - } - else - { + case CPImageScaleProportionallyDown: + if (width >= size.width && height >= size.height) + { + width = size.width; + height = size.height; + break; + } + + // intentionally fall through to the next case + + case CPImageScaleProportionallyUpOrDown: var imageRatio = size.width / size.height, viewRatio = width / height; @@ -336,26 +333,19 @@ var LEFT_SHADOW_INSET = 3.0, width = height * imageRatio; else height = width / imageRatio; - } + break; -#if PLATFORM(DOM) + case CPImageScaleAxesIndependently: + case CPImageScaleNone: + width = size.width; + height = size.height; + break; + } + + #if PLATFORM(DOM) _DOMImageElement.width = ROUND(width); _DOMImageElement.height = ROUND(height); -#endif - } - else - { - width = size.width; - height = size.height; - } - - if (imageScaling == CPScaleNone) - { -#if PLATFORM(DOM) - _DOMImageElement.width = ROUND(size.width); - _DOMImageElement.height = ROUND(size.height); -#endif - } + #endif var x, y; @@ -406,7 +396,7 @@ var LEFT_SHADOW_INSET = 3.0, _imageRect = _CGRectMake(x, y, width, height); if (_hasShadow) - [_shadowView setFrame:_CGRectMake(x - LEFT_SHADOW_INSET, y - TOP_SHADOW_INSET, width + insetWidth, height + insetHeight)]; + [_shadowView setFrame:_CGRectMake(x - [_shadowView leftInset], y - [_shadowView topInset], width + insetWidth, height + insetHeight)]; } - (void)mouseDown:(CPEvent)anEvent @@ -457,6 +447,33 @@ var LEFT_SHADOW_INSET = 3.0, @end +@implementation CPImageViewValueBinder : CPBinder +{ +} + +- (void)_updatePlaceholdersWithOptions:(CPDictionary)options +{ + [self _setPlaceholder:nil forMarker:CPMultipleValuesMarker isDefault:YES]; + [self _setPlaceholder:nil forMarker:CPNoSelectionMarker isDefault:YES]; + [self _setPlaceholder:nil forMarker:CPNotApplicableMarker isDefault:YES]; + [self _setPlaceholder:nil forMarker:CPNullMarker isDefault:YES]; +} + +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding +{ + [_source setImage:nil]; +} + +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + if (aBinding === CPValueURLBinding || aBinding === CPValuePathBinding) + aValue = [[CPImage alloc] initWithContentsOfFile:aValue]; + + [_source setImage:aValue]; +} + +@end + var CPImageViewImageKey = @"CPImageViewImageKey", CPImageViewImageScalingKey = @"CPImageViewImageScalingKey", CPImageViewImageAlignmentKey = @"CPImageViewImageAlignmentKey", @@ -483,6 +500,9 @@ var CPImageViewImageKey = @"CPImageViewImageKey", _DOMImageElement.setAttribute("draggable", "true"); _DOMImageElement.style["-khtml-user-drag"] = "element"; } + + if (typeof(appkit_tag_dom_elements) !== "undefined" && !!appkit_tag_dom_elements) + _DOMImageElement.setAttribute("data-cappuccino-view", [self className]); #endif self = [super initWithCoder:aCoder]; @@ -496,7 +516,7 @@ var CPImageViewImageKey = @"CPImageViewImageKey", [self setHasShadow:[aCoder decodeBoolForKey:CPImageViewHasShadowKey]]; [self setImageAlignment:[aCoder decodeIntForKey:CPImageViewImageAlignmentKey]]; - if ([aCoder decodeBoolForKey:CPImageViewIsEditableKey] || NO) + if ([aCoder decodeBoolForKey:CPImageViewIsEditableKey]) [self setEditable:YES]; [self setNeedsLayout]; diff --git a/AppKit/CPKeyValueBinding.j b/AppKit/CPKeyValueBinding.j index 39eeec4b4..608f7ae4a 100644 --- a/AppKit/CPKeyValueBinding.j +++ b/AppKit/CPKeyValueBinding.j @@ -41,6 +41,7 @@ var CPBindingOperationAnd = 0, id _source; JSObject _suppressedNotifications; + JSObject _placeholderForMarker; } + (void)exposeBinding:(CPString)aBinding forClass:(Class)aClass @@ -125,10 +126,13 @@ var CPBindingOperationAnd = 0, _source = aSource; _info = [CPDictionary dictionaryWithObjects:[aDestination, aKeyPath] forKeys:[CPObservedObjectKey, CPObservedKeyPathKey]]; _suppressedNotifications = {}; + _placeholderForMarker = {}; if (options) [_info setObject:options forKey:CPOptionsKey]; + [self _updatePlaceholdersWithOptions:options]; + [aDestination addObserver:self forKeyPath:aKeyPath options:CPKeyValueObservingOptionNew context:aBinding]; var bindings = [bindingsMap objectForKey:[_source UID]]; @@ -145,15 +149,40 @@ var CPBindingOperationAnd = 0, return self; } -- (void)setValueFor:(CPString)aBinding +- (void)setValueFor:(CPString)theBinding { var destination = [_info objectForKey:CPObservedObjectKey], keyPath = [_info objectForKey:CPObservedKeyPathKey], options = [_info objectForKey:CPOptionsKey], - newValue = [destination valueForKeyPath:keyPath]; + newValue = [destination valueForKeyPath:keyPath], + isPlaceholder = CPIsControllerMarker(newValue); - newValue = [self transformValue:newValue withOptions:options]; - [_source setValue:newValue forKey:aBinding]; + if (isPlaceholder) + { + if (newValue === CPNotApplicableMarker && [options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) + { + [CPException raise:CPGenericException + reason:@"Cannot transform non-applicable key on: " + _source + " key path: " + keyPath + " value: " + newValue]; + } + + var value = [self _placeholderForMarker:newValue]; + [self setPlaceholderValue:value withMarker:newValue forBinding:theBinding]; + } + else + { + var value = [self transformValue:newValue withOptions:options]; + [self setValue:value forBinding:theBinding]; + } +} + +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding +{ + [_source setValue:aValue forKey:aBinding]; +} + +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + [_source setValue:aValue forKey:aBinding]; } - (void)reverseSetValueFor:(CPString)aBinding @@ -164,7 +193,10 @@ var CPBindingOperationAnd = 0, newValue = [_source valueForKeyPath:aBinding]; newValue = [self reverseTransformValue:newValue withOptions:options]; + + [self suppressSpecificNotificationFromObject:destination keyPath:keyPath]; [destination setValue:newValue forKeyPath:keyPath]; + [self unsuppressSpecificNotificationFromObject:destination keyPath:keyPath]; } - (void)observeValueForKeyPath:(CPString)aKeyPath ofObject:(id)anObject change:(CPDictionary)changes context:(id)context @@ -204,14 +236,13 @@ var CPBindingOperationAnd = 0, if (valueTransformer) aValue = [valueTransformer transformedValue:aValue]; - if (aValue === undefined || aValue === nil || aValue === [CPNull null]) aValue = [options objectForKey:CPNullPlaceholderBindingOption] || nil; return aValue; } -- (id)reverseTransformValue:(id)aValue withOptions: (CPDictionary)options +- (id)reverseTransformValue:(id)aValue withOptions:(CPDictionary)options { var valueTransformerName = [options objectForKey:CPValueTransformerNameBindingOption], valueTransformer; @@ -271,6 +302,42 @@ var CPBindingOperationAnd = 0, delete objectSuppressions[aKeyPath]; } +- (void)_updatePlaceholdersWithOptions:(CPDictionary)options +{ + var count = [CPBinderPlaceholderMarkers count]; + + while (count--) + { + var marker = CPBinderPlaceholderMarkers[count], + optionName = CPBinderPlaceholderOptions[count], + isExplicit = [options containsKey:optionName], + placeholder = isExplicit ? [options objectForKey:optionName] : nil; + [self _setPlaceholder:placeholder forMarker:marker isDefault:!isExplicit]; + } +} + +- (void)_placeholderForMarker:aMarker +{ + var placeholder = _placeholderForMarker[aMarker]; + if (placeholder) + return placeholder['value']; + return nil; +} + +- (void)_setPlaceholder:(id)aPlaceholder forMarker:(id)aMarker isDefault:(BOOL)isDefault +{ + if (isDefault) + { + var existingPlaceholder = _placeholderForMarker[aMarker]; + + // Don't overwrite an explicitly set placeholder with a default. + if (existingPlaceholder && !existingPlaceholder['isDefault']) + return; + } + + _placeholderForMarker[aMarker] = { 'isDefault': isDefault, 'value': aPlaceholder }; +} + @end @implementation CPObject (KeyValueBindingCreation) @@ -404,7 +471,7 @@ var CPBindingOperationAnd = 0, @end -var resolveMultipleValues = function resolveMultipleValues(/*CPString*/key, /*CPDictionary*/bindings, /*GSBindingOperationKind*/operation) +var resolveMultipleValues = function(/*CPString*/key, /*CPDictionary*/bindings, /*GSBindingOperationKind*/operation) { var bindingName = key, theBinding, @@ -428,7 +495,7 @@ var resolveMultipleValues = function resolveMultipleValues(/*CPString*/key, /*CP return !operation; }; -var invokeAction = function invokeAction(/*CPString*/targetKey, /*CPString*/argumentKey, /*CPDictionary*/bindings) +var invokeAction = function(/*CPString*/targetKey, /*CPString*/argumentKey, /*CPDictionary*/bindings) { var theBinding = [bindings objectForKey:targetKey], infoDictionary = theBinding._info, @@ -488,6 +555,9 @@ CPSelectedIndexBinding = @"selectedIndex"; CPTextColorBinding = @"textColor"; CPToolTipBinding = @"toolTip"; CPValueBinding = @"value"; +CPValueURLBinding = @"valueURL"; +CPValuePathBinding = @"valuePath"; +CPDataBinding = @"data"; //Binding options constants CPAllowsEditingMultipleValuesSelectionBindingOption = @"CPAllowsEditingMultipleValuesSelection"; @@ -519,3 +589,7 @@ CPIsControllerMarker = function(/*id*/anObject) { return anObject === CPMultipleValuesMarker || anObject === CPNoSelectionMarker || anObject === CPNotApplicableMarker || anObject === CPNullMarker; }; + +var CPBinderPlaceholderMarkers = [CPMultipleValuesMarker, CPNoSelectionMarker, CPNotApplicableMarker, CPNullMarker], + CPBinderPlaceholderOptions = [CPMultipleValuesPlaceholderBindingOption, CPNoSelectionPlaceholderBindingOption, CPNotApplicablePlaceholderBindingOption, CPNullPlaceholderBindingOption]; + diff --git a/AppKit/CPMenu/_CPMenuManager.j b/AppKit/CPMenu/_CPMenuManager.j index 062571161..9b680674a 100644 --- a/AppKit/CPMenu/_CPMenuManager.j +++ b/AppKit/CPMenu/_CPMenuManager.j @@ -5,13 +5,13 @@ _CPMenuManagerScrollingStateUp = -1; _CPMenuManagerScrollingStateDown = 1; _CPMenuManagerScrollingStateNone = 0; -var STICKY_TIME_INTERVAL = 500, +var STICKY_TIME_INTERVAL = 0.5, SharedMenuManager = nil; @implementation _CPMenuManager: CPObject { CPTimeInterval _startTime; - BOOL _hasMouseGoneUpAfterStartedTracking; + BOOL _mouseWasDragged; int _scrollingState; CGPoint _lastGlobalLocation; @@ -66,7 +66,7 @@ var STICKY_TIME_INTERVAL = 500, CPApp._activeMenu = menu; - _startTime = [anEvent timestamp];//new Date(); + _startTime = [anEvent timestamp]; _scrollingState = _CPMenuManagerScrollingStateNone; _constraintRect = aRect; @@ -91,7 +91,7 @@ var STICKY_TIME_INTERVAL = 500, return [self trackMenuBarButtonEvent:anEvent]; } - _hasMouseGoneUpAfterStartedTracking = NO; + _mouseWasDragged = NO; [self trackEvent:anEvent]; } @@ -127,7 +127,7 @@ var STICKY_TIME_INTERVAL = 500, if (_keyBuffer) { - if (([CPDate date] - _startTime) > (STICKY_TIME_INTERVAL + [activeMenu numberOfItems] / 2)) + if (([anEvent timestamp] - _startTime) > (STICKY_TIME_INTERVAL + [activeMenu numberOfItems] / 2)) [self selectNextItemBeginningWith:_keyBuffer inMenu:menu clearBuffer:YES]; if (type === CPPeriodic) @@ -189,7 +189,7 @@ var STICKY_TIME_INTERVAL = 500, var menuContainerWindow = activeMenuContainer; - if (![menuContainerWindow isKindOfClass:[CPWindow class]]) + if (![menuContainerWindow isKindOfClass:CPWindow]) menuContainerWindow = [menuContainerWindow window]; [menuContainerWindow @@ -215,6 +215,9 @@ var STICKY_TIME_INTERVAL = 500, if (type === CPMouseMoved || type === CPLeftMouseDragged || type === CPLeftMouseDown || type === CPPeriodic) { + if (type === CPLeftMouseDragged) + _mouseWasDragged = YES; + var oldScrollingState = _scrollingState; _scrollingState = [activeMenuContainer scrollingStateForPoint:globalLocation]; @@ -229,17 +232,35 @@ var STICKY_TIME_INTERVAL = 500, } else if (type === CPLeftMouseUp || type === CPRightMouseUp) { - if (_hasMouseGoneUpAfterStartedTracking) - { - // Don't close the menu if the current item has a submenu - // and did not override it's default action - if ([activeItem action] === @selector(submenuAction:)) - return; + /* + There are a few possibilites: - [trackingMenu cancelTracking]; + 1. The user clicks and releases without dragging within the sticky time. + This is considered a regular mouse click and not a drag. In this case + we allow the user to track the menu by moving the mouse. The next + mouse up will end tracking. + + 2. The user clicks and releases without dragging after the sticky time. + This is considered a drag and release and tracking ends. + + 3. The user clicks, drags and then releases. Tracking ends. + */ + if (_mouseWasDragged || ([anEvent timestamp] - _startTime > STICKY_TIME_INTERVAL)) + { + /* + Close the menu if: + + 1. The mouse was dragged. + 2. The mouse is released in the menubar. + 3. The current item has a submenu with a custom action. + */ + if (_mouseWasDragged || + [activeMenuContainer isMenuBar] || + [activeItem action] !== @selector(submenuAction:)) + { + [trackingMenu cancelTracking]; + } } - else - _hasMouseGoneUpAfterStartedTracking = YES; } } @@ -252,7 +273,7 @@ var STICKY_TIME_INTERVAL = 500, } // If the item has a submenu, show it. - if ([activeItem hasSubmenu])// && [activeItem action] === @selector(submenuAction:)) + if ([activeItem hasSubmenu]) // && [activeItem action] === @selector(submenuAction:)) { var activeItemRect = [activeMenuContainer rectForItemAtIndex:activeItemIndex], newMenuOrigin; @@ -406,7 +427,7 @@ var STICKY_TIME_INTERVAL = 500, break; // If this menu is already being shown, unhighlight and return. - if (menu === newMenu)//&& [menu supermenu] === baseMenu) + if (menu === newMenu) //&& [menu supermenu] === baseMenu) return [newMenu _highlightItemAtIndex:CPNotFound]; [menuContainer orderOut:self]; @@ -452,7 +473,7 @@ var STICKY_TIME_INTERVAL = 500, var iter = [selectorNames objectEnumerator], obj; - while (obj = [iter nextObject]) + while ((obj = [iter nextObject]) !== nil) { var aSelector = CPSelectorFromString(obj); @@ -483,7 +504,7 @@ var STICKY_TIME_INTERVAL = 500, var iter = [[menu itemArray] objectEnumerator], obj; - while (obj = [iter nextObject]) + while ((obj = [iter nextObject]) !== nil) { if ([obj isHidden] || ![obj isEnabled]) continue; diff --git a/AppKit/CPMenuItem/CPMenuItem.j b/AppKit/CPMenuItem/CPMenuItem.j index 6d70ba1b4..063fed763 100644 --- a/AppKit/CPMenuItem/CPMenuItem.j +++ b/AppKit/CPMenuItem/CPMenuItem.j @@ -932,34 +932,33 @@ var CPMenuItemIsSeparatorKey = @"CPMenuItemIsSeparatorKey", _action = [aCoder decodeObjectForKey:CPMenuItemActionKey]; _isEnabled = DEFAULT_VALUE(CPMenuItemIsEnabledKey, YES); - _isHidden = DEFAULT_VALUE(CPMenuItemIsHiddenKey, NO); - _tag = DEFAULT_VALUE(CPMenuItemTagKey, 0); - _state = DEFAULT_VALUE(CPMenuItemStateKey, CPOffState); + _isHidden = [aCoder decodeBoolForKey:CPMenuItemIsHiddenKey]; + _tag = [aCoder decodeIntForKey:CPMenuItemTagKey]; + _state = [aCoder decodeIntForKey:CPMenuItemStateKey]; - _image = DEFAULT_VALUE(CPMenuItemImageKey, nil); - _alternateImage = DEFAULT_VALUE(CPMenuItemAlternateImageKey, nil); + _image = [aCoder decodeObjectForKey:CPMenuItemImageKey]; + _alternateImage = [aCoder decodeObjectForKey:CPMenuItemAlternateImageKey]; // CPImage _onStateImage; // CPImage _offStateImage; // CPImage _mixedStateImage; // This order matters because setSubmenu: needs _menu to be around. - _menu = DEFAULT_VALUE(CPMenuItemMenuKey, nil); - [self setSubmenu:DEFAULT_VALUE(CPMenuItemSubmenuKey, nil)]; + _menu = [aCoder decodeObjectForKey:CPMenuItemMenuKey]; + [self setSubmenu:[aCoder decodeObjectForKey:CPMenuItemSubmenuKey]]; _keyEquivalent = [aCoder decodeObjectForKey:CPMenuItemKeyEquivalentKey] || @""; - _keyEquivalentModifierMask = [aCoder decodeObjectForKey:CPMenuItemKeyEquivalentModifierMaskKey] || 0; + _keyEquivalentModifierMask = [aCoder decodeIntForKey:CPMenuItemKeyEquivalentModifierMaskKey]; // int _mnemonicLocation; // BOOL _isAlternate; - // Default is 0. - [self setIndentationLevel:[aCoder decodeIntForKey:CPMenuItemIndentationLevelKey] || 0]; + [self setIndentationLevel:[aCoder decodeIntForKey:CPMenuItemIndentationLevelKey]]; // CPString _toolTip; - _representedObject = DEFAULT_VALUE(CPMenuItemRepresentedObjectKey, nil); - _view = DEFAULT_VALUE(CPMenuItemViewKey, nil); + _representedObject = [aCoder decodeObjectForKey:CPMenuItemRepresentedObjectKey]; + _view = [aCoder decodeObjectForKey:CPMenuItemViewKey]; } return self; diff --git a/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j b/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j index 06ee3eb29..179c084e9 100644 --- a/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j +++ b/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j @@ -148,10 +148,8 @@ var SelectionColor = nil, [_submenuIndicatorView setFrame:submenuViewFrame]; } - _minSize = CGSizeMake(x + HORIZONTAL_MARGIN, height); - [self setAutoresizesSubviews:NO]; - [self setFrameSize:_minSize]; + [self setFrameSize:CGSizeMake(x + HORIZONTAL_MARGIN, height)]; [self setAutoresizesSubviews:YES]; } diff --git a/AppKit/CPMenuItem/_CPMenuItemStandardView.j b/AppKit/CPMenuItem/_CPMenuItemStandardView.j index c6fc8182f..19f071c47 100644 --- a/AppKit/CPMenuItem/_CPMenuItemStandardView.j +++ b/AppKit/CPMenuItem/_CPMenuItemStandardView.j @@ -6,14 +6,14 @@ var LEFT_MARGIN = 3.0, STATE_COLUMN_WIDTH = 14.0, INDENTATION_WIDTH = 17.0, VERTICAL_MARGIN = 4.0, - + RIGHT_COLUMNS_MARGIN = 30.0, KEY_EQUIVALENT_MARGIN = 10.0; var SUBMENU_INDICATOR_COLOR = nil, _CPMenuItemSelectionColor = nil, _CPMenuItemTextShadowColor = nil, - + _CPMenuItemDefaultStateImages = [], _CPMenuItemDefaultStateHighlightedImages = []; @@ -43,9 +43,9 @@ var SUBMENU_INDICATOR_COLOR = nil, _CPMenuItemSelectionColor = [CPColor colorWithCalibratedRed:95.0 / 255.0 green:131.0 / 255.0 blue:185.0 / 255.0 alpha:1.0]; _CPMenuItemTextShadowColor = [CPColor colorWithCalibratedRed:26.0 / 255.0 green: 73.0 / 255.0 blue:109.0 / 255.0 alpha:1.0]; - + var bundle = [CPBundle bundleForClass:self]; - + _CPMenuItemDefaultStateImages[CPOffState] = nil; _CPMenuItemDefaultStateHighlightedImages[CPOffState] = nil; @@ -74,7 +74,7 @@ var SUBMENU_INDICATOR_COLOR = nil, { _stateView = [[CPImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 0.0)]; - [_stateView setImageScaling:CPScaleNone]; + [_stateView setImageScaling:CPImageScaleNone]; [self addSubview:_stateView]; @@ -175,7 +175,7 @@ var SUBMENU_INDICATOR_COLOR = nil, [_keyEquivalentView setTextShadowOffset:CGSizeMake(0, 1)]; [_keyEquivalentView setFrameOrigin:CGPointMake(x, VERTICAL_MARGIN)]; [_keyEquivalentView sizeToFit]; - + var keyEquivalentViewFrame = [_keyEquivalentView frame]; keyEquivalentViewFrame.origin.x = x; @@ -215,7 +215,7 @@ var SUBMENU_INDICATOR_COLOR = nil, keyEquivalentViewFrame.origin.y = FLOOR((height - CGRectGetHeight(keyEquivalentViewFrame)) / 2.0); [_keyEquivalentView setFrame:keyEquivalentViewFrame]; } - + if (hasSubmenu) { submenuViewFrame.origin.y = FLOOR((height - CGRectGetHeight(submenuViewFrame)) / 2.0); @@ -223,7 +223,7 @@ var SUBMENU_INDICATOR_COLOR = nil, } _minSize = CGSizeMake(x + RIGHT_MARGIN, height); - + [self setAutoresizesSubviews:NO]; [self setFrameSize:_minSize]; [self setAutoresizesSubviews:YES]; @@ -233,7 +233,7 @@ var SUBMENU_INDICATOR_COLOR = nil, { // FIXME: This should probably be even throw. if (![_menuItem isEnabled]) - return; + return; if (shouldHighlight) { @@ -259,7 +259,7 @@ var SUBMENU_INDICATOR_COLOR = nil, [_imageAndTextView setTextShadowColor:[self textShadowColor]]; [_keyEquivalentView setTextShadowColor:[self textShadowColor]]; } - + if ([[_menuItem menu] showsStateColumn]) { if (shouldHighlight) @@ -290,15 +290,15 @@ var SUBMENU_INDICATOR_COLOR = nil, { var context = [[CPGraphicsContext currentContext] graphicsPort], bounds = [self bounds]; - + CGContextBeginPath(context); - + CGContextMoveToPoint(context, CGRectGetMinX(bounds), CGRectGetMinY(bounds)); CGContextAddLineToPoint(context, CGRectGetMaxX(bounds), CGRectGetMidY(bounds)); CGContextAddLineToPoint(context, CGRectGetMinX(bounds), CGRectGetMaxY(bounds)); - + CGContextClosePath(context); - + CGContextSetFillColor(context, _color); CGContextFillPath(context); } diff --git a/AppKit/CPObjectController.j b/AppKit/CPObjectController.j index f9bda7a08..8999f84da 100644 --- a/AppKit/CPObjectController.j +++ b/AppKit/CPObjectController.j @@ -371,7 +371,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo [self setObjectClass:objectClass || [CPMutableDictionary class]]; [self setEditable:[aCoder decodeBoolForKey:CPObjectControllerIsEditableKey]]; - [self setAutomaticallyPreparesContent:[aCoder decodeBoolForKey:CPObjectControllerAutomaticallyPreparesContentKey] || NO]; + [self setAutomaticallyPreparesContent:[aCoder decodeBoolForKey:CPObjectControllerAutomaticallyPreparesContentKey]]; [self setContent:[aCoder decodeObjectForKey:CPObjectControllerContentKey]]; _observedKeys = [[CPCountedSet alloc] init]; @@ -579,6 +579,8 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo - (void)removeObjectAtIndex:(unsigned)anIndex { + var currentObject = [self objectAtIndex:anIndex]; + for (var i = 0, count = [_observationProxies count]; i < count; i++) { var proxy = [_observationProxies objectAtIndex:i], @@ -588,7 +590,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo if (operator) [self willChangeValueForKey:keyPath]; - [anObject removeObserver:proxy forKeyPath:keyPath]; + [currentObject removeObserver:proxy forKeyPath:keyPath]; if (operator) [self didChangeValueForKey:keyPath]; @@ -663,7 +665,8 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo - (id)_controllerMarkerForValues:(CPArray)theValues { - var count = [theValues count]; + var count = [theValues count], + value; if (!count) value = CPNoSelectionMarker; @@ -677,7 +680,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo { value = [theValues objectAtIndex:0]; - for (var i = 0, count= [theValues count]; i < count && value != CPMultipleValuesMarker; i++) + for (var i = 0, count = [theValues count]; i < count && value != CPMultipleValuesMarker; i++) { if (![value isEqual:[theValues objectAtIndex:i]]) value = CPMultipleValuesMarker; @@ -693,8 +696,8 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo - (id)valueForKeyPath:(CPString)theKeyPath { - var values = [[_controller selectedObjects] valueForKeyPath:theKeyPath]; - value = [self _controllerMarkerForValues:values]; + var values = [[_controller selectedObjects] valueForKeyPath:theKeyPath], + value = [self _controllerMarkerForValues:values]; [_cachedValues setObject:value forKey:theKeyPath]; @@ -776,8 +779,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo [proxy setNotifyObject:YES]; [_observationProxies addObject:proxy]; - // We keep are reference to the observed objects - // because the removeObserver: will be called after the selection changes + // We keep a reference to the observed objects because removeObserver: will be called after the selection changes. var observedObjects = [_controller selectedObjects]; _observedObjectsByKeyPath[aKeyPath] = observedObjects; [observedObjects addObserver:proxy forKeyPath:aKeyPath options:options context:context]; diff --git a/AppKit/CPOutlineView.j b/AppKit/CPOutlineView.j index 09a7b56c9..1a9dbcb4a 100644 --- a/AppKit/CPOutlineView.j +++ b/AppKit/CPOutlineView.j @@ -62,7 +62,7 @@ var CPOutlineViewDelegate_outlineView_dataViewForTableColumn_item_ CPOutlineViewDelegate_outlineView_shouldReorderColumn_toColumn_ = 1 << 12, CPOutlineViewDelegate_outlineView_shouldSelectItem_ = 1 << 13, CPOutlineViewDelegate_outlineView_shouldSelectTableColumn_ = 1 << 14, - CPOutlineViewDelegate_outlineView_shouldShowOutlineViewForItem_ = 1 << 15, + CPOutlineViewDelegate_outlineView_shouldShowOutlineDisclosureControlForItem_ = 1 << 15, CPOutlineViewDelegate_outlineView_shouldShowViewExpansionForTableColumn_item_ = 1 << 16, CPOutlineViewDelegate_outlineView_shouldTrackView_forTableColumn_item_ = 1 << 17, CPOutlineViewDelegate_outlineView_shouldTypeSelectForEvent_withCurrentSearchString_ = 1 << 18, @@ -80,6 +80,10 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, CPOutlineViewCoalesceSelectionNotificationStateOn = 1, CPOutlineViewCoalesceSelectionNotificationStateDid = 2; +#define SELECTION_SHOULD_CHANGE(anOutlineView) (!((anOutlineView)._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_selectionShouldChangeInOutlineView_) || [(anOutlineView)._outlineViewDelegate selectionShouldChangeInOutlineView:(anOutlineView)]) + +#define SHOULD_SELECT_ITEM(anOutlineView, anItem) (!((anOutlineView)._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldSelectItem_) || [(anOutlineView)._outlineViewDelegate outlineView:(anOutlineView) shouldSelectItem:(anItem)]) + /*! @ingroup appkit @class CPOutlineView @@ -136,7 +140,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, _selectionHighlightStyle = CPTableViewSelectionHighlightStyleSourceList; // The root item has weight "0", thus represents the weight solely of its descendants. - _rootItemInfo = { isExpanded:YES, isExpandable:NO, level:-1, row:-1, children:[], weight:0 }; + _rootItemInfo = { isExpanded:YES, isExpandable:NO, shouldShowOutlineDisclosureControl:NO, level:-1, row:-1, children:[], weight:0 }; _itemsForRows = []; _itemInfosForItems = { }; @@ -147,7 +151,6 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, _retargedChildIndex = nil; _shouldRetargetChildIndex = NO; - _startHoverTime = nil; [self setIndentationPerLevel:16.0]; [self setIndentationMarkerFollowsDataView:YES]; @@ -294,6 +297,19 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, return itemInfo.isExpandable; } +- (BOOL)_shouldShowOutlineDisclosureControlForItem:(id)anItem +{ + if (!anItem) + return YES; + + var itemInfo = _itemInfosForItems[[anItem UID]]; + + if (!itemInfo) + return YES; + + return itemInfo.shouldShowOutlineDisclosureControl; +} + /*! Used to find if an item is already expanded. @@ -690,7 +706,8 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, */ - (CGRect)frameOfOutlineDisclosureControlAtRow:(CPInteger)aRow { - if (![self isExpandable:[self itemAtRow:aRow]]) + var theItem = [self itemAtRow:aRow]; + if (![self isExpandable:theItem] || ![self _shouldShowOutlineDisclosureControlForItem:theItem]) return _CGRectMakeZero(); var dataViewFrame = [self _frameOfOutlineDataViewAtRow:aRow], @@ -822,29 +839,24 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, name:CPOutlineViewSelectionIsChangingNotification object:self]; - - if ([_outlineViewDelegate respondsToSelector:@selector(outlineViewItemWillExpand:)]) [defaultCenter removeObserver:_outlineViewDelegate name:CPOutlineViewItemWillExpandNotification object:self]; - if ([_outlineViewDelegate respondsToSelector:@selector(outlineViewItemDidExpand:)]) [defaultCenter removeObserver:_outlineViewDelegate name:CPOutlineViewItemDidExpandNotification object:self]; - if ([_outlineViewDelegate respondsToSelector:@selector(outlineViewItemWillCollapse:)]) [defaultCenter removeObserver:_outlineViewDelegate name:CPOutlineViewItemWillCollapseNotification object:self]; - if ([_outlineViewDelegate respondsToSelector:@selector(outlineViewItemDidCollapse:)]) [defaultCenter removeObserver:_outlineViewDelegate @@ -870,7 +882,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, CPOutlineViewDelegate_outlineView_shouldReorderColumn_toColumn_ , @selector(outlineView:shouldReorderColumn:toColumn:), CPOutlineViewDelegate_outlineView_shouldSelectItem_ , @selector(outlineView:shouldSelectItem:), CPOutlineViewDelegate_outlineView_shouldSelectTableColumn_ , @selector(outlineView:shouldSelectTableColumn:), - CPOutlineViewDelegate_outlineView_shouldShowOutlineViewForItem_ , @selector(outlineView:shouldShowOutlineViewForItem:), + CPOutlineViewDelegate_outlineView_shouldShowOutlineDisclosureControlForItem_ , @selector(outlineView:shouldShowOutlineDisclosureControlForItem:), CPOutlineViewDelegate_outlineView_shouldShowViewExpansionForTableColumn_item_ , @selector(outlineView:shouldShowViewExpansionForTableColumn:item:), CPOutlineViewDelegate_outlineView_shouldTrackView_forTableColumn_item_ , @selector(outlineView:shouldTrackView:forTableColumn:item:), CPOutlineViewDelegate_outlineView_shouldTypeSelectForEvent_withCurrentSearchString_ , @selector(outlineView:shouldTypeSelectForEvent:withCurrentSearchString:), @@ -921,7 +933,6 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, name:CPOutlineViewSelectionIsChangingNotification object:self]; - if ([_outlineViewDelegate respondsToSelector:@selector(outlineViewItemWillExpand:)]) [defaultCenter addObserver:_outlineViewDelegate @@ -984,7 +995,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, _disclosureControlData = nil; _disclosureControlQueue = []; - // fIXME: really? + // FIXME: really? [self reloadData]; } @@ -1285,7 +1296,12 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, item = _itemsForRows[row], isExpandable = [self isExpandable:item]; - if (!isExpandable) + if (!isExpandable) + continue; + + var disclosureControlFrame = [self frameOfOutlineDisclosureControlAtRow:row]; + + if (_CGRectIsEmpty(disclosureControlFrame)) continue; var control = [self _dequeueDisclosureControl]; @@ -1295,7 +1311,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, [control setState:[self isItemExpanded:item] ? CPOnState : CPOffState]; var selector = [self isRowSelected:row] ? @"setThemeState:" : @"unsetThemeState:"; [control performSelector:CPSelectorFromString(selector) withObject:CPThemeStateSelected]; - [control setFrame:[self frameOfOutlineDisclosureControlAtRow:row]]; + [control setFrame:disclosureControlFrame]; [self addSubview:control]; } @@ -1348,7 +1364,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, [self collapseItem:item]; else - [self expandItem:item]; + [self expandItem:item expandChildren:([[CPApp currentEvent] modifierFlags] & CPAlternateKeyMask)]; } /*! @@ -1459,7 +1475,6 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, userInfo:[CPDictionary dictionaryWithObject:item forKey:"CPObject"]]; } - - (void)keyDown:(CPEvent)anEvent { var character = [anEvent charactersIgnoringModifiers], @@ -1483,7 +1498,6 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, for (; i < c; i++) items.push([self itemAtRow:indexes[i]]); - if (character === CPRightArrowFunctionKey) { for (var i = 0; i < c; i++) @@ -1491,12 +1505,32 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, } else if (character === CPLeftArrowFunctionKey) { + // When a single, collapsed item is selected and the left arrow key is pressed, the parent + // should be selected if possible. + if (c == 1) + { + var theItem = items[0]; + if (![self isItemExpanded:theItem]) + { + var parent = [self parentForItem:theItem], + shouldSelect = parent && SELECTION_SHOULD_CHANGE(self) && SHOULD_SELECT_ITEM(self, parent); + if (shouldSelect) + { + var rowIndex = [self rowForItem:parent]; + [self selectRowIndexes:[CPIndexSet indexSetWithIndex:rowIndex] byExtendingSelection:NO]; + [self scrollRowToVisible:rowIndex]; + return; + } + } + } + for (var i = 0; i < c; i++) [self collapseItem:items[i]]; } [super keyDown:anEvent]; } + @end // FIX ME: We're using with() here because Safari fails if we use anOutlineView._itemInfosForItems or whatever... @@ -1535,6 +1569,7 @@ var _reloadItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anItem) itemInfo.isExpandable = [dataSource outlineView:anOutlineView isItemExpandable:newItem]; itemInfo.isExpanded = itemInfo.isExpandable && itemInfo.isExpanded; + itemInfo.shouldShowOutlineDisclosureControl = !(_implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldShowOutlineDisclosureControlForItem_) || [_outlineViewDelegate outlineView:self shouldShowOutlineDisclosureControlForItem:newItem]; } }; @@ -1560,6 +1595,7 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt return []; itemInfo.isExpandable = [dataSource outlineView:anOutlineView isItemExpandable:anItem]; + itemInfo.shouldShowOutlineDisclosureControl = !(_implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldShowOutlineDisclosureControlForItem_) || [_outlineViewDelegate outlineView:self shouldShowOutlineDisclosureControlForItem:anItem]; // If we were previously expanded, but now no longer expandable, "de-expand". // NOTE: we are *not* collapsing, thus no notification is posted. @@ -1590,7 +1626,7 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt if (!childItemInfo) { - childItemInfo = { isExpanded:NO, isExpandable:NO, children:[], weight:1 }; + childItemInfo = { isExpanded:NO, isExpandable:NO, shouldShowOutlineDisclosureControl:YES, children:[], weight:1 }; itemInfosForItems[[childItem UID]] = childItemInfo; } @@ -1793,9 +1829,9 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt var dataView = nil; if ((_outlineView._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_dataViewForTableColumn_item_)) - dataView = [_outlineView._outlineViewDelegate outlineView:_outlineView - dataViewForTableColumn:theTableColumn - item:[_outlineView itemAtRow:theRow]]; + dataView = [_outlineView._outlineViewDelegate outlineView:_outlineView + dataViewForTableColumn:theTableColumn + item:[_outlineView itemAtRow:theRow]]; if (!dataView) dataView = [theTableColumn dataViewForRow:theRow]; @@ -1805,10 +1841,12 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt - (BOOL)tableView:(CPTableView)theTableView shouldSelectRow:(int)theRow { - if ((_outlineView._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldSelectItem_)) - return [_outlineView._outlineViewDelegate outlineView:_outlineView shouldSelectItem:[_outlineView itemAtRow:theRow]]; + return SHOULD_SELECT_ITEM(_outlineView, [_outlineView itemAtRow:theRow]); +} - return YES; +- (BOOL)selectionShouldChangeInTableView:(CPTableView)theTableView +{ + return SELECTION_SHOULD_CHANGE(_outlineView); } - (BOOL)tableView:(CPTableView)aTableView shouldEditTableColumn:(CPTableColumn)aColumn row:(int)aRow @@ -1886,16 +1924,22 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt - (void)drawRect:(CGRect)aRect { var bounds = [self bounds], - context = [[CPGraphicsContext currentContext] graphicsPort]; + context = [[CPGraphicsContext currentContext] graphicsPort], + width = _CGRectGetWidth(bounds), + height = _CGRectGetHeight(bounds); CGContextBeginPath(context); - CGContextTranslateCTM(context, _CGRectGetWidth(bounds) / 2.0, _CGRectGetHeight(bounds) / 2.0); - CGContextRotateCTM(context, _angle); - CGContextTranslateCTM(context, -_CGRectGetWidth(bounds) / 2.0, -_CGRectGetHeight(bounds) / 2.0); + if (_angle) + { + var centre = _CGPointMake(FLOOR(width / 2.0), FLOOR(height / 2.0)); + CGContextTranslateCTM(context, centre.x, centre.y); + CGContextRotateCTM(context, _angle); + CGContextTranslateCTM(context, -centre.x, -centre.y); + } // Center, but crisp. - CGContextTranslateCTM(context, FLOOR((_CGRectGetWidth(bounds) - 9.0) / 2.0), FLOOR((_CGRectGetHeight(bounds) - 8.0) / 2.0)); + CGContextTranslateCTM(context, FLOOR((width - 9.0) / 2.0), FLOOR((height - 8.0) / 2.0)); CGContextMoveToPoint(context, 0.0, 0.0); CGContextAddLineToPoint(context, 9.0, 0.0); @@ -1908,20 +1952,14 @@ var _loadItemInfoForItem = function(/*CPOutlineView*/ anOutlineView, /*id*/ anIt [self hasThemeState:CPThemeStateHighlighted])); CGContextFillPath(context); - CGContextBeginPath(context); CGContextMoveToPoint(context, 0.0, 0.0); + CGContextAddLineToPoint(context, 4.5, 8.0); if (_angle === 0.0) - { - CGContextAddLineToPoint(context, 4.5, 8.0); CGContextAddLineToPoint(context, 9.0, 0.0); - } - else - CGContextAddLineToPoint(context, 4.5, 8.0); - - CGContextSetStrokeColor(context, [CPColor colorWithCalibratedWhite:1.0 alpha: 0.8]); + CGContextSetStrokeColor(context, [CPColor colorWithCalibratedWhite:1.0 alpha: 0.7]); CGContextStrokePath(context); } diff --git a/AppKit/CPPopUpButton.j b/AppKit/CPPopUpButton.j index 1572baca9..cbc011db0 100644 --- a/AppKit/CPPopUpButton.j +++ b/AppKit/CPPopUpButton.j @@ -249,7 +249,7 @@ CPPopUpButtonStatePullsDown = CPThemeState("pulls-down"); /*! @ignore */ -- (int)selectedTag +- (int)_selectedTag { return [[self selectedItem] tag]; } diff --git a/AppKit/CPPopover.j b/AppKit/CPPopover.j index 711a5ef26..3c7483760 100644 --- a/AppKit/CPPopover.j +++ b/AppKit/CPPopover.j @@ -35,7 +35,6 @@ CPPopoverBehaviorApplicationDefined = 0; CPPopoverBehaviorTransient = 1; CPPopoverBehaviorSemitransient = 2; - var CPPopoverDelegate_popover_willShow_ = 1 << 0, CPPopoverDelegate_popover_didShow_ = 1 << 1, CPPopoverDelegate_popover_shouldClose_ = 1 << 2, @@ -50,11 +49,14 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, view relative to another one. Delegate can implement: - – popoverShouldClose:(CPPopover)aPopOver - – popoverWillShow:(CPPopover)aPopOver - – popoverDidShow:(CPPopover)aPopOver - – popoverWillClose:(CPPopover)aPopOver - – popoverDidClose:(CPPopover)aPopOver + + @code + – popoverShouldClose:(CPPopover)aPopOver + – popoverWillShow:(CPPopover)aPopOver + – popoverDidShow:(CPPopover)aPopOver + – popoverWillClose:(CPPopover)aPopOver + – popoverDidClose:(CPPopover)aPopOver + @endcode */ @implementation CPPopover : CPResponder { @@ -62,11 +64,9 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, @outlet id _delegate @accessors(getter=delegate); BOOL _animates @accessors(property=animates); - BOOL _shown @accessors(getter=shown); int _appearance @accessors(property=appearance); int _behavior @accessors(getter=behavior); - BOOL _needsCompute; _CPAttachedWindow _attachedWindow; int _implementedDelegateMethods; } @@ -78,17 +78,15 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, /*! Initialize the CPPopover witn default values - @returns anInitialized CPPopover + @returns an initialized CPPopover */ - (CPPopover)init { if (self = [super init]) { - _animates = YES; - _appearance = CPPopoverAppearanceMinimal; - _behavior = CPPopoverBehaviorApplicationDefined; - _needsCompute = YES; - _shown = NO; + _animates = YES; + _appearance = CPPopoverAppearanceMinimal; + _behavior = CPPopoverBehaviorApplicationDefined; } return self; @@ -101,21 +99,21 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, /*! Returns the current rect of the popover - @return CPRect represeting the frame of the popover + @return CGRect representing the frame of the popover */ -- (CPRect)positioningRect +- (CGRect)positioningRect { - if (!_attachedWindow || ![_attachedWindow isVisible]) - return nil; + if (![_attachedWindow isVisible]) + return CGRectMakeZero(); return [_attachedWindow frame]; } /*! Sets the frame of the popover @param aRect the desired frame */ -- (void)setPositioningRect:(CPRect)aRect +- (void)setPositioningRect:(CGRect)aRect { - if (!_attachedWindow || ![_attachedWindow isVisible]) + if (![_attachedWindow isVisible]) return; [_attachedWindow setFrame:aRect]; } @@ -123,12 +121,12 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, /*! Returns the size of the popover's view - @return CPSize represeting the size of the popover's view + @return CGSize representing the size of the popover's view */ -- (CPRect)contentSize +- (CGSize)contentSize { - if (!_attachedWindow || ![_attachedWindow isVisible]) - return nil; + if (![_attachedWindow isVisible]) + return CGRectMakeZero(); return [[_contentViewController view] frameSize]; } @@ -145,21 +143,20 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, /*! Indicates if CPPopover is visible - @returns YES if visible + @returns \c YES if visible */ -- (BOOL)shown +- (BOOL)isShown { - if (!_attachedWindow) - return NO; return [_attachedWindow isVisible]; } /*! - Set the behaviour of the CPPopover. It can be - - CPPopoverBehaviorTransient: the popover will be close if another control outside the popover become the responder - - CPPopoverBehaviorApplicationDefined: (DEFAULT) the application is responsible for closing the popover +Set the behaviour of the CPPopover. It can be: - @param aBehaviour the desired behaviour +- \c CPPopoverBehaviorTransient: the popover will close if another control outside the popover becomes the responder +- \c CPPopoverBehaviorApplicationDefined: (DEFAULT) the application is responsible for closing the popover + +@param aBehaviour the desired behaviour */ - (void)setBehaviour:(int)aBehaviour { @@ -167,10 +164,9 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, return; _behavior = aBehaviour; - _needsCompute = YES; + [_attachedWindow setStyleMask:[self styleMaskForBehavior]]; } - - (void)setDelegate:(id)aDelegate { if (_delegate === aDelegate) @@ -203,20 +199,31 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, @param positioningRect if set, the popover will be positionned to a random rect relative to the window @param positioningView if set, the popover will be positioned relative to this view - @param preferredEdge: CPRectEdge representing the preferred positioning. + @param preferredEdge: \c CPRectEdge representing the preferred positioning. */ -- (void)showRelativeToRect:(CPRect)positioningRect ofView:(CPView)positioningView preferredEdge:(CPRectEdge)preferredEdge +- (void)showRelativeToRect:(CGRect)positioningRect ofView:(CPView)positioningView preferredEdge:(CPRectEdge)preferredEdge { + if (!positioningView) + [CPException raise:CPInvalidArgumentException reason:"positionView must not be nil"]; + + if (!_contentViewController) + [CPException raise:CPInternalInconsistencyException reason:@"contentViewController must not be nil"]; + + // If the popover is currently closing, do nothing. That is what Cocoa does. + if ([_attachedWindow isClosing]) + return; + if (_implementedDelegateMethods & CPPopoverDelegate_popover_willShow_) [_delegate popoverWillShow:self]; - if (!_contentViewController) - [CPException raise:CPInternalInconsistencyException reason:@"contentViewController must not be nil"]; - - if (_needsCompute || !_attachedWindow) + if (!_attachedWindow) { - var styleMask = (_behavior == CPPopoverBehaviorTransient) ? CPClosableOnBlurWindowMask : nil; - _attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:CPRectMakeZero() styleMask:styleMask]; + _attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:[self styleMaskForBehavior]]; + + var parentWindow = [positioningView window]; + + if (![parentWindow isKindOfClass:_CPAttachedWindow]) + [[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(parentWindowWillClose:) name:CPWindowWillCloseNotification object:parentWindow]; } [_attachedWindow setAppearance:_appearance]; @@ -225,34 +232,40 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, [_attachedWindow setMovableByWindowBackground:NO]; [_attachedWindow setFrame:[_attachedWindow frameRectForContentRect:[[_contentViewController view] frame]]]; [_attachedWindow setContentView:[_contentViewController view]]; - - if (positioningRect) - [_attachedWindow positionRelativeToRect:positioningRect preferredEdge:preferredEdge]; - else if (positioningView) - [_attachedWindow positionRelativeToView:positioningView preferredEdge:preferredEdge]; - else - [CPException raise:CPInvalidArgumentException reason:@"a value must be passed for positioningRect or positioningView"]; + [_attachedWindow positionRelativeToRect:positioningRect ofView:positioningView preferredEdge:preferredEdge]; if (_implementedDelegateMethods & CPPopoverDelegate_popover_didShow_) [_delegate popoverDidShow:self]; } +- (unsigned)styleMaskForBehavior +{ + return (_behavior == CPPopoverBehaviorTransient) ? CPClosableOnBlurWindowMask : 0; +} + /*! Closes the popover */ - (void)close { - if (_implementedDelegateMethods & CPPopoverDelegate_popover_shouldClose_) - if (![_delegate popoverShouldClose:self]) - return; + [self _close]; +} + +/*! + Closes the popover +*/ +- (void)_close +{ + if ([_attachedWindow isClosing] || ![self isShown]) + return; if (_implementedDelegateMethods & CPPopoverDelegate_popover_willClose_) [_delegate popoverWillClose:self]; [_attachedWindow close]; - if (_implementedDelegateMethods & CPPopoverDelegate_popover_didClose_) - [_delegate popoverDidClose:self]; + // popoverDidClose will be sent from attachedWindowDidClose, since + // the attached window will close asynchronously when animating. } @@ -262,11 +275,18 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, /*! Close the popover - @param aSender the sender of the action + @param sender the sender of the action */ -- (IBAction)performClose:(id)aSender +- (IBAction)performClose:(id)sender { - [self close]; + if ([_attachedWindow isClosing]) + return; + + if (_implementedDelegateMethods & CPPopoverDelegate_popover_shouldClose_) + if (![_delegate popoverShouldClose:self]) + return; + + [self _close]; } @@ -278,14 +298,38 @@ var CPPopoverDelegate_popover_willShow_ = 1 << 0, { [self close]; - // we return NO, because we want the CPPopover to compute - // if the attached can be close in order to send delegate messages + // We return NO, because we want the CPPopover to determine + // if the attached window can be closed and to give us a chance + // to send delegate messages. return NO; } +/*! @ignore */ +- (void)attachedWindowDidClose:(_CPAttachedWindow)anAttachedWindow +{ + if (_implementedDelegateMethods & CPPopoverDelegate_popover_didClose_) + [_delegate popoverDidClose:self]; +} + + +#pragma mark - +#pragma mark Notifications + +/*! + @ignore + + This method is called only when a non-popover parent window + is closing. In that case popovers should order out. +*/ +- (void)parentWindowWillClose:(CPNotification)aNotification +{ + [_attachedWindow orderOut:nil]; + [self performClose:nil]; +} + @end -var CPPopoverNeedsComputeKey = @"CPPopoverNeedsComputeKey", +var CPPopoverNeedsNewAttachedWindowKey = @"CPPopoverNeedsNewAttachedWindowKey", CPPopoverAppearanceKey = @"CPPopoverAppearanceKey", CPPopoverAnimatesKey = @"CPPopoverAnimatesKey", CPPopoverContentViewControllerKey = @"CPPopoverContentViewControllerKey", @@ -300,7 +344,6 @@ var CPPopoverNeedsComputeKey = @"CPPopoverNeedsComputeKey", if (self) { - _needsCompute = [aCoder decodeIntForKey:CPPopoverNeedsComputeKey]; _appearance = [aCoder decodeIntForKey:CPPopoverAppearanceKey]; _animates = [aCoder decodeBoolForKey:CPPopoverAnimatesKey]; _contentViewController = [aCoder decodeObjectForKey:CPPopoverContentViewControllerKey]; @@ -314,9 +357,8 @@ var CPPopoverNeedsComputeKey = @"CPPopoverNeedsComputeKey", { [super encodeWithCoder:aCoder]; - [aCoder encodeBool:_needsCompute forKey:CPPopoverNeedsComputeKey]; [aCoder encodeInt:_appearance forKey:CPPopoverAppearanceKey]; - [aCoder encodeObject:_animates forKey:CPPopoverAnimatesKey]; + [aCoder encodeBool:_animates forKey:CPPopoverAnimatesKey]; [aCoder encodeObject:_contentViewController forKey:CPPopoverContentViewControllerKey]; [aCoder encodeObject:_delegate forKey:CPPopoverDelegateKey]; [aCoder encodeInt:_behavior forKey:CPPopoverBehaviorKey]; diff --git a/AppKit/CPProgressIndicator.j b/AppKit/CPProgressIndicator.j index 4722dac9a..e1e30b571 100644 --- a/AppKit/CPProgressIndicator.j +++ b/AppKit/CPProgressIndicator.j @@ -88,9 +88,9 @@ var CPProgressIndicatorSpinningStyleColors = nil, CPProgressIndicatorSpinningStyleColors = []; CPProgressIndicatorSpinningStyleColors[CPMiniControlSize] = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile: - [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"] size:CGSizeMake(64.0, 64.0)]]; + [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif"] size:CGSizeMake(16.0, 16.0)]]; CPProgressIndicatorSpinningStyleColors[CPSmallControlSize] = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile: - [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"] size:CGSizeMake(64.0, 64.0)]]; + [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif"] size:CGSizeMake(32.0, 32.0)]]; CPProgressIndicatorSpinningStyleColors[CPRegularControlSize] = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile: [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"] size:CGSizeMake(64.0, 64.0)]]; @@ -477,7 +477,7 @@ var CPProgressIndicatorSpinningStyleColors = nil, _doubleValue = [aCoder decodeObjectForKey:@"_doubleValue"]; _controlSize = [aCoder decodeObjectForKey:@"_controlSize"]; _isIndeterminate = [aCoder decodeObjectForKey:@"_isIndeterminate"]; - _style = [aCoder decodeObjectForKey:@"_style"]; + _style = [aCoder decodeIntForKey:@"_style"]; _isAnimating = [aCoder decodeObjectForKey:@"_isAnimating"]; _isDisplayedWhenStoppedSet = [aCoder decodeObjectForKey:@"_isDisplayedWhenStoppedSet"]; _isDisplayedWhenStopped = [aCoder decodeObjectForKey:@"_isDisplayedWhenStopped"]; @@ -495,7 +495,7 @@ var CPProgressIndicatorSpinningStyleColors = nil, [aCoder encodeObject:_doubleValue forKey:@"_doubleValue"]; [aCoder encodeObject:_controlSize forKey:@"_controlSize"]; [aCoder encodeObject:_isIndeterminate forKey:@"_isIndeterminate"]; - [aCoder encodeObject:_style forKey:@"_style"]; + [aCoder encodeInt:_style forKey:@"_style"]; [aCoder encodeObject:_isAnimating forKey:@"_isAnimating"]; [aCoder encodeObject:_isDisplayedWhenStoppedSet forKey:@"_isDisplayedWhenStoppedSet"]; [aCoder encodeObject:_isDisplayedWhenStopped forKey:@"_isDisplayedWhenStopped"]; diff --git a/AppKit/CPRuleEditor/CPPredicateEditor.j b/AppKit/CPRuleEditor/CPPredicateEditor.j index 7127f43b6..64fc86604 100644 --- a/AppKit/CPRuleEditor/CPPredicateEditor.j +++ b/AppKit/CPRuleEditor/CPPredicateEditor.j @@ -377,7 +377,8 @@ { var rootRowsArray = [super _rootRowsArray], subpredicates = [CPMutableArray array], - count = count2 = [rootRowsArray count], + count, + count2 = count = [rootRowsArray count], predicate; while (count--) @@ -405,12 +406,13 @@ if (rowType == CPRuleEditorRowTypeCompound) { var subrows = [rowItem valueForKey:_subrowsArrayKeyPath], - count = [subrows count]; + count = [subrows count]; for (var i = 0; i < count; i++) { - var subrow = [subrows objectAtIndex:i]; - var predicate = [self _predicateFromRowItem:subrow]; + var subrow = [subrows objectAtIndex:i], + predicate = [self _predicateFromRowItem:subrow]; + [subpredicates addObject:predicate]; } } @@ -514,9 +516,11 @@ var CPPredicateTemplatesKey = @"CPPredicateTemplates"; - (id)initWithCoder:(id)aCoder { self = [super initWithCoder:aCoder]; + if (self != nil) { var nibTemplates = [aCoder decodeObjectForKey:CPPredicateTemplatesKey]; + if (nibTemplates != nil) [self setRowTemplates:nibTemplates]; } diff --git a/AppKit/CPRuleEditor/CPRuleEditor.j b/AppKit/CPRuleEditor/CPRuleEditor.j index 11061411a..b5767ca0a 100644 --- a/AppKit/CPRuleEditor/CPRuleEditor.j +++ b/AppKit/CPRuleEditor/CPRuleEditor.j @@ -141,7 +141,7 @@ var itemsContext = "items", - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; - if (self != nil) + if (self !== nil) { _slices = [[CPMutableArray alloc] init]; @@ -150,7 +150,7 @@ var itemsContext = "items", _editable = YES; _allowsEmptyCompoundRows = NO; _disallowEmpty = NO; - + [self setFormattingStringsFilename:nil]; [self setCriteriaKeyPath:@"criteria"]; [self setSubrowsKeyPath:@"subrows"]; @@ -190,7 +190,7 @@ var itemsContext = "items", [_slicesHolder addSubview:_dropLineView]; [self registerForDraggedTypes:[CPArray arrayWithObjects:CPRuleEditorItemPBoardType,nil]]; - [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:boundArrayContext]; + [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:boundArrayContext]; } /*! @endcond */ @@ -247,7 +247,7 @@ var itemsContext = "items", */ - (void)setEditable:(BOOL)editable { - if (editable == _editable) + if (editable === _editable) return; _editable = editable; @@ -277,7 +277,7 @@ var itemsContext = "items", */ - (void)setNestingMode:(CPRuleEditorNestingMode)mode { - if (mode != _nestingMode) + if (mode !== _nestingMode) { _nestingMode = mode; if ([self numberOfRows] > 0) @@ -344,7 +344,7 @@ var itemsContext = "items", */ - (void)setRowHeight:(float)height { - if (height == _sliceHeight) + if (height === _sliceHeight) return; _sliceHeight = MAX([self _minimumFrameHeight], height); @@ -398,10 +398,10 @@ var itemsContext = "items", */ - (void)setFormattingStringsFilename:(CPString)stringsFilename { - if (_standardLocalizer == nil) + if (_standardLocalizer === nil) _standardLocalizer = [_CPRuleEditorLocalizer new]; - if (_stringsFilename != stringsFilename) + if (_stringsFilename !== stringsFilename) { _stringsFilename = stringsFilename; @@ -410,7 +410,7 @@ var itemsContext = "items", if (![stringsFilename hasSuffix:@".strings"]) stringsFilename = stringsFilename + @".strings"; var path = [[CPBundle mainBundle] pathForResource:stringsFilename]; - if (path !=nil) + if (path !== nil) [_standardLocalizer loadContentOfURL:[CPURL URLWithString:path]]; } } @@ -441,7 +441,7 @@ var itemsContext = "items", */ - (void)setCriteria:(CPArray)criteria andDisplayValues:(CPArray)values forRowAtIndex:(int)rowIndex { - if (criteria == nil || values == nil) + if (criteria === nil || values === nil) [CPException raise:CPInvalidArgumentException reason:_cmd + @". criteria and values parameters must not be nil."]; if (rowIndex < 0 || rowIndex >= [self numberOfRows]) @@ -511,12 +511,12 @@ var itemsContext = "items", for (var current_index = 0; current_index < rowIndex; current_index++) { - if ([self rowTypeForRow:current_index] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:current_index] === CPRuleEditorRowTypeCompound) { var candidate = [[self _rowCacheForIndex:current_index] rowObject], subObjects = [[self _subrowObjectsOfObject:candidate] _representedObject]; - if ([subObjects indexOfObjectIdenticalTo:targetObject] != CPNotFound) + if ([subObjects indexOfObjectIdenticalTo:targetObject] !== CPNotFound) return current_index; } } @@ -567,7 +567,8 @@ TODO: implement - (CPIndexSet)subrowIndexesForRow:(int)rowIndex { var object; - if (rowIndex == -1) + + if (rowIndex === -1) object = _boundArrayOwner; else object = [[self _rowCacheForIndex:rowIndex] rowObject]; @@ -582,16 +583,16 @@ TODO: implement var candidate = [[self _rowCacheForIndex:i] rowObject], indexInSubrows = [[subobjects _representedObject] indexOfObjectIdenticalTo:candidate]; - if (indexInSubrows != CPNotFound) + if (indexInSubrows !== CPNotFound) { [indexes addIndex:i]; objectsCount --; - if ([self rowTypeForRow:i] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:i] === CPRuleEditorRowTypeCompound) i += [[self subrowIndexesForRow:i] count]; } - if (objectsCount == 0) + if (objectsCount === 0) break; } @@ -627,12 +628,12 @@ TODO: implement { var slice = _slices[count], rowIndex = [slice rowIndex], - contains = [indexes containsIndex:rowIndex]; + contains = [indexes containsIndex:rowIndex], shouldSelect = (contains && !(extend && [slice _isSelected])); if (contains) [slice _setSelected:shouldSelect]; - [slice _setLastSelected:(rowIndex == lastSelected)]; + [slice _setLastSelected:(rowIndex === lastSelected)]; [slice setNeedsDisplay:YES]; } } @@ -674,7 +675,7 @@ TODO: implement break; default: [CPException raise:CPInvalidArgumentException reason:@"Not supported CPRuleEditorNestingMode " + nestingMode]; - // Compound mode: parentRowIndex=(lastRowType == CPRuleEditorRowTypeCompound)?lastRow :[self parentRowForRow:lastRow]; break; + // Compound mode: parentRowIndex=(lastRowType === CPRuleEditorRowTypeCompound)?lastRow :[self parentRowForRow:lastRow]; break; } [self insertRowAtIndex:numberOfRows withType:rowtype asSubrowOfRow:parentRowIndex animate:YES]; @@ -696,7 +697,7 @@ TODO: implement */ var newObject = [self _insertNewRowAtIndex:rowIndex ofType:rowType withParentRow:parentRow]; - if (rowType == CPRuleEditorRowTypeCompound && !_allowsEmptyCompoundRows) + if (rowType === CPRuleEditorRowTypeCompound && !_allowsEmptyCompoundRows) { var subrow = [self _insertNewRowAtIndex:(rowIndex + 1) ofType:CPRuleEditorRowTypeSimple withParentRow:rowIndex]; } @@ -727,7 +728,7 @@ TODO: implement */ - (void)removeRowsAtIndexes:(CPIndexSet)rowIndexes includeSubrows:(BOOL)includeSubrows { - if ([rowIndexes count] == 0) + if ([rowIndexes count] === 0) return; if ([rowIndexes lastIndex] >= [self numberOfRows]) @@ -738,7 +739,7 @@ TODO: implement childsIndexes = [CPMutableIndexSet indexSet], subrows; - if (parentRowIndex == -1) + if (parentRowIndex === -1) subrows = [self _rootRowsArray]; else { @@ -746,15 +747,15 @@ TODO: implement subrows = [self _subrowObjectsOfObject:parentRowObject]; } - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var rowObject = [[self _rowCacheForIndex:current_index] rowObject], relativeChildIndex = [[subrows _representedObject] indexOfObjectIdenticalTo:rowObject]; - if (relativeChildIndex != CPNotFound) + if (relativeChildIndex !== CPNotFound) [childsIndexes addIndex:relativeChildIndex]; - if (includeSubrows && [self rowTypeForRow:current_index] == CPRuleEditorRowTypeCompound) + if (includeSubrows && [self rowTypeForRow:current_index] === CPRuleEditorRowTypeCompound) { var more_childs = [self subrowIndexesForRow:current_index]; [self removeRowsAtIndexes:more_childs includeSubrows:includeSubrows]; @@ -814,20 +815,20 @@ TODO: implement [predicateParts addEntriesFromDictionary:predpart]; } - if ([self rowTypeForRow:aRow] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:aRow] === CPRuleEditorRowTypeCompound) { var compoundPredicate, subpredicates = [CPMutableArray array], subrowsIndexes = [self subrowIndexesForRow:aRow]; - if ([subrowsIndexes count] == 0) + if ([subrowsIndexes count] === 0) return nil; var current_index = [subrowsIndexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var subpredicate = [self predicateForRow:current_index]; - if (subpredicate != nil) + if (subpredicate !== nil) [subpredicates addObject:subpredicate]; current_index = [subrowsIndexes indexGreaterThanIndex:current_index]; @@ -835,7 +836,7 @@ TODO: implement var compoundType = [predicateParts objectForKey:CPRuleEditorPredicateCompoundType]; - if ([subpredicates count] == 0) + if ([subpredicates count] === 0) return nil; else { @@ -863,16 +864,33 @@ TODO: implement modifier = [predicateParts objectForKey:CPRuleEditorPredicateComparisonModifier], selector = CPSelectorFromString([predicateParts objectForKey:CPRuleEditorPredicateCustomSelector]); - if (lhs == nil){ CPLogConsole(@"missing left expression in predicate parts dictionary"); return NULL;} - if (rhs == nil){ CPLogConsole(@"missing right expression in predicate parts dictionary"); return NULL;} - if (selector == nil && operator == nil){ CPLogConsole(@"missing operator and selector in predicate parts dictionary"); return NULL;} + if (lhs === nil) + { + CPLogConsole(@"missing left expression in predicate parts dictionary"); + return NULL; + } - if (modifier == nil) CPLogConsole(@"missing modifier in predicate parts dictionary. Setting default: CPDirectPredicateModifier"); - if (options == nil) CPLogConsole(@"missing options in predicate parts dictionary. Setting default: CPCaseInsensitivePredicateOption"); + if (rhs === nil) + { + CPLogConsole(@"missing right expression in predicate parts dictionary"); + return NULL; + } + + if (selector === nil && operator === nil) + { + CPLogConsole(@"missing operator and selector in predicate parts dictionary"); + return NULL; + } + + if (modifier === nil) + CPLogConsole(@"missing modifier in predicate parts dictionary. Setting default: CPDirectPredicateModifier"); + + if (options === nil) + CPLogConsole(@"missing options in predicate parts dictionary. Setting default: CPCaseInsensitivePredicateOption"); try { - if (selector != nil) + if (selector !== nil) predicate = [CPComparisonPredicate predicateWithLeftExpression:lhs rightExpression:rhs @@ -919,7 +937,7 @@ TODO: implement */ - (void)setRowClass:(Class)rowClass { - if (rowClass == [CPMutableDictionary class]) + if (rowClass === [CPMutableDictionary class]) rowClass = [_CPRuleEditorRowObject class]; _rowClass = rowClass; @@ -1095,7 +1113,7 @@ TODO: implement - (void)keyDown:(CPEvent)event { - if (!_suppressKeyDownHandling && [self _applicableNestingMode] == CPRuleEditorNestingModeCompound && !_isKeyDown && ([event modifierFlags] & CPAlternateKeyMask)) + if (!_suppressKeyDownHandling && [self _applicableNestingMode] === CPRuleEditorNestingModeCompound && !_isKeyDown && ([event modifierFlags] & CPAlternateKeyMask)) { [_slices makeObjectsPerformSelector:@selector(_configurePlusButtonByRowType:) withObject:CPRuleEditorRowTypeCompound]; } @@ -1127,7 +1145,7 @@ TODO: implement - (BOOL)_wantsRowAnimations { - return (_currentAnimation != nil); + return (_currentAnimation !== nil); } - (void)_updateButtonVisibilities @@ -1150,10 +1168,10 @@ TODO: implement if (!_nestingModeDidChange) return _nestingMode; - var a = (_nestingMode == CPRuleEditorNestingModeCompound || _nestingMode == CPRuleEditorNestingModeSimple); - var b = ([self rowTypeForRow:0] == CPRuleEditorRowTypeCompound); + var a = (_nestingMode === CPRuleEditorNestingModeCompound || _nestingMode === CPRuleEditorNestingModeSimple), + b = ([self rowTypeForRow:0] === CPRuleEditorRowTypeCompound); - if (a == b) + if (a === b) return _nestingMode; return a ? CPRuleEditorNestingModeList : CPRuleEditorNestingModeSimple; @@ -1161,7 +1179,7 @@ TODO: implement - (BOOL)_shouldHideAddButtonForSlice:(id)slice { - return (!_editable || [self _applicableNestingMode] == CPRuleEditorNestingModeSingle); + return (!_editable || [self _applicableNestingMode] === CPRuleEditorNestingModeSingle); } - (BOOL)_shouldHideSubtractButtonForSlice:(id)slice @@ -1181,9 +1199,9 @@ TODO: implement switch (nestingMode) { case CPRuleEditorNestingModeCompound: - case CPRuleEditorNestingModeSimple: shouldHide = ([subrowsIndexes count] == 1 && !_allowsEmptyCompoundRows) || parentIndex == -1; + case CPRuleEditorNestingModeSimple: shouldHide = ([subrowsIndexes count] === 1 && !_allowsEmptyCompoundRows) || parentIndex === -1; break; - case CPRuleEditorNestingModeList: shouldHide = ([self numberOfRows] == 1); + case CPRuleEditorNestingModeList: shouldHide = ([self numberOfRows] === 1); break; case CPRuleEditorNestingModeSingle: shouldHide = YES; break; @@ -1217,7 +1235,7 @@ TODO: implement - (int)_rowIndexForRowObject:(id)rowobject { - if (rowobject == _boundArrayOwner) + if (rowobject === _boundArrayOwner) return -1; return [[self _searchCacheForRowObject:rowobject] rowIndex]; // Pas bon car le rowIndex du row cache n'est pas synchro avec la position dans _rowCache. @@ -1236,14 +1254,14 @@ TODO: implement var childlessParents = [CPIndexSet indexSet], current_index = [indexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { - var parentIndex = [self parentRowForRow:current_index]; + var parentIndex = [self parentRowForRow:current_index], + subrowsIndexes = [self subrowIndexesForRow:parentIndex]; - var subrowsIndexes = [self subrowIndexesForRow:parentIndex]; - if ([subrowsIndexes count]==1) + if ([subrowsIndexes count] === 1) { - if (parentIndex != -1) + if (parentIndex !== -1) return [CPIndexSet indexSetWithIndex:0]; var childlessGranPa = [self _childlessParentsIfSlicesWereDeletedAtIndexes:[CPIndexSet indexSetWithIndex:parentIndex]]; @@ -1262,7 +1280,7 @@ TODO: implement var subindexes = [indexes copy], current_index = [indexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var sub = [self subrowIndexesForRow:current_index]; [subindexes addIndexes:[self _includeSubslicesForSlicesAtIndexes:sub]]; @@ -1302,7 +1320,7 @@ TODO: implement childrenCount = [self _queryNumberOfChildrenOfItem:parentItem withRowType:type], foundIndex = CPNotFound; - if (childrenCount == 0) + if (childrenCount === 0) return NO; var current_criterions = [CPMutableArray array], @@ -1314,34 +1332,34 @@ TODO: implement var aCriteria = [self criteriaForRow:row], itemIndex = [items count]; - if ([self rowTypeForRow:row] == type && itemIndex < [aCriteria count]) + if ([self rowTypeForRow:row] === type && itemIndex < [aCriteria count]) { var crit = [aCriteria objectAtIndex:itemIndex]; [current_criterions addObject:crit]; } } - while (foundIndex == CPNotFound) + while (foundIndex === CPNotFound) { var buffer = [CPMutableArray arrayWithArray:current_criterions], i; for (i = 0; i < childrenCount; i++) { var child = [self _queryChild:i ofItem:parentItem withRowType:type]; - if ([current_criterions indexOfObject:child] == CPNotFound) + if ([current_criterions indexOfObject:child] === CPNotFound) { foundIndex = i; break; } } - if (foundIndex == CPNotFound) + if (foundIndex === CPNotFound) { for (var k = 0; k < childrenCount; k++) { var anobject = [self _queryChild:k ofItem:parentItem withRowType:type], index = [buffer indexOfObject:anobject]; - if (index != CPNotFound) + if (index !== CPNotFound) [buffer removeObjectAtIndex:index]; } @@ -1394,7 +1412,7 @@ TODO: implement rowTypeEvent = [self rowTypeForRow:rowIndexEvent], insertIndex = rowIndexEvent + 1; - var parentRowIndex = (rowTypeEvent == CPRuleEditorRowTypeCompound) ? rowIndexEvent:[self parentRowForRow:rowIndexEvent]; + var parentRowIndex = (rowTypeEvent === CPRuleEditorRowTypeCompound) ? rowIndexEvent:[self parentRowForRow:rowIndexEvent]; [self insertRowAtIndex:insertIndex withType:type asSubrowOfRow:parentRowIndex animate:YES]; } @@ -1413,7 +1431,7 @@ TODO: implement [row setValue:[CPMutableArray array] forKey:_subrowsArrayKeyPath]; var subrowsObjects; - if (parentRowIndex == -1 || [self _applicableNestingMode] == CPRuleEditorNestingModeList) + if (parentRowIndex === -1 || [self _applicableNestingMode] === CPRuleEditorNestingModeList) subrowsObjects = [self _rootRowsArray]; else { @@ -1436,7 +1454,7 @@ TODO: implement - (void)_startObservingRowObjectsRecursively:(CPArray)rowObjects { - [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:boundArrayContext]; + [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:boundArrayContext]; var count = [rowObjects count]; @@ -1444,9 +1462,9 @@ TODO: implement { var rowObject = [rowObjects objectAtIndex:i]; - [rowObject addObserver:self forKeyPath:_itemsKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:itemsContext]; - [rowObject addObserver:self forKeyPath:_valuesKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:valuesContext]; - [rowObject addObserver:self forKeyPath:_subrowsArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:subrowsContext]; + [rowObject addObserver:self forKeyPath:_itemsKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:itemsContext]; + [rowObject addObserver:self forKeyPath:_valuesKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:valuesContext]; + [rowObject addObserver:self forKeyPath:_subrowsArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:subrowsContext]; var subrows = [self _subrowObjectsOfObject:rowObject]; if ([subrows count] > 0) @@ -1482,21 +1500,21 @@ TODO: implement newRows, oldRows; - if (context == boundArrayContext || context == subrowsContext) + if (context === boundArrayContext || context === subrowsContext) { - if (changeKind == CPKeyValueChangeSetting) + if (changeKind === CPKeyValueChangeSetting) { newRows = changeNewValue; oldRows = changeOldValue; } - else if (changeKind == CPKeyValueChangeInsertion) + else if (changeKind === CPKeyValueChangeInsertion) { newRows = [self _subrowObjectsOfObject:object]; oldRows = [CPArray arrayWithArray:newRows]; [oldRows removeObjectsInArray:changeNewValue]; } - else if (changeKind == CPKeyValueChangeRemoval) + else if (changeKind === CPKeyValueChangeRemoval) { newRows = [self _subrowObjectsOfObject:object]; oldRows = [CPArray arrayWithArray:newRows]; @@ -1507,10 +1525,10 @@ TODO: implement [self _changedRowArray:newRows withOldRowArray:oldRows forParent:object]; [self _reconfigureSubviewsAnimate:[self _wantsRowAnimations]]; } - else if (context == itemsContext) + else if (context === itemsContext) { } - else if (context == valuesContext) + else if (context === valuesContext) { } } @@ -1574,7 +1592,7 @@ TODO: implement //var gindexes = [self _globalIndexesForSubrowIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0,oldRowCount)] ofParentObject:parentRowObject]; - if (parentCacheIndex == -1) + if (parentCacheIndex === -1) parentCacheIndentation = -1; else parentCacheIndentation = [[self _rowCacheForIndex:parentCacheIndex] indentation]; @@ -1603,17 +1621,18 @@ TODO: implement var oldrow = [oldRows objectAtIndex:changeStartIndex], newrow = [newRows objectAtIndex:changeStartIndex]; - if (newrow != oldrow) + if (newrow !== oldrow) break; } - var replaceCount = (deltaCount == 0) ? maxCount : maxCount - minusCount; - var startIndex = parentCacheIndex + changeStartIndex + 1; + var replaceCount = (deltaCount === 0) ? maxCount : maxCount - minusCount, + startIndex = parentCacheIndex + changeStartIndex + 1; if (deltaCount <= 0) { - var removeIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(startIndex, replaceCount)]; - var removeSlices = [_slices objectsAtIndexes:removeIndexes]; + var removeIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(startIndex, replaceCount)], + removeSlices = [_slices objectsAtIndexes:removeIndexes]; + [removeSlices makeObjectsPerformSelector:@selector(removeFromSuperview)]; [_slices removeObjectsAtIndexes:removeIndexes]; } @@ -1694,7 +1713,7 @@ TODO: implement //var boundRows = [_boundArrayOwner valueForKey:_boundArrayKeyPath]; - [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:boundArrayContext]; + [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:boundArrayContext]; //if ([boundRows isKindOfClass:[CPArray class]] && [boundRows count] > 0) // [_boundArrayOwner setValue:boundRows forKey:_boundArrayKeyPath]; @@ -1721,11 +1740,11 @@ TODO: implement subindexes = [self subrowIndexesForRow:-1], current_index = [subindexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var subpredicate = [self predicateForRow:current_index]; - if (subpredicate != nil) + if (subpredicate !== nil) [subpredicates addObject:subpredicate]; current_index = [subindexes indexGreaterThanIndex:current_index]; @@ -1767,7 +1786,7 @@ TODO: implement startRect = [aslice frame], startIndex = [aslice rowIndex] - 1; - if ([aslice superview] == nil) + if ([aslice superview] === nil) { startRect = CGRectMake(0, startIndex * _sliceHeight, CGRectGetWidth(startRect), _sliceHeight); [aslice _reconfigureSubviews]; @@ -1799,7 +1818,7 @@ TODO: implement _lastRow = [self numberOfRows] - 1; - if (_lastRow == -1) + if (_lastRow === -1) _nestingModeDidChange = NO; [self setNeedsDisplay:YES]; @@ -1893,7 +1912,7 @@ TODO: implement { var current_index = [indexes firstIndex]; - while (current_index !=CPNotFound) + while (current_index !== CPNotFound) { var subindexes = [self subrowIndexesForRow:index]; [self _updateSliceIndentationAtIndex:current_index toIndentation:indentation + 1 withIndexSet:subindexes]; @@ -1937,7 +1956,7 @@ TODO: implement - (void)_mouseUpOnSlice:(id)slice withEvent:(CPEvent)event { - if ([slice _rowType] != CPRuleEditorRowTypeSimple) + if ([slice _rowType] !== CPRuleEditorRowTypeSimple) return; var modifierFlags = [event modifierFlags], @@ -2045,7 +2064,7 @@ TODO: implement { [self setNeedsDisplay:YES]; - if (CGRectGetWidth([self frame]) != size.width) + if (CGRectGetWidth([self frame]) !== size.width) [_slices makeObjectsPerformSelector:@selector(setNeedsLayout)]; [super setFrameSize:size]; @@ -2081,7 +2100,7 @@ TODO: implement - (BOOL)_dragShouldBeginFromMouseDown:(CPView)view { - return (([self nestingMode] == CPRuleEditorNestingModeList || [view rowIndex] != 0) && _editable && [view isKindOfClass:[_CPRuleEditorViewSliceRow class]] && _draggingRows == nil); + return (([self nestingMode] === CPRuleEditorNestingModeList || [view rowIndex] !== 0) && _editable && [view isKindOfClass:[_CPRuleEditorViewSliceRow class]] && _draggingRows === nil); } - (BOOL)_performDragForSlice:(id)slice withEvent:(CPEvent)event @@ -2124,7 +2143,7 @@ TODO: implement - (CPDragOperation)draggingEntered:(id < CPDraggingInfo >)sender { - if ([sender draggingSource] == self) + if ([sender draggingSource] === self) { [self _clearDropLine]; return CPDragOperationMove; @@ -2143,7 +2162,7 @@ TODO: implement { [_dropLineView setAlphaValue:0]; - if (_subviewIndexOfDropLine != CPNotFound && _subviewIndexOfDropLine < _lastRow) + if (_subviewIndexOfDropLine !== CPNotFound && _subviewIndexOfDropLine < _lastRow) { var previousBelowSlice = [_slices objectAtIndex:_subviewIndexOfDropLine]; [previousBelowSlice setFrameOrigin:CGPointMake(0, [previousBelowSlice rowIndex] * _sliceHeight)]; @@ -2155,20 +2174,20 @@ TODO: implement - (CPDragOperation)draggingUpdated:(id )sender { var point = [self convertPoint:[sender draggingLocation] fromView:nil], - y = point.y + _sliceHeight /2, + y = point.y + _sliceHeight / 2, indexOfDropLine = FLOOR(y / _sliceHeight), numberOfRows = [self numberOfRows]; if (indexOfDropLine < 0 || indexOfDropLine > numberOfRows || (indexOfDropLine >= [_draggingRows firstIndex] && indexOfDropLine <= [_draggingRows lastIndex] + 1)) { - if (_subviewIndexOfDropLine != CPNotFound && indexOfDropLine != _subviewIndexOfDropLine) + if (_subviewIndexOfDropLine !== CPNotFound && indexOfDropLine !== _subviewIndexOfDropLine) [self _clearDropLine]; return CPDragOperationNone; } - if (_subviewIndexOfDropLine != indexOfDropLine) + if (_subviewIndexOfDropLine !== indexOfDropLine) { - if (_subviewIndexOfDropLine != CPNotFound && _subviewIndexOfDropLine < numberOfRows) + if (_subviewIndexOfDropLine !== CPNotFound && _subviewIndexOfDropLine < numberOfRows) { var previousBelowSlice = [_slices objectAtIndex:_subviewIndexOfDropLine]; [previousBelowSlice setFrameOrigin:CPMakePoint(0, [previousBelowSlice rowIndex] * _sliceHeight)]; @@ -2191,7 +2210,7 @@ TODO: implement - (BOOL)prepareForDragOperation:(id < CPDraggingInfo >)sender { - return (_subviewIndexOfDropLine != CPNotFound); + return (_subviewIndexOfDropLine !== CPNotFound); } - (BOOL)performDragOperation:(id < CPDraggingInfo >)info @@ -2203,11 +2222,11 @@ TODO: implement var rowObjects = [_rowCache valueForKey:@"rowObject"], index = [_draggingRows lastIndex]; - var parentRowIndex = [self parentRowForRow:index]; // first index of draggingrows - var parentRowObject = (parentRowIndex == -1) ? _boundArrayOwner : [[self _rowCacheForIndex:parentRowIndex] rowObject]; - var insertIndex = _subviewIndexOfDropLine; + var parentRowIndex = [self parentRowForRow:index], // first index of draggingrows + parentRowObject = (parentRowIndex === -1) ? _boundArrayOwner : [[self _rowCacheForIndex:parentRowIndex] rowObject], + insertIndex = _subviewIndexOfDropLine; - while (index != CPNotFound) + while (index !== CPNotFound) { if (index >= insertIndex) { @@ -2286,12 +2305,12 @@ TODO: implement current_index = [indexes firstIndex], numberOfChildrenOfPreviousBrother = 0; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var globalChildIndex = current_index + parentRowIndex + 1 + numberOfChildrenOfPreviousBrother; [globalIndexes addIndex:globalChildIndex]; - if ([self rowTypeForRow:globalChildIndex] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:globalChildIndex] === CPRuleEditorRowTypeCompound) { var rowObject = [[self _rowCacheForIndex:current_index] rowObject], subrows = [self _subrowObjectsOfObject:rowObject]; @@ -2338,8 +2357,8 @@ TODO: implement var criteria = [self criteriaForRow:aRow]; indexofCriterion = [criteria indexOfObject:criterion]; - if (parentItem != nil - && indexofCriterion != CPNotFound + if (parentItem !== nil + && indexofCriterion !== CPNotFound && indexofCriterion < [criteria count] - 1) { var next = indexofCriterion + 1; @@ -2355,10 +2374,10 @@ TODO: implement var availChild = aChild, availValue = value; - if ( criterion != aChild ) + if (criterion !== aChild) availValue = [self _queryValueForItem:aChild inRow:aRow]; - if ( !availValue ) + if (!availValue) availValue = [self _queryValueForItem:availChild inRow:aRow]; [availItems addObject:availChild]; @@ -2394,7 +2413,7 @@ var CPRuleEditorAlignmentGridWidthKey = @"CPRuleEditorAlignmentGridWidth", - (id)initWithCoder:(CPCoder)coder { self = [super initWithCoder:coder]; - if (self != nil) + if (self !== nil) { [self setFormattingStringsFilename:[coder decodeObjectForKey:CPRuleEditorStringsFilenameKey]]; _alignmentGridWidth = [coder decodeFloatForKey:CPRuleEditorAlignmentGridWidthKey]; @@ -2478,7 +2497,7 @@ var CriteriaKey = @"criteria", - (id)initWithCoder:(id)coder { self = [super init]; - if (self != nil) + if (self !== nil) { subrows = [coder decodeObjectForKey:SubrowsKey]; criteria = [coder decodeObjectForKey:CriteriaKey]; @@ -2508,7 +2527,7 @@ var CriteriaKey = @"criteria", - (CPString)description { - return [CPString stringWithFormat:@"<%d object:%d rowIndex:%d indentation:%d>",[self hash], [rowObject hash], rowIndex, indentation]; + return [CPString stringWithFormat:@"<%d object:%d rowIndex:%d indentation:%d>", [self hash], [rowObject hash], rowIndex, indentation]; } @end @@ -2574,21 +2593,23 @@ var dropSeparatorColor = [CPColor colorWithHexString:@"4886ca"]; - (int)valueType { - var result = 0; + var result = 0, + isString = [self isKindOfClass:CPString]; - var isString = [self isKindOfClass:[CPString class]]; - if ( !isString ) + if (!isString) { - var isView = [self isKindOfClass:[CPView class]]; + var isView = [self isKindOfClass:CPView]; result = 1; - if ( !isView ) + + if (!isView) { - var ismenuItem = [self isKindOfClass:[CPMenuItem class]]; + var ismenuItem = [self isKindOfClass:CPMenuItem]; result = 2; - if ( !ismenuItem ) + + if (!ismenuItem) { - [CPException raise:CPGenericException reason:@"Unknown Type For " + self]; - result = -1; + [CPException raise:CPGenericException reason:@"Unknown type for " + self]; + result = -1; } } } @@ -2597,4 +2618,4 @@ var dropSeparatorColor = [CPColor colorWithHexString:@"4886ca"]; } @end -/*! @endcond */ \ No newline at end of file +/*! @endcond */ diff --git a/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j b/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j index 55df0b510..bd83bd0fd 100644 --- a/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j +++ b/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j @@ -28,11 +28,10 @@ node.tree = aTree; var template = [aTree template], - uuid = [template UID]; + uuid = [template UID], + cachedNode = templateTable[uuid]; - var cachedNode = templateTable[uuid]; - - if (cachedNode == nil) + if (cachedNode === nil) { views = [CPMutableArray array]; copiedContainer = [CPMutableArray array]; @@ -67,6 +66,7 @@ - (BOOL)applyTemplate:(id)template withViews:(id)views forOriginalTemplate:(id)originalTemplate { var t = [tree template]; + if (t !== template) { [templateViews setArray:views]; @@ -75,6 +75,7 @@ } var count = [children count]; + for (var i; i < count; i++) [children[i] applyTemplate:template withViews:views forOriginalTemplate:originalTemplate]; } @@ -89,7 +90,7 @@ - (void)copyTemplateIfNecessary { - if ([copiedTemplateContainer count] == 0) + if ([copiedTemplateContainer count] === 0) { var copy = [[tree template] copy]; [copiedTemplateContainer addObject:copy]; @@ -117,7 +118,8 @@ - (id)displayValue { var title = [self title]; - if (title != nil) + + if (title !== nil) return title; return [self templateView]; @@ -128,4 +130,4 @@ return [CPString stringWithFormat:@"<%@ %@ %@ tree:%@ tviews:%@", [self className],[self UID], [self title], [tree UID], [templateViews description]]; } -@end \ No newline at end of file +@end diff --git a/AppKit/CPScrollView.j b/AppKit/CPScrollView.j index b4fb03a85..1d55fc2bd 100644 --- a/AppKit/CPScrollView.j +++ b/AppKit/CPScrollView.j @@ -30,38 +30,40 @@ @import "CPScroller.j" @import "CPView.j" +#define SHOULD_SHOW_CORNER_VIEW() (_scrollerStyle === CPScrollerStyleLegacy && _verticalScroller && ![_verticalScroller isHidden]) + /*! @ignore */ var _isSystemUsingOverlayScrollers = function() { #if PLATFORM(DOM) - var inner = document.createElement('p'), - outer = document.createElement('div'); + var inner = document.createElement('p'), + outer = document.createElement('div'); - inner.style.width = "100%"; - inner.style.height = "200px"; + inner.style.width = "100%"; + inner.style.height = "200px"; - outer.style.position = "absolute"; - outer.style.top = "0px"; - outer.style.left = "0px"; - outer.style.visibility = "hidden"; - outer.style.width = "200px"; - outer.style.height = "150px"; - outer.style.overflow = "hidden"; - outer.appendChild (inner); + outer.style.position = "absolute"; + outer.style.top = "0px"; + outer.style.left = "0px"; + outer.style.visibility = "hidden"; + outer.style.width = "200px"; + outer.style.height = "150px"; + outer.style.overflow = "hidden"; + outer.appendChild (inner); - document.body.appendChild (outer); - var w1 = inner.offsetWidth; - outer.style.overflow = 'scroll'; - var w2 = inner.offsetWidth; - if (w1 == w2) - w2 = outer.clientWidth; + document.body.appendChild (outer); + var w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + var w2 = inner.offsetWidth; + if (w1 == w2) + w2 = outer.clientWidth; - document.body.removeChild (outer); + document.body.removeChild (outer); - return (w1 - w2 == 0); + return (w1 - w2 == 0); #else - return NO; + return NO; #endif }; @@ -272,7 +274,19 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, } /*! - Set the delegate of the scroll view + Sets the delegate of the scroll view. + Possible delegate methods to implement are listed below. + +Notifies the delegate when the scroll view is about to scroll. +@code +- (void)scrollViewWillScroll:(CPScrollView)aScrollView +@endcode + +Notifies the delegate when the scroll view has finished scrolling. +@code +- (void)scrollViewDidScroll:(CPScrollView)aScrollView +@endcode + */ - (void)setDelegate:(id)aDelegate { @@ -737,35 +751,42 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, { [_horizontalScroller setStyle:_scrollerStyle]; [_horizontalScroller unsetThemeState:CPThemeStateSelected]; + switch (_scrollerKnobStyle) { case CPScrollerKnobStyleLight: [_horizontalScroller unsetThemeState:CPThemeStateScrollerKnobDark]; [_horizontalScroller setThemeState:CPThemeStateScrollerKnobLight]; break; + case CPScrollerKnobStyleDark: [_horizontalScroller unsetThemeState:CPThemeStateScrollerKnobLight]; [_horizontalScroller setThemeState:CPThemeStateScrollerKnobDark]; break; + default: [_horizontalScroller unsetThemeState:CPThemeStateScrollerKnobLight]; [_horizontalScroller unsetThemeState:CPThemeStateScrollerKnobDark]; } } + if (_hasVerticalScroller) { [_verticalScroller setStyle:_scrollerStyle]; [_verticalScroller unsetThemeState:CPThemeStateSelected]; + switch (_scrollerKnobStyle) { case CPScrollerKnobStyleLight: [_verticalScroller unsetThemeState:CPThemeStateScrollerKnobDark]; [_verticalScroller setThemeState:CPThemeStateScrollerKnobLight]; break; + case CPScrollerKnobStyleDark: [_verticalScroller unsetThemeState:CPThemeStateScrollerKnobLight]; [_verticalScroller setThemeState:CPThemeStateScrollerKnobDark]; break; + default: [_verticalScroller unsetThemeState:CPThemeStateScrollerKnobLight]; [_verticalScroller unsetThemeState:CPThemeStateScrollerKnobDark]; @@ -776,6 +797,7 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, { if (_timerScrollersHide) [_timerScrollersHide invalidate]; + _timerScrollersHide = [CPTimer scheduledTimerWithTimeInterval:CPScrollViewFadeOutTime target:self selector:@selector(_hideScrollers:) userInfo:nil repeats:NO]; [[self bottomCornerView] setHidden:YES]; } @@ -813,10 +835,15 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, _cornerView = documentCornerView; if (_cornerView) + { + [_cornerView setHidden:!SHOULD_SHOW_CORNER_VIEW()]; [self addSubview:_cornerView]; + } } [self reflectScrolledClipView:_contentView]; + [documentHeaderView setNeedsLayout]; + [documentHeaderView setNeedsDisplay:YES]; } /* @ignore */ @@ -851,7 +878,9 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, var frame = [self _insetBounds]; frame.size.height = _CGRectGetHeight([headerView frame]); - frame.size.width -= _CGRectGetWidth([self _cornerViewFrame]); + + if (SHOULD_SHOW_CORNER_VIEW()) + frame.size.width -= _CGRectGetWidth([self _cornerViewFrame]); return frame; } @@ -1138,8 +1167,9 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, if (_scrollerStyle === CPScrollerStyleOverlay && hasHorizontalScroll) verticalScrollerHeight -= horizontalScrollerHeight; + var documentHeight = _CGRectGetHeight(documentFrame); [_verticalScroller setFloatValue:(difference.height <= 0.0) ? 0.0 : scrollPoint.y / difference.height]; - [_verticalScroller setKnobProportion:_CGRectGetHeight(contentFrame) / _CGRectGetHeight(documentFrame)]; + [_verticalScroller setKnobProportion:documentHeight > 0 ? _CGRectGetHeight(contentFrame) / documentHeight : 1.0]; [_verticalScroller setFrame:_CGRectMake(_CGRectGetMaxX(contentFrame) - overlay, verticalScrollerY, verticalScrollerWidth, verticalScrollerHeight)]; } else if (wasShowingVerticalScroller) @@ -1155,8 +1185,10 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, if (_scrollerStyle === CPScrollerStyleOverlay && hasVerticalScroll) horizontalScrollerWidth -= verticalScrollerWidth; + var documentWidth = _CGRectGetWidth(documentFrame); + [_horizontalScroller setFloatValue:(difference.width <= 0.0) ? 0.0 : scrollPoint.x / difference.width]; - [_horizontalScroller setKnobProportion:_CGRectGetWidth(contentFrame) / _CGRectGetWidth(documentFrame)]; + [_horizontalScroller setKnobProportion:documentWidth > 0 ? _CGRectGetWidth(contentFrame) / documentWidth : 1.0]; [_horizontalScroller setFrame:_CGRectMake(_CGRectGetMinX(contentFrame), _CGRectGetMaxY(contentFrame) - overlay, horizontalScrollerWidth, horizontalScrollerHeight)]; } else if (wasShowingHorizontalScroller) @@ -1166,9 +1198,15 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, } [_contentView setFrame:contentFrame]; - [_headerClipView setFrame:headerClipViewFrame]; + [_headerClipView setFrame:[self _headerClipViewFrame]]; [[_headerClipView documentView] setNeedsDisplay:YES]; - [_cornerView setFrame:[self _cornerViewFrame]]; + if (SHOULD_SHOW_CORNER_VIEW()) + { + [_cornerView setFrame:[self _cornerViewFrame]]; + [_cornerView setHidden:NO]; + } + else + [_cornerView setHidden:YES]; if (_scrollerStyle === CPScrollerStyleLegacy) { @@ -1201,6 +1239,7 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, if (_timerScrollersHide) [_timerScrollersHide invalidate] + _timerScrollersHide = [CPTimer scheduledTimerWithTimeInterval:CPScrollViewFadeOutTime target:self selector:@selector(_hideScrollers:) userInfo:nil repeats:NO]; } @@ -1248,70 +1287,67 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, - (void)_drawGrayBezelInContext:(CGContext)context bounds:(CGRect)aRect { - CGContextBeginPath(context); + var minX = _CGRectGetMinX(aRect), + maxX = _CGRectGetMaxX(aRect), + minY = _CGRectGetMinY(aRect), + maxY = _CGRectGetMaxY(aRect), + y = minY + 0.5; + + // Slightly darker line on top. CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0 / 255.0 alpha:1.0]); - - var y = _CGRectGetMinY(aRect) + 0.5; - - CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y); - CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 1.0, y); + CGContextBeginPath(context); + CGContextMoveToPoint(context, minX, y); + CGContextAddLineToPoint(context, maxX, y); CGContextStrokePath(context); - CGContextBeginPath(context); + // The rest of the border. CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0 / 255.0 alpha:1.0]); - CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 1.0, y); - CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); - CGContextStrokePath(context); + + var x = maxX - 0.5; CGContextBeginPath(context); - CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0 / 255.0 alpha:1.0]); - CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); - CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y); - CGContextStrokePath(context); + CGContextMoveToPoint(context, x, minY + 1.0); + CGContextAddLineToPoint(context, x, maxY); + CGContextMoveToPoint(context, x - 0.5, maxY - 0.5); + CGContextAddLineToPoint(context, minX, maxY - 0.5); - CGContextBeginPath(context); - CGContextSetStrokeColor(context, [CPColor colorWithWhite:190.0 / 255.0 alpha:1.0]); + x = minX + 0.5; - var x = _CGRectGetMaxX(aRect) - 0.5; - - CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 1.0); - CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect)); - - CGContextMoveToPoint(context, x - 0.5, _CGRectGetMaxY(aRect) - 0.5); - CGContextAddLineToPoint(context, _CGRectGetMinX(aRect), _CGRectGetMaxY(aRect) - 0.5); - - x = _CGRectGetMinX(aRect) + 0.5; - - CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect)); - CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect) + 1.0); + CGContextMoveToPoint(context, x, maxY); + CGContextAddLineToPoint(context, x, minY + 1.0); CGContextStrokePath(context); } - (void)_drawGrooveInContext:(CGContext)context bounds:(CGRect)aRect { + var minX = _CGRectGetMinX(aRect), + maxX = _CGRectGetMaxX(aRect), + minY = _CGRectGetMinY(aRect), + maxY = _CGRectGetMaxY(aRect); + CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor colorWithWhite:159.0 / 255.0 alpha:1.0]); - var y = _CGRectGetMinY(aRect) + 0.5; + var y = minY + 0.5; - CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y); - CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y); + CGContextMoveToPoint(context, minX, y); + CGContextAddLineToPoint(context, maxX, y); - var x = _CGRectGetMaxX(aRect) - 1.5; + var x = maxX - 1.5; - CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 2.0); - CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect) - 1.0); + CGContextMoveToPoint(context, x, minY + 2.0); + CGContextAddLineToPoint(context, x, maxY - 1.0); - y = _CGRectGetMaxY(aRect) - 1.5; + y = maxY - 1.5; - CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); - CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 2.0, y); + CGContextMoveToPoint(context, maxX - 1.0, y); + CGContextAddLineToPoint(context, minX + 2.0, y); - x = _CGRectGetMinX(aRect) + 0.5; + x = minX + 0.5; - CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect)); - CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect)); + CGContextMoveToPoint(context, x, maxY); + CGContextAddLineToPoint(context, x, minY); CGContextStrokePath(context); @@ -1327,10 +1363,10 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0 / 255.0 alpha:1.0]); - y = _CGRectGetMinY(aRect) + 2.5; + y = minY + 2.5; - CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 2.0, y); - CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 2.0, y); + CGContextMoveToPoint(context, minX + 2.0, y); + CGContextAddLineToPoint(context, maxX - 2.0, y); CGContextStrokePath(context); } @@ -1470,21 +1506,27 @@ var CPScrollViewContentViewKey = @"CPScrollViewContentView", _scrollTimer = nil; _implementedDelegateMethods = 0; - // Due to the anything goes nature of decoding, our subviews may not exist yet, so layout at the end of the run loop when we're sure everything is in a correct state. - [[CPRunLoop currentRunLoop] performSelector:@selector(_updateCornerAndHeaderView) target:self argument:_contentView order:0 modes:[CPDefaultRunLoopMode]]; - - [self setScrollerStyle:[aCoder decodeIntForKey:CPScrollViewScrollerStyleKey] || CPScrollerStyleGlobal]; - [self setScrollerKnobStyle:[aCoder decodeIntForKey:CPScrollViewScrollerKnobStyleKey] || CPScrollerKnobStyleDefault]; + _scrollerStyle = [aCoder decodeObjectForKey:CPScrollViewScrollerStyleKey] || CPScrollerStyleGlobal; + _scrollerKnobStyle = [aCoder decodeObjectForKey:CPScrollViewScrollerKnobStyleKey] || CPScrollerKnobStyleDefault; [[CPNotificationCenter defaultCenter] addObserver:self - selector:@selector(_didReceiveDefaultStyleChange:) - name:CPScrollerStyleGlobalChangeNotification - object:nil]; + selector:@selector(_didReceiveDefaultStyleChange:) + name:CPScrollerStyleGlobalChangeNotification + object:nil]; } return self; } +/*! + Do final init that can only be done when we are sure all subviews have been initialized. +*/ +- (void)awakeFromCib +{ + [self _updateScrollerStyle]; + [self _updateCornerAndHeaderView]; +} + - (void)encodeWithCoder:(CPCoder)aCoder { [super encodeWithCoder:aCoder]; diff --git a/AppKit/CPScroller.j b/AppKit/CPScroller.j index a466dbbea..d3d674a8a 100644 --- a/AppKit/CPScroller.j +++ b/AppKit/CPScroller.j @@ -23,6 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "../Foundation/Foundation.h" + @import "CPControl.j" // CPScroller Constants @@ -260,6 +262,9 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark"); */ - (void)setKnobProportion:(float)aProportion { + if (!_IS_NUMERIC(aProportion)) + [CPException raise:CPInvalidArgumentException reason:"aProportion must be numeric"]; + _knobProportion = MIN(1.0, MAX(0.0001, aProportion)); [self setNeedsDisplay:YES]; @@ -766,6 +771,7 @@ CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark"); if (_timerFadeOut) [_timerFadeOut invalidate]; + _timerFadeOut = [CPTimer scheduledTimerWithTimeInterval:1.2 target:self selector:@selector(_performFadeOut:) userInfo:nil repeats:NO]; } @@ -791,10 +797,12 @@ var CPScrollerControlSizeKey = @"CPScrollerControlSize", if (self = [super initWithCoder:aCoder]) { _controlSize = CPRegularControlSize; + if ([aCoder containsValueForKey:CPScrollerControlSizeKey]) _controlSize = [aCoder decodeIntForKey:CPScrollerControlSizeKey]; _knobProportion = 1.0; + if ([aCoder containsValueForKey:CPScrollerKnobProportionKey]) _knobProportion = [aCoder decodeFloatForKey:CPScrollerKnobProportionKey]; @@ -804,8 +812,10 @@ var CPScrollerControlSizeKey = @"CPScrollerControlSize", _allowFadingOut = YES; _isMouseOver = NO; - var paramAnimFadeOut = [CPDictionary dictionaryWithObjects:[self, CPViewAnimationFadeOutEffect] - forKeys:[CPViewAnimationTargetKey, CPViewAnimationEffectKey]]; + + var paramAnimFadeOut = [CPDictionary dictionaryWithObjects:[self, CPViewAnimationFadeOutEffect] + forKeys:[CPViewAnimationTargetKey, CPViewAnimationEffectKey]]; + _animationScroller = [[CPViewAnimation alloc] initWithDuration:0.2 animationCurve:CPAnimationEaseInOut]; [_animationScroller setViewAnimations:[paramAnimFadeOut]]; [_animationScroller setDelegate:self]; diff --git a/AppKit/CPSearchField.j b/AppKit/CPSearchField.j index e2268048c..246fc2a9b 100644 --- a/AppKit/CPSearchField.j +++ b/AppKit/CPSearchField.j @@ -173,7 +173,7 @@ var RECENT_SEARCH_PREFIX = @" "; searchButtonImage = (_searchMenuTemplate === nil) ? CPSearchFieldSearchImage : CPSearchFieldFindImage; [button setBordered:NO]; - [button setImageScaling:CPScaleToFit]; + [button setImageScaling:CPImageScaleAxesIndependently]; [button setImage:searchButtonImage]; [button setAutoresizingMask:CPViewMaxXMargin]; } @@ -215,7 +215,7 @@ var RECENT_SEARCH_PREFIX = @" "; { var button = [self cancelButton]; [button setBordered:NO]; - [button setImageScaling:CPScaleToFit]; + [button setImageScaling:CPImageScaleAxesIndependently]; [button setImage:CPSearchFieldCancelImage]; [button setAlternateImage:CPSearchFieldCancelPressedImage]; [button setAutoresizingMask:CPViewMinXMargin]; diff --git a/AppKit/CPSegmentedControl.j b/AppKit/CPSegmentedControl.j index d0b92218a..4a28f091f 100644 --- a/AppKit/CPSegmentedControl.j +++ b/AppKit/CPSegmentedControl.j @@ -55,7 +55,7 @@ CPSegmentSwitchTrackingMomentary = 2; + (id)themeAttributes { - return [CPDictionary dictionaryWithObjects:[CPCenterTextAlignment, CPCenterVerticalTextAlignment, CPImageLeft, CPScaleNone, _CGInsetMakeZero(), _CGInsetMakeZero(), [CPNull null], [CPNull null], [CPNull null], [CPNull null], 1.0, 24.0] + return [CPDictionary dictionaryWithObjects:[CPCenterTextAlignment, CPCenterVerticalTextAlignment, CPImageLeft, CPImageScaleNone, _CGInsetMakeZero(), _CGInsetMakeZero(), [CPNull null], [CPNull null], [CPNull null], [CPNull null], 1.0, 24.0] forKeys:[@"alignment", @"vertical-alignment", @"image-position", @"image-scaling", @"bezel-inset", @"content-inset", @"left-segment-bezel-color", @"right-segment-bezel-color", @"center-segment-bezel-color", @"divider-bezel-color", @"divider-thickness", @"default-height"]]; } diff --git a/AppKit/CPShadowView.j b/AppKit/CPShadowView.j index e9e05c4a0..4517d69e3 100644 --- a/AppKit/CPShadowView.j +++ b/AppKit/CPShadowView.j @@ -47,7 +47,6 @@ var LIGHT_LEFT_INSET = 3.0, /*! @ingroup appkit */ - @implementation CPShadowView : CPView { CPShadowWeight _weight; @@ -60,35 +59,33 @@ var LIGHT_LEFT_INSET = 3.0, var bundle = [CPBundle bundleForClass:[self class]]; - CPShadowViewLightBackgroundColor = [CPColor colorWithPatternImage:[[CPNinePartImage alloc] initWithImageSlices: - [ - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightTopLeft.png"] size:CGSizeMake(9.0, 9.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightTop.png"] size:CGSizeMake(1.0, 9.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightTopRight.png"] size:CGSizeMake(9.0, 9.0)], + CPShadowViewLightBackgroundColor = CPColorWithImages([ + [@"CPShadowView/CPShadowViewLightTopLeft.png", 9.0, 9.0, bundle], + [@"CPShadowView/CPShadowViewLightTop.png", 1.0, 9.0, bundle], + [@"CPShadowView/CPShadowViewLightTopRight.png", 9.0, 9.0, bundle], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightLeft.png"] size:CGSizeMake(9.0, 1.0)], - nil, - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightRight.png"] size:CGSizeMake(9.0, 1.0)], + [@"CPShadowView/CPShadowViewLightLeft.png", 9.0, 1.0, bundle], + nil, + [@"CPShadowView/CPShadowViewLightRight.png", 9.0, 1.0, bundle], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightBottomLeft.png"] size:CGSizeMake(9.0, 9.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightBottom.png"] size:CGSizeMake(1.0, 9.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewLightBottomRight.png"] size:CGSizeMake(9.0, 9.0)] - ]]]; + [@"CPShadowView/CPShadowViewLightBottomLeft.png", 9.0, 9.0, bundle], + [@"CPShadowView/CPShadowViewLightBottom.png", 1.0, 9.0, bundle], + [@"CPShadowView/CPShadowViewLightBottomRight.png", 9.0, 9.0, bundle] + ]); - CPShadowViewHeavyBackgroundColor = [CPColor colorWithPatternImage:[[CPNinePartImage alloc] initWithImageSlices: - [ - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyTopLeft.png"] size:CGSizeMake(17.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyTop.png"] size:CGSizeMake(1.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyTopRight.png"] size:CGSizeMake(17.0, 17.0)], + CPShadowViewHeavyBackgroundColor = CPColorWithImages([ + [@"CPShadowView/CPShadowViewHeavyTopLeft.png", 17.0, 17.0, bundle], + [@"CPShadowView/CPShadowViewHeavyTop.png", 1.0, 17.0, bundle], + [@"CPShadowView/CPShadowViewHeavyTopRight.png", 17.0, 17.0, bundle], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyLeft.png"] size:CGSizeMake(17.0, 1.0)], - nil, - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyRight.png"] size:CGSizeMake(17.0, 1.0)], + [@"CPShadowView/CPShadowViewHeavyLeft.png", 17.0, 1.0, bundle], + nil, + [@"CPShadowView/CPShadowViewHeavyRight.png", 17.0, 1.0, bundle], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyBottomLeft.png"] size:CGSizeMake(17.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyBottom.png"] size:CGSizeMake(1.0, 17.0)], - [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPShadowView/CPShadowViewHeavyBottomRight.png"] size:CGSizeMake(17.0, 17.0)] - ]]]; + [@"CPShadowView/CPShadowViewHeavyBottomLeft.png", 17.0, 17.0, bundle], + [@"CPShadowView/CPShadowViewHeavyBottom.png", 1.0, 17.0, bundle], + [@"CPShadowView/CPShadowViewHeavyBottomRight.png", 17.0, 17.0, bundle] + ]); } + (id)shadowViewEnclosingView:(CPView)aView @@ -98,20 +95,24 @@ var LIGHT_LEFT_INSET = 3.0, + (id)shadowViewEnclosingView:(CPView)aView withWeight:(CPShadowWeight)aWeight { - var shadowView = [[CPShadowView alloc] initWithFrame:[aView frame]]; - [shadowView setWeight:aWeight]; + var shadowView = [[self alloc] initWithFrame:[aView frame]]; - var size = [shadowView frame].size, - width = size.width - [shadowView leftInset] - [shadowView rightInset], - height = size.height - [shadowView topInset] - [shadowView bottomInset], - enclosingView = [aView superview]; + if (shadowView) + { + [shadowView setWeight:aWeight]; - [shadowView setHitTests:[aView hitTests]]; - [shadowView setAutoresizingMask:[aView autoresizingMask]]; - [aView removeFromSuperview]; - [shadowView addSubview:aView]; - [aView setFrame:CGRectMake([shadowView leftInset], [shadowView topInset], width, height)] - [enclosingView addSubview:shadowView]; + var size = [shadowView frame].size, + width = size.width - [shadowView leftInset] - [shadowView rightInset], + height = size.height - [shadowView topInset] - [shadowView bottomInset], + enclosingView = [aView superview]; + + [shadowView setHitTests:[aView hitTests]]; + [shadowView setAutoresizingMask:[aView autoresizingMask]]; + [aView removeFromSuperview]; + [shadowView addSubview:aView]; + [aView setFrame:CGRectMake([shadowView leftInset], [shadowView topInset], width, height)] + [enclosingView addSubview:shadowView]; + } return shadowView; } diff --git a/AppKit/CPSplitView.j b/AppKit/CPSplitView.j index 5bde76930..35058b37a 100644 --- a/AppKit/CPSplitView.j +++ b/AppKit/CPSplitView.j @@ -117,8 +117,9 @@ var CPSplitViewHorizontalImage = nil, return; var bundle = [CPBundle bundleForClass:self]; - CPSplitViewHorizontalImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPSplitView/CPSplitViewHorizontal.png"] size:CPSizeMake(5.0, 10.0)]; - CPSplitViewVerticalImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"CPSplitView/CPSplitViewVertical.png"] size:CPSizeMake(10.0, 5.0)]; + + CPSplitViewHorizontalImage = CPImageInBundle("CPSplitView/CPSplitViewHorizontal.png", CGSizeMake(5.0, 10.0), bundle); + CPSplitViewVerticalImage = CPImageInBundle("CPSplitView/CPSplitViewVertical.png", CGSizeMake(10.0, 5.0), bundle); } - (id)initWithFrame:(CGRect)aFrame @@ -178,14 +179,17 @@ var CPSplitViewHorizontalImage = nil, count = _subviews.length; if ([self isVertical]) + { for (; index < count; ++index) [_subviews[index] setFrame:CGRectMake(ROUND((eachSize + dividerThickness) * index), 0, eachSize, frame.size.height)]; + } else + { for (; index < count; ++index) [_subviews[index] setFrame:CGRectMake(0, ROUND((eachSize + dividerThickness) * index), frame.size.width, eachSize)]; + } [self setNeedsDisplay:YES]; - [self _postNotificationDidResize]; } @@ -261,7 +265,6 @@ var CPSplitViewHorizontalImage = nil, rect = CGRectMakeZero(); rect.size = [self frame].size; - rect.size[_sizeComponent] = [self dividerThickness]; rect.origin[_originComponent] = frame.origin[_originComponent] + frame.size[_sizeComponent]; @@ -370,28 +373,33 @@ var CPSplitViewHorizontalImage = nil, _needsResizeSubviews = NO; + [self resizeSubviewsWithOldSize:[self _calculateSize]]; +} + +- (CGSize)_calculateSize +{ var subviews = [self subviews], count = subviews.length, - oldSize = CGSizeMakeZero(); + size = CGSizeMakeZero(); if ([self isVertical]) { - oldSize.width += [self dividerThickness] * (count - 1); - oldSize.height = CGRectGetHeight([self frame]); + size.width += [self dividerThickness] * (count - 1); + size.height = CGRectGetHeight([self frame]); } else { - oldSize.width = CGRectGetWidth([self frame]); - oldSize.height += [self dividerThickness] * (count - 1); + size.width = CGRectGetWidth([self frame]); + size.height += [self dividerThickness] * (count - 1); } while (count--) - oldSize[_sizeComponent] += [subviews[count] frame].size[_sizeComponent]; + size[_sizeComponent] += [subviews[count] frame].size[_sizeComponent]; - [self resizeSubviewsWithOldSize:oldSize]; + return size; } -- (BOOL)cursorAtPoint:(CPPoint)aPoint hitDividerAtIndex:(int)anIndex +- (BOOL)cursorAtPoint:(CGPoint)aPoint hitDividerAtIndex:(int)anIndex { var frame = [_subviews[anIndex] frame], startPosition = frame.origin[_originComponent] + frame.size[_sizeComponent], @@ -455,10 +463,11 @@ var CPSplitViewHorizontalImage = nil, if (type == CPLeftMouseDown) { - var point = [self convertPoint:[anEvent locationInWindow] fromView:nil]; + var point = [self convertPoint:[anEvent locationInWindow] fromView:nil], + count = [_subviews count] - 1; _currentDivider = CPNotFound; - var count = [_subviews count] - 1; + for (var i = 0; i < count; i++) { var frame = [_subviews[i] frame], @@ -574,9 +583,11 @@ var CPSplitViewHorizontalImage = nil, if (sizeA === 0) canGrow = YES; // Subview is collapsed. else if (!canShrink && - [_delegate respondsToSelector:@selector(splitView:canCollapseSubview:)] && - [_delegate splitView:self canCollapseSubview:_subviews[i]]) + [_delegate respondsToSelector:@selector(splitView:canCollapseSubview:)] && + [_delegate splitView:self canCollapseSubview:_subviews[i]]) + { canShrink = YES; // Subview is collapsible. + } if (sizeB === 0) { @@ -586,9 +597,11 @@ var CPSplitViewHorizontalImage = nil, canShrink = YES; } else if (!canGrow && - [_delegate respondsToSelector:@selector(splitView:canCollapseSubview:)] && - [_delegate splitView:self canCollapseSubview:_subviews[i + 1]]) + [_delegate respondsToSelector:@selector(splitView:canCollapseSubview:)] && + [_delegate splitView:self canCollapseSubview:_subviews[i + 1]]) + { canGrow = YES; // Right/lower subview is collapsible. + } if (_isVertical && canShrink && canGrow) cursor = [CPCursor resizeLeftRightCursor]; @@ -665,6 +678,7 @@ var CPSplitViewHorizontalImage = nil, if ([_delegate respondsToSelector:@selector(splitView:constrainMinCoordinate:ofSubviewAt:)]) { var proposedActualMin = [_delegate splitView:self constrainMinCoordinate:proposedMin ofSubviewAt:dividerIndex]; + if (_IS_NUMERIC(proposedActualMin)) actualMin = proposedActualMin; } @@ -672,6 +686,7 @@ var CPSplitViewHorizontalImage = nil, if ([_delegate respondsToSelector:@selector(splitView:constrainMaxCoordinate:ofSubviewAt:)]) { var proposedActualMax = [_delegate splitView:self constrainMaxCoordinate:proposedMax ofSubviewAt:dividerIndex]; + if (_IS_NUMERIC(proposedActualMax)) actualMax = proposedActualMax; } @@ -685,6 +700,7 @@ var CPSplitViewHorizontalImage = nil, if ([_delegate respondsToSelector:@selector(splitView:canCollapseSubview:)]) if ([_delegate splitView:self canCollapseSubview:viewA]) realPosition = proposedMin; + // We can also collapse to the right. if (position > proposedMax - (proposedMax - actualMax) / 2) if ([_delegate respondsToSelector:@selector(splitView:canCollapseSubview:)]) @@ -704,18 +720,19 @@ var CPSplitViewHorizontalImage = nil, SPLIT_VIEW_SUPPRESS_RESIZE_NOTIFICATIONS(YES); [self _adjustSubviewsWithCalculatedSize]; - var realPosition = [self _realPositionForPosition:position ofDividerAtIndex:dividerIndex]; - - var viewA = _subviews[dividerIndex], + var realPosition = [self _realPositionForPosition:position ofDividerAtIndex:dividerIndex], + viewA = _subviews[dividerIndex], frameA = [viewA frame], viewB = _subviews[dividerIndex + 1], frameB = [viewB frame], - _preCollapsePosition = 0; + _preCollapsePosition = 0, + preSize = frameA.size[_sizeComponent]; - var preSize = frameA.size[_sizeComponent]; frameA.size[_sizeComponent] = realPosition - frameA.origin[_originComponent]; + if (preSize !== 0 && frameA.size[_sizeComponent] === 0) _preCollapsePosition = preSize; + if (preSize !== frameA.size[_sizeComponent]) { SPLIT_VIEW_MAYBE_POST_WILL_RESIZE(); @@ -724,11 +741,15 @@ var CPSplitViewHorizontalImage = nil, } preSize = frameB.size[_sizeComponent]; + var preOrigin = frameB.origin[_originComponent]; frameB.size[_sizeComponent] = frameB.origin[_originComponent] + frameB.size[_sizeComponent] - realPosition - [self dividerThickness]; + if (preSize !== 0 && frameB.size[_sizeComponent] === 0) _preCollapsePosition = frameB.origin[_originComponent]; + frameB.origin[_originComponent] = realPosition + [self dividerThickness]; + if (preSize !== frameB.size[_sizeComponent] || preOrigin !== frameB.origin[_originComponent]) { SPLIT_VIEW_MAYBE_POST_WILL_RESIZE(); @@ -743,6 +764,7 @@ var CPSplitViewHorizontalImage = nil, if (SPLIT_VIEW_DID_SUPPRESS_RESIZE_NOTIFICATION()) [self _postNotificationDidResize]; + SPLIT_VIEW_SUPPRESS_RESIZE_NOTIFICATIONS(NO); } @@ -773,66 +795,101 @@ var CPSplitViewHorizontalImage = nil, return; } + [self adjustSubviews]; +} + +- (void)adjustSubviews +{ + var count = [_subviews count]; + + if (!count) + return; + SPLIT_VIEW_MAYBE_POST_WILL_RESIZE(); [self _postNotificationWillResize]; var index = 0, - count = [_subviews count], bounds = [self bounds], + boundsSize = bounds.size[_sizeComponent], + oldSize = [self _calculateSize], dividerThickness = [self dividerThickness], totalDividers = count - 1, - totalSizableSpace = 0, - nonSizableSpace = 0, - lastSizableIndex = -1, + oldFlexibleSpace = 0, totalSizablePanes = 0, - isVertical = [self isVertical]; + isSizableMap = {}, + viewSizes = [], + delegateRespondsToShouldAdjust = [_delegate respondsToSelector:@selector(splitView:shouldAdjustSizeOfSubview:)]; + // What we want to do is to preserve non resizable sizes first, and then to preserve the ratio of size to available + // non fixed space for every other subview. E.g. assume fixed space was 20 pixels initially, view 1 was 20 and + // view 2 was 30 pixels, for a total of 70 pixels. Then the new total size becomes 140 pixels. Now we want the fixed + // space to still be 20 pixels, view 1 to be 48 pixels and view 2 to be 72 pixels. This way the relative size of + // view 1 to view 2 remains the same - view 1 was 66% of view 2 initially and after the resize view 1 is still + // 66% of view 2's size. + // + // For this calculation, we can consider the dividers themselves to also be fixed size areas - they should remain + // the same size before and after. + + // How much flexible size do we have in pre-resize pixels? for (index = 0; index < count; ++index) { var view = _subviews[index], - isSizable = isVertical ? [view autoresizingMask] & CPViewWidthSizable : [view autoresizingMask] & CPViewHeightSizable; + isSizable = !delegateRespondsToShouldAdjust || [_delegate splitView:self shouldAdjustSizeOfSubview:view], + size = [view frame].size[_sizeComponent]; + + isSizableMap[index] = isSizable; + viewSizes.push(size); if (isSizable) { - totalSizableSpace += [view frame].size[_sizeComponent]; - lastSizableIndex = index; + oldFlexibleSpace += size; totalSizablePanes++; } } - if (totalSizablePanes === count) - totalSizableSpace = 0; + // nonSizableSpace is the number of fixed pixels in pre-resize terms and the desired number post-resize. + var nonSizableSpace = oldSize[_sizeComponent] - oldFlexibleSpace, + newFlexibleSpace = boundsSize - nonSizableSpace, + remainingFixedPixelsToRemove = 0; - var nonSizableSpace = totalSizableSpace ? bounds.size[_sizeComponent] - totalSizableSpace : 0, - remainingFlexibleSpace = bounds.size[_sizeComponent] - oldSize[_sizeComponent], - oldDimension = (oldSize[_sizeComponent] - totalDividers * dividerThickness - nonSizableSpace), - ratio = oldDimension <= 0 ? 0 : (bounds.size[_sizeComponent] - totalDividers * dividerThickness - nonSizableSpace) / oldDimension; + if (newFlexibleSpace < 0) + { + remainingFixedPixelsToRemove = -newFlexibleSpace; + newFlexibleSpace = 0; + } + + var remainingFixedPanes = count - totalSizablePanes; for (index = 0; index < count; ++index) { var view = _subviews[index], viewFrame = CGRectMakeCopy(bounds), - isSizable = isVertical ? [view autoresizingMask] & CPViewWidthSizable : [view autoresizingMask] & CPViewHeightSizable; + isSizable = isSizableMap[index], + targetSize = 0; + // The last area must take up exactly the remaining space, fixed or not. if (index + 1 === count) - viewFrame.size[_sizeComponent] = bounds.size[_sizeComponent] - viewFrame.origin[_originComponent]; - - else if (totalSizableSpace && isSizable && lastSizableIndex === index) - viewFrame.size[_sizeComponent] = MAX(0, ROUND([view frame].size[_sizeComponent] + remainingFlexibleSpace)) - - else if (isSizable || !totalSizableSpace) + targetSize = boundsSize - viewFrame.origin[_originComponent]; + // Try to keep fixed size areas the same size. + else if (!isSizable) { - viewFrame.size[_sizeComponent] = MAX(0, ROUND(ratio * [view frame].size[_sizeComponent])); - remainingFlexibleSpace -= (viewFrame.size[_sizeComponent] - [view frame].size[_sizeComponent]); + var removedFixedPixels = MIN(remainingFixedPixelsToRemove / remainingFixedPanes, viewSizes[index]); + targetSize = viewSizes[index] - removedFixedPixels; + remainingFixedPixelsToRemove -= removedFixedPixels; + remainingFixedPanes--; } + // (new size / flexible size available) == (old size / old flexible size available) + else if (oldFlexibleSpace > 0) + targetSize = newFlexibleSpace * viewSizes[index] / oldFlexibleSpace; + // oldFlexibleSpace <= 0 so all flexible areas were crushed. When we get space, allocate it evenly. + // totalSizablePanes cannot be 0 since isSizable. + else + targetSize = newFlexibleSpace / totalSizablePanes; - else if (totalSizableSpace && !isSizable) - viewFrame.size[_sizeComponent] = [view frame].size[_sizeComponent]; - - bounds.origin[_originComponent] += viewFrame.size[_sizeComponent] + dividerThickness; - + targetSize = MAX(0, ROUND(targetSize)); + viewFrame.size[_sizeComponent] = targetSize; [view setFrame:viewFrame]; - + bounds.origin[_originComponent] += targetSize + dividerThickness; } SPLIT_VIEW_MAYBE_POST_DID_RESIZE(); @@ -852,6 +909,11 @@ Notifies the delegate when the subviews will be resized. - (void)splitViewWillResizeSubviews:(CPNotification)aNotification; @endcode +Allows the delegate to specify which of the CPSplitView's subviews should adjust if the window is resized. +@code +- (BOOL)splitView:(CPSplitView)aSplitView shouldAdjustSizeOfSubview:(CPView)aSubView +@endcode + Lets the delegate specify a different rect for which the user can drag the splitView divider. @code - (CGRect)splitView:(CPSplitView)aSplitView effectiveRect:(CGRect)aRect forDrawnRect:(CGRect)aDrawnRect ofDividerAtIndex:(int)aDividerIndex; @@ -984,6 +1046,7 @@ The sum of the views and the sum of the dividers should be equal to the size of { if (_autosaveName == autosaveName) return; + _autosaveName = autosaveName; } @@ -1002,7 +1065,7 @@ The sum of the views and the sum of the dividers should be equal to the size of */ - (void)_autosave { - if (!_shouldAutosave) + if (!_shouldAutosave || !autosaveName) return; var userDefaults = [CPUserDefaults standardUserDefaults], @@ -1043,6 +1106,7 @@ The sum of the views and the sum of the dividers should be equal to the size of position = 0; _shouldAutosave = NO; + for (var i = 0, count = [frames count] - 1; i < count; i++) { var frame = CPRectFromString(frames[i]); @@ -1052,12 +1116,14 @@ The sum of the views and the sum of the dividers should be equal to the size of position += dividerThickness; } + _shouldAutosave = YES; } if (preCollapseArray) { _preCollapsePositions = [CPMutableDictionary new]; + for (var i = 0, count = [preCollapseArray count]; i < count; i++) [_preCollapsePositions setObject:preCollapseArray[i] forKey:i + ""]; } @@ -1068,6 +1134,9 @@ The sum of the views and the sum of the dividers should be equal to the size of */ - (CPString)_framesKeyForAutosaveName:(CPString)theAutosaveName { + if (!theAutosaveName) + return nil; + return @"CPSplitView Subview Frames " + theAutosaveName; } @@ -1076,6 +1145,9 @@ The sum of the views and the sum of the dividers should be equal to the size of */ - (CPString)_precollapseKeyForAutosaveName:(CPString)theAutosaveName { + if (!theAutosaveName) + return nil; + return @"CPSplitView Subview Precollapse Positions " + theAutosaveName; } diff --git a/AppKit/CPStepper.j b/AppKit/CPStepper.j index 07458a452..b16833262 100644 --- a/AppKit/CPStepper.j +++ b/AppKit/CPStepper.j @@ -34,6 +34,7 @@ @implementation CPStepper: CPControl { BOOL _valueWraps @accessors(property=valueWraps); + BOOL _autorepeat @accessors(getter=autorepeat); int _increment @accessors(property=increment); int _maxValue @accessors(property=maxValue); int _minValue @accessors(property=minValue); @@ -88,29 +89,38 @@ _minValue = 0.0; _increment = 1.0; _valueWraps = YES; + _autorepeat = YES; [self setDoubleValue:0.0]; - - _buttonUp = [[CPButton alloc] initWithFrame:_CGRectMakeZero()]; - [_buttonUp setContinuous:YES]; - [_buttonUp setTarget:self]; - [_buttonUp setAction:@selector(_buttonDidClick:)]; - [_buttonUp setAutoresizingMask:CPViewNotSizable]; - [self addSubview:_buttonUp]; - - _buttonDown = [[CPButton alloc] initWithFrame:_CGRectMakeZero()]; - [_buttonDown setContinuous:YES]; - [_buttonDown setTarget:self]; - [_buttonDown setAction:@selector(_buttonDidClick:)]; - [_buttonDown setAutoresizingMask:CPViewNotSizable]; - [self addSubview:_buttonDown]; - - [self setNeedsLayout]; + [self _init]; } return self; } +/*! @ignore */ + +- (void)_init +{ + _buttonUp = [[CPButton alloc] initWithFrame:_CGRectMakeZero()]; + [_buttonUp setContinuous:_autorepeat]; + [_buttonUp setTarget:self]; + [_buttonUp setAction:@selector(_buttonDidClick:)]; + [_buttonUp setAutoresizingMask:CPViewNotSizable]; + [self addSubview:_buttonUp]; + + _buttonDown = [[CPButton alloc] initWithFrame:_CGRectMakeZero()]; + [_buttonDown setContinuous:_autorepeat]; + [_buttonDown setTarget:self]; + [_buttonDown setAction:@selector(_buttonDidClick:)]; + [_buttonDown setAutoresizingMask:CPViewNotSizable]; + + [self setContinuous:_autorepeat]; + [self addSubview:_buttonDown]; + + [self setNeedsLayout]; +} + #pragma mark - #pragma mark Superclass overrides @@ -164,8 +174,13 @@ */ - (void)setAutorepeat:(BOOL)shouldAutoRepeat { - [_buttonUp setContinuous:shouldAutoRepeat]; - [_buttonDown setContinuous:shouldAutoRepeat]; + if (shouldAutoRepeat !== _autorepeat) + { + [_buttonUp setContinuous:shouldAutoRepeat]; + [_buttonDown setContinuous:shouldAutoRepeat]; + } + + [self setContinuous:shouldAutoRepeat]; } /*! @@ -235,19 +250,27 @@ @end +var CPStepperMinValue = @"CPStepperMinValue", + CPStepperMaxValue = @"CPStepperMaxValue", + CPStepperValueWraps = @"CPStepperValueWraps", + CPStepperAutorepeat = @"CPStepperAutorepeat", + CPStepperIncrement = @"CPStepperIncrement"; -@implementation CPStepper (CPCodingCompliance) +@implementation CPStepper (CPCoding) - (id)initWithCoder:(CPCoder)aCoder { if (self = [super initWithCoder:aCoder]) { - _maxValue = [aCoder decodeObjectForKey:@"_maxValue"]; - _minValue = [aCoder decodeObjectForKey:@"_minValue"]; - _increment = [aCoder decodeObjectForKey:@"_increment"]; - _buttonUp = [aCoder decodeObjectForKey:@"_buttonUp"]; - _buttonDown = [aCoder decodeObjectForKey:@"_buttonDown"]; + _increment = [aCoder decodeIntForKey:CPStepperIncrement]; + _minValue = [aCoder decodeIntForKey:CPStepperMinValue]; + _maxValue = [aCoder decodeIntForKey:CPStepperMaxValue]; + _valueWraps = [aCoder decodeBoolForKey:CPStepperValueWraps]; + _autorepeat = [aCoder decodeBoolForKey:CPStepperAutorepeat]; + + [self _init]; } + return self; } @@ -255,11 +278,16 @@ { [super encodeWithCoder:aCoder]; - [aCoder encodeObject:_maxValue forKey:@"_maxValue"]; - [aCoder encodeObject:_minValue forKey:@"_minValue"]; - [aCoder encodeObject:_increment forKey:@"_increment"]; - [aCoder encodeObject:_buttonUp forKey:@"_buttonUp"]; - [aCoder encodeObject:_buttonDown forKey:@"_buttonDown"]; + [aCoder encodeInt:_increment forKey:CPStepperIncrement]; + + if (_minValue) + [aCoder encodeInt:_minValue forKey:CPStepperMinValue]; + if (_maxValue) + [aCoder encodeInt:_maxValue forKey:CPStepperMaxValue]; + if (_valueWraps) + [aCoder encodeBool:_valueWraps forKey:CPStepperValueWraps]; + if (_autorepeat) + [aCoder encodeBool:_autorepeat forKey:CPStepperAutorepeat]; } @end diff --git a/AppKit/CPTabView.j b/AppKit/CPTabView.j index e2e97048d..94b1b64e0 100644 --- a/AppKit/CPTabView.j +++ b/AppKit/CPTabView.j @@ -1,3 +1,25 @@ +/* + * CPTabView.j + * AppKit + * + * Created by Derek Hammer. + * Copyright 2010, Derek Hammer. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + @import "CPBox.j" @import "CPSegmentedControl.j" @import "CPTabViewItem.j" @@ -45,7 +67,6 @@ var CPTabViewDidSelectTabViewItemSelector = 1, if (self = [super initWithFrame:aFrame]) { _items = [CPArray array]; - _selectedIndex = CPNotFound; [self _init]; [self setTabViewType:CPTopTabsBezelBorder]; @@ -56,6 +77,8 @@ var CPTabViewDidSelectTabViewItemSelector = 1, - (void)_init { + _selectedIndex = CPNotFound; + _tabs = [[CPSegmentedControl alloc] initWithFrame:CGRectMake(0, 0, 0, 0)]; [_tabs setHitTests:NO]; @@ -250,17 +273,15 @@ var CPTabViewDidSelectTabViewItemSelector = 1, Selects the item at the specified index. @param anIndex the index of the item to display. */ -- (void)selectTabViewItemAtIndex:(unsigned)anIndex +- (BOOL)selectTabViewItemAtIndex:(unsigned)anIndex { - var aTabViewItem = [_items objectAtIndex:anIndex]; - if (anIndex === _selectedIndex) return; var aTabViewItem = [self tabViewItemAtIndex:anIndex]; if ((_delegateSelectors & CPTabViewShouldSelectTabViewItemSelector) && ![_delegate tabView:self shouldSelectTabViewItem:aTabViewItem]) - return; + return NO; if (_delegateSelectors & CPTabViewWillSelectTabViewItemSelector) [_delegate tabView:self willSelectTabViewItem:aTabViewItem]; @@ -270,6 +291,8 @@ var CPTabViewDidSelectTabViewItemSelector = 1, if (_delegateSelectors & CPTabViewDidSelectTabViewItemSelector) [_delegate tabView:self didSelectTabViewItem:aTabViewItem]; + + return YES; } /*! @@ -278,7 +301,10 @@ var CPTabViewDidSelectTabViewItemSelector = 1, */ - (CPTabViewItem)selectedTabViewItem { - return [_items objectAtIndex:_selectedIndex]; + if (_selectedIndex != CPNotFound) + return [_items objectAtIndex:_selectedIndex]; + + return nil; } // Modifying the font @@ -407,11 +433,8 @@ var CPTabViewDidSelectTabViewItemSelector = 1, { var segmentIndex = [_tabs testSegment:[_tabs convertPoint:[anEvent locationInWindow] fromView:nil]]; - if (segmentIndex != CPNotFound) - { - [self selectTabViewItemAtIndex:segmentIndex]; + if (segmentIndex != CPNotFound && [self selectTabViewItemAtIndex:segmentIndex]) [_tabs trackSegment:anEvent]; - } } - (void)_repositionTabs @@ -428,8 +451,12 @@ var CPTabViewDidSelectTabViewItemSelector = 1, - (void)_setSelectedIndex:(CPNumber)index { _selectedIndex = index; + [self _setContentViewForItem:[_items objectAtIndex:_selectedIndex]]; +} - [_box setContentView:[[_items objectAtIndex:_selectedIndex] view]]; +- (void)_setContentViewForItem:(CPTabViewItem)anItem +{ + [_box setContentView:[anItem view]]; } - (void)_updateItems @@ -469,17 +496,17 @@ var CPTabViewItemsKey = "CPTabViewItemsKey", [_tabs setFont:_font]; _items = [aCoder decodeObjectForKey:CPTabViewItemsKey]; + [_items makeObjectsPerformSelector:@selector(_setTabView:) withObject:self]; [self _updateItems]; [self _repositionTabs]; - var selected = [aCoder decodeObjectForKey:CPTabViewSelectedItemKey]; + [self setDelegate:[aCoder decodeObjectForKey:CPTabViewDelegateKey]]; + var selected = [aCoder decodeObjectForKey:CPTabViewSelectedItemKey]; if (selected) [self selectTabViewItem:selected]; - [self setDelegate:[aCoder decodeObjectForKey:CPTabViewDelegateKey]]; - [self setTabViewType:[aCoder decodeIntForKey:CPTabViewTypeKey]]; } @@ -491,7 +518,10 @@ var CPTabViewItemsKey = "CPTabViewItemsKey", [super encodeWithCoder:aCoder]; [aCoder encodeObject:_items forKey:CPTabViewItemsKey]; - [aCoder encodeObject:[self selectedTabViewItem] forKey:CPTabViewSelectedItemKey]; + + var selected = [self selectedTabViewItem]; + if (selected) + [aCoder encodeObject:selected forKey:CPTabViewSelectedItemKey]; [aCoder encodeInt:_type forKey:CPTabViewTypeKey]; [aCoder encodeObject:_font forKey:CPTabViewFontKey]; diff --git a/AppKit/CPTabViewItem.j b/AppKit/CPTabViewItem.j index de8fe0ad8..c6c707c71 100644 --- a/AppKit/CPTabViewItem.j +++ b/AppKit/CPTabViewItem.j @@ -132,7 +132,13 @@ CPPressedTab = 2; */ - (void)setView:(CPView)aView { + if (_view == aView) + return; + _view = aView; + + if ([_tabView selectedTabViewItem] == self) + [_tabView _setContentViewForItem:self]; } /*! diff --git a/AppKit/CPTableColumn.j b/AppKit/CPTableColumn.j index 25be6c021..8faf64074 100644 --- a/AppKit/CPTableColumn.j +++ b/AppKit/CPTableColumn.j @@ -678,8 +678,11 @@ CPTableColumnUserResizingMask = 1 << 1; bindingInfo = binding._info, destination = [bindingInfo objectForKey:CPObservedObjectKey], keyPath = [bindingInfo objectForKey:CPObservedKeyPathKey], + options = [bindingInfo objectForKey:CPOptionsKey], dotIndex = keyPath.lastIndexOf("."); + newValue = [binding reverseTransformValue:newValue withOptions:options]; + if (dotIndex === CPNotFound) [[destination valueForKeyPath:keyPath] replaceObjectAtIndex:aRow withObject:newValue]; else @@ -696,11 +699,6 @@ CPTableColumnUserResizingMask = 1 << 1; } } -//- (void)objectValue -//{ -// return nil; -//} - @end var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", @@ -734,7 +732,6 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", [self setIdentifier:[aCoder decodeObjectForKey:CPTableColumnIdentifierKey]]; [self setHeaderView:[aCoder decodeObjectForKey:CPTableColumnHeaderViewKey]]; [self setDataView:[aCoder decodeObjectForKey:CPTableColumnDataViewKey]]; - [self setHeaderView:[aCoder decodeObjectForKey:CPTableColumnHeaderViewKey]]; _resizingMask = [aCoder decodeIntForKey:CPTableColumnResizingMaskKey]; _isHidden = [aCoder decodeBoolForKey:CPTableColumnIsHiddenKey]; diff --git a/AppKit/CPTableHeaderView.j b/AppKit/CPTableHeaderView.j index 3155ae5c7..1ffcf2334 100644 --- a/AppKit/CPTableHeaderView.j +++ b/AppKit/CPTableHeaderView.j @@ -643,7 +643,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal columnMaxX = _CGRectGetMaxX(columnToStroke); CGContextMoveToPoint(context, FLOOR(columnMaxX) - 0.5, ROUND(_CGRectGetMinY(columnToStroke))); - CGContextAddLineToPoint(context, FLOOR(columnMaxX) - 0.5, ROUND(_CGRectGetMaxY(columnToStroke))); + CGContextAddLineToPoint(context, FLOOR(columnMaxX) - 0.5, ROUND(_CGRectGetMaxY(columnToStroke)) - 1.0); } CGContextClosePath(context); CGContextStrokePath(context); diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index a81a473bf..38b86ff85 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -87,9 +87,9 @@ CPTableViewSelectionHighlightStyleNone = -1; CPTableViewSelectionHighlightStyleRegular = 0; CPTableViewSelectionHighlightStyleSourceList = 1; -CPTableViewGridNone = 0; -CPTableViewSolidVerticalGridLineMask = 1 << 0; -CPTableViewSolidHorizontalGridLineMask = 1 << 1; +CPTableViewGridNone = 0; +CPTableViewSolidVerticalGridLineMask = 1 << 0; +CPTableViewSolidHorizontalGridLineMask = 1 << 1; CPTableViewNoColumnAutoresizing = 0; CPTableViewUniformColumnAutoresizingStyle = 1; // FIX ME: This is FUBAR @@ -321,7 +321,6 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; */ - (void)_init { - _tableViewFlags = 0; _lastSelectedRow = -1; _selectedColumnIndexes = [CPIndexSet indexSet]; @@ -335,15 +334,12 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; if (!_alternatingRowBackgroundColors) _alternatingRowBackgroundColors = [[CPColor whiteColor], [CPColor colorWithHexString:@"e4e7ff"]]; - _selectionHighlightColor = [CPColor colorWithHexString:@"5f83b9"]; - _tableColumnRanges = []; _dirtyTableColumnRangeIndex = 0; _numberOfHiddenColumns = 0; _objectValues = { }; _dataViewsForTableColumns = { }; - _dataViews = []; _numberOfRows = 0; _exposedRows = [CPIndexSet indexSet]; _exposedColumns = [CPIndexSet indexSet]; @@ -683,7 +679,8 @@ NOT YET IMPLEMENTED */ - (void)setRowHeight:(unsigned)aRowHeight { - aRowHeight = aRowHeight; + // Accept row heights such as "0". + aRowHeight = +aRowHeight; if (_rowHeight === aRowHeight) return; @@ -954,8 +951,9 @@ NOT YET IMPLEMENTED */ - (void)_moveColumn:(unsigned)fromIndex toColumn:(unsigned)toIndex { - fromIndex = fromIndex; - toIndex = toIndex; + // Convert parameters such as "0" to 0. + fromIndex = +fromIndex; + toIndex = +toIndex; if (fromIndex === toIndex) return; @@ -1511,6 +1509,8 @@ NOT YET IMPLEMENTED if ([scrollView isKindOfClass:[CPScrollView class]] && [scrollView documentView] === self) [scrollView _updateCornerAndHeaderView]; + + [self setNeedsLayout]; } // Complexity: @@ -1562,7 +1562,8 @@ NOT YET IMPLEMENTED */ - (CGRect)rectOfColumn:(CPInteger)aColumnIndex { - aColumnIndex = aColumnIndex; + // Convert e.g. "0" to 0. + aColumnIndex = +aColumnIndex; if (aColumnIndex < 0 || aColumnIndex >= NUMBER_OF_COLUMNS()) return _CGRectMakeZero(); @@ -2684,7 +2685,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad oldMainSortDescriptor = [[self sortDescriptors] objectAtIndex: 0]; // Remove every main descriptor equivalents (normally only one) - while ((descriptor = [e nextObject]) != nil) + while ((descriptor = [e nextObject]) !== nil) { if ([[descriptor key] isEqual: [newMainSortDescriptor key]]) [outdatedDescriptors addObject:descriptor]; @@ -3045,7 +3046,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad return _sortDescriptors; } - /*! @ignore */ @@ -3369,6 +3369,14 @@ Your delegate can implement this method to avoid subclassing the tableview to ad */ - (void)_commitDataViewObjectValue:(id)sender { + /* + makeFirstResponder at the end of this method causes the dataview to resign. + If the dataview resigning triggers the action (as CPTextField does), we come right + back here and start an infinite loop. So we have to check this flag first. + */ + if (_editingCellIndex === nil) + return; + _editingCellIndex = nil; if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_) @@ -3426,7 +3434,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad [aTableColumn setDataView:dataView]; } - return [aTableColumn _newDataViewForRow:aRow]; } @@ -3498,8 +3505,20 @@ Your delegate can implement this method to avoid subclassing the tableview to ad { [super setNeedsDisplay:aFlag]; [_tableDrawView setNeedsDisplay:aFlag]; + + [[self headerView] setNeedsDisplay:YES]; } +/*! + @ignore +*/ +- (void)setNeedsLayout +{ + [super setNeedsLayout]; + [[self headerView] setNeedsLayout]; +} + + /*! @ignore */ @@ -3681,7 +3700,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad [_selectedColumnIndexes getIndexes:indexes maxCount:-1 inIndexRange:exposedRange]; } - var count = count2 = [indexes count]; + var count, + count2 = count = [indexes count]; if (!count) return; @@ -3706,7 +3726,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad { var topGroupLineColor = [CPColor colorWithCalibratedWhite:212.0 / 255.0 alpha:1.0], bottomGroupLineColor = [CPColor colorWithCalibratedWhite:185.0 / 255.0 alpha:1.0], - gradientGroupColor = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [212.0 / 255.0, 212.0 / 255.0, 212.0 / 255.0,1.0, 197.0 / 255.0, 197.0 / 255.0, 197.0 / 255.0,1.0], [0,1], 2); + gradientGroupColor = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [212.0 / 255.0, 212.0 / 255.0, 212.0 / 255.0, 1.0, 197.0 / 255.0, 197.0 / 255.0, 197.0 / 255.0, 1.0], [0, 1], 2); } while (count--) @@ -3824,8 +3844,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad var gradientCache = [self selectionGradientColors], topLineColor = [CPColor colorWithHexString:"d3d3d3"], bottomLineColor = [CPColor colorWithHexString:"bebebd"], - gradientColor = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [220.0 / 255.0, 220.0 / 255.0, 220.0 / 255.0,1.0, - 199.0 / 255.0, 199.0 / 255.0, 199.0 / 255.0,1.0], [0,1], 2), + gradientColor = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [220.0 / 255.0, 220.0 / 255.0, 220.0 / 255.0, 1.0, + 199.0 / 255.0, 199.0 / 255.0, 199.0 / 255.0, 1.0], [0, 1], 2), drawGradient = YES; while (i--) @@ -3973,7 +3993,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad { var row = [self rowAtPoint:aPoint]; - //if the user clicks outside a row then deselect everything + // If the user clicks outside a row then deselect everything. if (row < 0 && _allowsEmptySelection) [self selectRowIndexes:[CPIndexSet indexSet] byExtendingSelection:NO]; @@ -4638,19 +4658,19 @@ Your delegate can implement this method to avoid subclassing the tableview to ad while (![_delegate tableView:self shouldSelectRow:i] && (i < [self numberOfRows] || i > 0)) shouldGoUpward ? i-- : i++; //check to see if the row can be selected if it can't be then see if the next row can be selected - //if the index still can be selected after the loop then just return - if (![_delegate tableView:self shouldSelectRow:i]) - return; + // If the index still can be selected after the loop then just return. + if (![_delegate tableView:self shouldSelectRow:i]) + return; } - // if we go upward and see that this row is already selected we should deselect the row below - if ([selectedIndexes containsIndex:i] && extend) + // If we go upward and see that this row is already selected we should deselect the row below. + if (extend && [selectedIndexes containsIndex:i]) { - // the row we're on is the last to be selected + // The row we're on is the last to be selected. var differedLastSelectedRow = i; // no remove the one before/after it - shouldGoUpward ? i++ : i--; + shouldGoUpward ? i++ : i--; [selectedIndexes removeIndex:i]; @@ -4662,7 +4682,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad if ([selectedIndexes containsIndex:i]) { i = shouldGoUpward ? [selectedIndexes firstIndex] -1 : [selectedIndexes lastIndex] + 1; - i = MIN(MAX(i,0), [self numberOfRows] - 1); + i = MIN(MAX(i, 0), [self numberOfRows] - 1); } [selectedIndexes addIndex:i]; @@ -4762,15 +4782,14 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", _tableColumns = [aCoder decodeObjectForKey:CPTableViewTableColumnsKey] || []; [_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self]; - if ([aCoder containsValueForKey:CPTableViewRowHeightKey]) - _rowHeight = [aCoder decodeFloatForKey:CPTableViewRowHeightKey]; - else - _rowHeight = 23.0; + _rowHeight = [aCoder decodeFloatForKey:CPTableViewRowHeightKey] || 23.0; + _intercellSpacing = [aCoder decodeSizeForKey:CPTableViewIntercellSpacingKey]; - _intercellSpacing = [aCoder decodeSizeForKey:CPTableViewIntercellSpacingKey] || _CGSizeMake(3.0, 2.0); + if (_CGSizeEqualToSize(_intercellSpacing, _CGSizeMakeZero())) + _intercellSpacing = _CGSizeMake(3.0, 2.0); [self setGridColor:[aCoder decodeObjectForKey:CPTableViewGridColorKey]]; - _gridStyleMask = [aCoder decodeIntForKey:CPTableViewGridStyleMaskKey] || CPTableViewGridNone; + _gridStyleMask = [aCoder decodeIntForKey:CPTableViewGridStyleMaskKey]; _usesAlternatingRowBackgroundColors = [aCoder decodeObjectForKey:CPTableViewUsesAlternatingBackgroundKey]; [self setAlternatingRowBackgroundColors:[aCoder decodeObjectForKey:CPTableViewAlternatingRowColorsKey]]; @@ -4837,9 +4856,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", while (index != CPNotFound) { - var indexSet = (switchFlag) ? otherSet : self; - - otherIndex = [indexSet indexGreaterThanOrEqualToIndex:index]; + var indexSet = (switchFlag) ? otherSet : self, + otherIndex = [indexSet indexGreaterThanOrEqualToIndex:index]; if (otherIndex == index) { diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index 3e8348c8e..0145649c2 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -540,7 +540,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); // Select the text if the textfield became first responder through keyboard interaction if (!_willBecomeFirstResponderByClick) - [self selectText:self]; + [self _selectText:self immediately:YES]; _willBecomeFirstResponderByClick = NO; @@ -630,15 +630,11 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); #endif - // post CPControlTextDidEndEditingNotification - if (_isEditing) - { - _isEditing = NO; - [self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:nil]]; + _isEditing = NO; + [self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:nil]]; - if ([self sendsActionOnEndEditing]) - [self sendAction:[self action] to:[self target]]; - } + if ([self sendsActionOnEndEditing]) + [self sendAction:[self action] to:[self target]]; [self textDidBlur:[CPNotification notificationWithName:CPTextFieldDidBlurNotification object:self userInfo:nil]]; @@ -1075,24 +1071,36 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); */ - (void)selectText:(id)sender { - // FIXME Should this really make the text field the first responder? + [self _selectText:sender immediately:NO]; +} +- (void)_selectText:(id)sender immediately:(BOOL)immediately +{ + // Selecting the text in a field makes it the first responder if (([self isEditable] || [self isSelectable])) { + var wind = [self window]; + #if PLATFORM(DOM) var element = [self _inputElement]; - if ([[self window] firstResponder] === self) - window.setTimeout(function() { element.select(); }, 0); - else if ([self window] !== nil && [[self window] makeFirstResponder:self]) - window.setTimeout(function() {[self selectText:sender];}, 0); + if ([wind firstResponder] === self) + { + if (immediately) + element.select(); + else + window.setTimeout(function() { element.select(); }, 0); + } + else if (wind !== nil && [wind makeFirstResponder:self]) + [self _selectText:sender immediately:immediately]; #else // Even if we can't actually select the text we need to preserve the first // responder side effect. - if ([self window] !== nil && [[self window] firstResponder] !== self) - [[self window] makeFirstResponder:self]; + if (wind !== nil && [wind firstResponder] !== self) + [wind makeFirstResponder:self]; #endif } + } - (void)copy:(id)sender @@ -1503,47 +1511,25 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey", { } -- (void)setValueFor:(CPString)theBinding +- (void)_updatePlaceholdersWithOptions:(CPDictionary)options { - var destination = [_info objectForKey:CPObservedObjectKey], - keyPath = [_info objectForKey:CPObservedKeyPathKey], - options = [_info objectForKey:CPOptionsKey], - newValue = [destination valueForKeyPath:keyPath], - isPlaceholder = CPIsControllerMarker(newValue); + [super _updatePlaceholdersWithOptions:options]; - if (isPlaceholder) - { - switch (newValue) - { - case CPMultipleValuesMarker: - newValue = [options objectForKey:CPMultipleValuesPlaceholderBindingOption] || @"Multiple Values"; - break; + [self _setPlaceholder:@"Multiple Values" forMarker:CPMultipleValuesMarker isDefault:YES]; + [self _setPlaceholder:@"No Selection" forMarker:CPNoSelectionMarker isDefault:YES]; + [self _setPlaceholder:@"Not Applicable" forMarker:CPNotApplicableMarker isDefault:YES]; + [self _setPlaceholder:@"" forMarker:CPNullMarker isDefault:YES]; +} - case CPNoSelectionMarker: - newValue = [options objectForKey:CPNoSelectionPlaceholderBindingOption] || @"No Selection"; - break; +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding +{ + [_source setPlaceholderString:aValue]; + [_source setObjectValue:nil]; +} - case CPNotApplicableMarker: - if ([options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) - [CPException raise:CPGenericException - reason:@"can't transform non applicable key on: "+_source+" value: "+newValue]; - - newValue = [options objectForKey:CPNotApplicablePlaceholderBindingOption] || @"Not Applicable"; - break; - - case CPNullMarker: - newValue = [options objectForKey:CPNullPlaceholderBindingOption] || @""; - break; - } - - [_source setPlaceholderString:newValue]; - [_source setObjectValue:nil]; - } - else - { - newValue = [self transformValue:newValue withOptions:options]; - [_source setObjectValue:newValue]; - } +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + [_source setObjectValue:aValue]; } @end diff --git a/AppKit/CPTheme.j b/AppKit/CPTheme.j index 4663c6dc8..6decba8ec 100644 --- a/AppKit/CPTheme.j +++ b/AppKit/CPTheme.j @@ -255,7 +255,7 @@ var CPThemesByName = { }, attributeNames = [attributes keyEnumerator], objectThemeClass = [anObject themeClass]; - while (attributeName = [attributeNames nextObject]) + while ((attributeName = [attributeNames nextObject]) !== nil) [self _recordAttribute:[attributes objectForKey:attributeName] forClass:objectThemeClass]; } diff --git a/AppKit/CPToolbar.j b/AppKit/CPToolbar.j index 6259df1d8..c759a87a2 100644 --- a/AppKit/CPToolbar.j +++ b/AppKit/CPToolbar.j @@ -50,9 +50,17 @@ CPToolbarDisplayModeIconOnly = 2; */ CPToolbarDisplayModeLabelOnly = 3; + +CPToolbarSizeModeDefault = 0; +CPToolbarSizeModeRegular = 1; +CPToolbarSizeModeSmall = 2; + var CPToolbarsByIdentifier = nil, CPToolbarConfigurationsByIdentifier = nil; +var TOOLBAR_REGULAR_HEIGHT = 59.0, + TOOLBAR_SMALL_HEIGHT = 46.0; + /*! @ingroup appkit @class CPToolbar @@ -87,6 +95,7 @@ var CPToolbarsByIdentifier = nil, BOOL _showsBaselineSeparator; BOOL _allowsUserCustomization; BOOL _isVisible; + int _sizeMode @accessors(property=sizeMode); id _delegate; @@ -148,6 +157,7 @@ var CPToolbarsByIdentifier = nil, _identifier = anIdentifier; _isVisible = YES; + _sizeMode = CPToolbarSizeModeDefault; [CPToolbar _addToolbar:self forIdentifier:_identifier]; } @@ -202,6 +212,16 @@ var CPToolbarsByIdentifier = nil, [_window _noteToolbarChanged]; } +- (void)setSizeMode:(CPToolbarSizeMode)aSize +{ + if (aSize === _sizeMode) + return; + _sizeMode = aSize; + + [[self _toolbarView] setFrame:[self _toolbarViewFrame]]; + [_window _noteToolbarChanged]; +} + - (CPWindow)_window { return _window; @@ -232,12 +252,17 @@ var CPToolbarsByIdentifier = nil, } +- (CGRect)_toolbarViewFrame +{ + return CPRectMake(0.0, 0.0, 1200.0, _sizeMode != CPToolbarSizeModeSmall ? TOOLBAR_REGULAR_HEIGHT : TOOLBAR_SMALL_HEIGHT); +} + /* @ignore */ - (CPView)_toolbarView { if (!_toolbarView) { - _toolbarView = [[_CPToolbarView alloc] initWithFrame:CPRectMake(0.0, 0.0, 1200.0, 59.0)]; + _toolbarView = [[_CPToolbarView alloc] initWithFrame:[self _toolbarViewFrame]]; [_toolbarView setToolbar:self]; [_toolbarView setAutoresizingMask:CPViewWidthSizable]; @@ -427,7 +452,8 @@ var CPToolbarIdentifierKey = @"CPToolbarIdentifierKey", CPToolbarIdentifiedItemsKey = @"CPToolbarIdentifiedItemsKey", CPToolbarDefaultItemsKey = @"CPToolbarDefaultItemsKey", CPToolbarAllowedItemsKey = @"CPToolbarAllowedItemsKey", - CPToolbarSelectableItemsKey = @"CPToolbarSelectableItemsKey"; + CPToolbarSelectableItemsKey = @"CPToolbarSelectableItemsKey", + CPToolbarSizeModeKey = @"CPToolbarSizeModeKey"; @implementation CPToolbar (CPCoding) @@ -446,6 +472,7 @@ var CPToolbarIdentifierKey = @"CPToolbarIdentifierKey", _showsBaselineSeparator = [aCoder decodeBoolForKey:CPToolbarShowsBaselineSeparatorKey]; _allowsUserCustomization = [aCoder decodeBoolForKey:CPToolbarAllowsUserCustomizationKey]; _isVisible = [aCoder decodeBoolForKey:CPToolbarIsVisibleKey]; + _sizeMode = [aCoder decodeIntForKey:CPToolbarSizeModeKey]; _identifiedItems = [aCoder decodeObjectForKey:CPToolbarIdentifiedItemsKey]; _defaultItems = [aCoder decodeObjectForKey:CPToolbarDefaultItemsKey]; @@ -492,6 +519,7 @@ var CPToolbarIdentifierKey = @"CPToolbarIdentifierKey", [aCoder encodeBool:_showsBaselineSeparator forKey:CPToolbarShowsBaselineSeparatorKey]; [aCoder encodeBool:_allowsUserCustomization forKey:CPToolbarAllowsUserCustomizationKey]; [aCoder encodeBool:_isVisible forKey:CPToolbarIsVisibleKey]; + [aCoder encodeInt:_sizeMode forKey:CPToolbarSizeModeKey] [aCoder encodeObject:_identifiedItems forKey:CPToolbarIdentifiedItemsKey]; [aCoder encodeObject:_defaultItems forKey:CPToolbarDefaultItemsKey]; @@ -547,7 +575,7 @@ var _CPToolbarItemInfoMake = function(anIndex, aView, aLabel, aMinWidth) var bundle = [CPBundle bundleForClass:self]; - _CPToolbarViewExtraItemsImage = [[CPImage alloc] initWithContentsOfFile: [bundle pathForResource:"_CPToolbarView/_CPToolbarViewExtraItemsImage.png"] size: CPSizeMake(10.0, 15.0)]; + _CPToolbarViewExtraItemsImage = [[CPImage alloc] initWithContentsOfFile: [bundle pathForResource:"_CPToolbarView/_CPToolbarViewExtraItemsImage.png"] size:CPSizeMake(10.0, 15.0)]; _CPToolbarViewExtraItemsAlternateImage = [[CPImage alloc] initWithContentsOfFile: [bundle pathForResource:"_CPToolbarView/_CPToolbarViewExtraItemsAlternateImage.png"] size:CGSizeMake(10.0, 15.0)]; } @@ -996,7 +1024,7 @@ var TOP_MARGIN = 5.0, { _imageView = [[CPImageView alloc] initWithFrame:[self bounds]]; - [_imageView setImageScaling:CPScaleProportionally]; + [_imageView setImageScaling:CPImageScaleProportionallyDown]; [self addSubview:_imageView]; } diff --git a/AppKit/CPUserDefaultsController.j b/AppKit/CPUserDefaultsController.j index 1b2e81f10..6aa98fe7f 100644 --- a/AppKit/CPUserDefaultsController.j +++ b/AppKit/CPUserDefaultsController.j @@ -180,7 +180,7 @@ var CPUserDefaultsControllerSharedKey = "CPUserDefaultsControllerSharedKey"; var keys = [_cachedValues allKeys], keysCount = [keys count]; - while(keysCount--) + while (keysCount--) { var key = keys[keysCount]; [self willChangeValueForKey:key]; @@ -194,7 +194,7 @@ var CPUserDefaultsControllerSharedKey = "CPUserDefaultsControllerSharedKey"; var keys = [_cachedValues allKeys], keysCount = [keys count]; - while(keysCount--) + while (keysCount--) { var key = keys[keysCount]; [[_controller defaults] setObject:[_cachedValues objectForKey:key] forKey:key]; @@ -207,7 +207,7 @@ var CPUserDefaultsControllerSharedKey = "CPUserDefaultsControllerSharedKey"; keys = [_cachedValues allKeys], keysCount = [keys count]; - while(keysCount--) + while (keysCount--) { var key = keys[keysCount]; [self willChangeValueForKey:key]; @@ -229,7 +229,7 @@ var CPUserDefaultsControllerSharedKey = "CPUserDefaultsControllerSharedKey"; keys = [_cachedValues allKeys], keysCount = [keys count]; - while(keysCount--) + while (keysCount--) { var key = keys[keysCount], value = [_cachedValues objectForKey:key], @@ -250,7 +250,7 @@ var CPUserDefaultsControllerSharedKey = "CPUserDefaultsControllerSharedKey"; keys = [_cachedValues allKeys], keysCount = [keys count]; - while(keysCount--) + while (keysCount--) { var key = keys[keysCount], value = [_cachedValues objectForKey:key], diff --git a/AppKit/CPView.j b/AppKit/CPView.j index 0482929d2..315650a60 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -98,6 +98,10 @@ var CPViewFlags = { }, CPViewHasCustomDrawRect = 1 << 0, CPViewHasCustomLayoutSubviews = 1 << 1; +var CPCurrentToolTip, + CPCurrentToolTipTimer, + CPToolTipDelay = 1.0; + /*! @ingroup appkit @class CPView @@ -141,6 +145,7 @@ var CPViewFlags = { }, BOOL _postsFrameChangedNotifications; BOOL _postsBoundsChangedNotifications; BOOL _inhibitFrameAndBoundsChangedNotifications; + BOOL _inLiveResize; #if PLATFORM(DOM) DOMElement _DOMElement; @@ -188,7 +193,10 @@ var CPViewFlags = { }, unsigned _viewClassFlags; // ToolTips - CPString _toolTip @accessors(property=toolTip); + CPString _toolTip @accessors(getter=toolTip); + Function _toolTipFunctionIn; + Function _toolTipFunctionOut; + BOOL _toolTipInstalled; } /* @@ -214,7 +222,7 @@ var CPViewFlags = { }, CachedNotificationCenter = [CPNotificationCenter defaultCenter]; } -- (void)setupViewFlags +- (void)_setupViewFlags { var theClass = [self class], classUID = [theClass UID]; @@ -235,6 +243,13 @@ var CPViewFlags = { }, _viewClassFlags = CPViewFlags[classUID]; } +- (void)_setupToolTipHandlers +{ + _toolTipInstalled = NO; + _toolTipFunctionIn = function(e){[self _fireToolTip];} + _toolTipFunctionOut = function(e){[self _invalidateToolTip];}; +} + + (CPSet)keyPathsForValuesAffectingFrame { return [CPSet setWithObjects:@"frameOrigin", @"frameSize"]; @@ -291,6 +306,9 @@ var CPViewFlags = { }, CPDOMDisplayServerSetStyleLeftTop(_DOMElement, NULL, _CGRectGetMinX(aFrame), _CGRectGetMinY(aFrame)); CPDOMDisplayServerSetStyleSize(_DOMElement, width, height); + if (typeof(appkit_tag_dom_elements) !== "undefined" && !!appkit_tag_dom_elements) + _DOMElement.setAttribute("data-cappuccino-view", [self className]); + _DOMImageParts = []; _DOMImageSizes = []; #endif @@ -298,7 +316,8 @@ var CPViewFlags = { }, _theme = [CPTheme defaultTheme]; _themeState = CPThemeStateNormal; - [self setupViewFlags]; + [self _setupToolTipHandlers]; + [self _setupViewFlags]; [self _loadThemeAttributes]; } @@ -306,6 +325,118 @@ var CPViewFlags = { }, return self; } + +/*! + Sets the tooltip for the receiver. + + @param aToolTip the tooltip +*/ +- (void)setToolTip:(CPString)aToolTip +{ + if (_toolTip == aToolTip) + return; + + _toolTip = aToolTip; + + if (_toolTip) + [self _installToolTipEventHandlers]; + else + [self _uninstallToolTipEventHandlers]; +} + +/*! @ignore + + Install the handlers for the tooltip +*/ +- (void)_installToolTipEventHandlers +{ + if (_toolTipInstalled) + return; + + if (_DOMElement.addEventListener) + { + _DOMElement.addEventListener("mouseover", _toolTipFunctionIn, NO); + _DOMElement.addEventListener("keypress", _toolTipFunctionOut, NO); + _DOMElement.addEventListener("mouseout", _toolTipFunctionOut, NO); + } + else if (_DOMElement.attachEvent) + { + _DOMElement.attachEvent("onmouseover", _toolTipFunctionIn); + _DOMElement.attachEvent("onkeypress", _toolTipFunctionOut); + _DOMElement.attachEvent("onmouseout", _toolTipFunctionOut); + } + _toolTipInstalled = YES; +} + +/*! @ignore + + Uninstall the handlers for the tooltip +*/ +- (void)_uninstallToolTipEventHandlers +{ + if (!_toolTipInstalled) + return; + + if (_DOMElement.removeEventListener) + { + _DOMElement.removeEventListener("mouseover", _toolTipFunctionIn, NO); + _DOMElement.removeEventListener("keypress", _toolTipFunctionOut, NO); + _DOMElement.removeEventListener("mouseout", _toolTipFunctionOut, NO); + } + else if (_DOMElement.detachEvent) + { + _DOMElement.detachEvent("onmouseover", _toolTipFunctionIn); + _DOMElement.detachEvent("onkeypress", _toolTipFunctionOut); + _DOMElement.detachEvent("onmouseout", _toolTipFunctionOut); + } + _toolTipInstalled = NO; +} + +/*! @ignore + Starts the tooltip timer. +*/ +- (void)_fireToolTip +{ + if (CPCurrentToolTipTimer) + { + [CPCurrentToolTipTimer invalidate]; + if (CPCurrentToolTip) + [CPCurrentToolTip close]; + CPCurrentToolTip = nil; + } + + if (_toolTip) + CPCurrentToolTipTimer = [CPTimer scheduledTimerWithTimeInterval:CPToolTipDelay target:self selector:@selector(_showToolTip:) userInfo:nil repeats:NO]; +} + +/*! @ignore + Stop the tooltip timer if any +*/ +- (void)_invalidateToolTip +{ + if (CPCurrentToolTipTimer) + { + [CPCurrentToolTipTimer invalidate]; + CPCurrentToolTipTimer = nil; + } + + if (CPCurrentToolTip) + { + [CPCurrentToolTip close]; + CPCurrentToolTip = nil; + } +} + +/*! @ignore + Actually shows the tooltip if any +*/ +- (void)_showToolTip:(CPTimer)aTimer +{ + if (CPCurrentToolTip) + [CPCurrentToolTip close]; + CPCurrentToolTip = [_CPToolTip toolTipWithString:_toolTip]; +} + /*! Returns the container view of the receiver @return the receiver's containing view @@ -365,6 +496,9 @@ var CPViewFlags = { }, /* @ignore */ - (void)_insertSubview:(CPView)aSubview atIndex:(int)anIndex { + if (aSubview === self) + [CPException raise:CPInvalidArgumentException reason:"can't add a view as a subview of itself"]; + // We will have to adjust the z-index of all views starting at this index. var count = _subviews.length; @@ -527,7 +661,7 @@ var CPViewFlags = { }, var addedSubview = nil, addedSubviewEnumerator = [addedSubviews objectEnumerator]; - while (addedSubview = [addedSubviewEnumerator nextObject]) + while ((addedSubview = [addedSubviewEnumerator nextObject]) !== nil) [self addSubview:addedSubview]; // If the order is fine, no need to reorder. @@ -848,11 +982,17 @@ var CPViewFlags = { }, if (_backgroundType === BackgroundVerticalThreePartImage) { + // Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed. + CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], size.width, _DOMImageSizes[0].height); CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], size.width, size.height - _DOMImageSizes[0].height - _DOMImageSizes[2].height); + CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], size.width, _DOMImageSizes[2].height); } else if (_backgroundType === BackgroundHorizontalThreePartImage) { + // Make sure to repeat the left and right pieces vertically if they're not the exact height needed. + CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], _DOMImageSizes[0].width, size.height); CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], size.width - _DOMImageSizes[0].width - _DOMImageSizes[2].width, size.height); + CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], _DOMImageSizes[2].width, size.height); } else if (_backgroundType === BackgroundNinePartImage) { @@ -1539,7 +1679,10 @@ var CPViewFlags = { }, } else if (_backgroundType == BackgroundVerticalThreePartImage) { + // Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed. + CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], frameSize.width, _DOMImageSizes[0].height); CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], frameSize.width, frameSize.height - _DOMImageSizes[0].height - _DOMImageSizes[2].height); + CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], frameSize.width, _DOMImageSizes[2].height); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[0], NULL, 0.0, 0.0); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[1], NULL, 0.0, _DOMImageSizes[0].height); @@ -1547,7 +1690,10 @@ var CPViewFlags = { }, } else if (_backgroundType == BackgroundHorizontalThreePartImage) { + // Make sure to repeat the left and right pieces vertically if they're not the exact height needed. + CPDOMDisplayServerSetStyleSize(_DOMImageParts[0], _DOMImageSizes[0].width, frameSize.height); CPDOMDisplayServerSetStyleSize(_DOMImageParts[1], frameSize.width - _DOMImageSizes[0].width - _DOMImageSizes[2].width, frameSize.height); + CPDOMDisplayServerSetStyleSize(_DOMImageParts[2], _DOMImageSizes[2].width, frameSize.height); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[0], NULL, 0.0, 0.0); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[1], NULL, _DOMImageSizes[0].width, 0.0); @@ -2128,6 +2274,43 @@ setBoundsOrigin: { } +/*! + Return yes if the receiver is in a live-resize operation. +*/ +- (BOOL)inLiveResize +{ + return _inLiveResize; +} + +/*! + Not implemented. + + A view will be sent this message before a window begins a resize operation. The + receiver might choose to simplify its drawing operations during a live resize + for speed. + + Subclasses should call super. +*/ +- (void)viewWillStartLiveResize +{ + _inLiveResize = YES; +} + +/*! + Not implemented. + + A view will be sent this message after a window finishes a resize operation. The + receiver which simplified its drawing operations in viewWillStartLiveResize might + stop doing so now. Note the view might no longer be in a window, so use + [self setNeedsDisplay:YES] if a final non-simplified redraw is required. + + Subclasses should call super. +*/ +- (void)viewDidEndLiveResize +{ + _inLiveResize = NO; +} + @end @implementation CPView (KeyView) @@ -2543,6 +2726,50 @@ setBoundsOrigin: return (_themeAttributes && _themeAttributes[aName] !== undefined); } +/*! + Registers theme values encoded in an array at runtime. The format of the data in the array + is the same as that used by ThemeDescriptors.j, with the exception that you need to use + CPColorWithImages() in place of PatternColor(). For more information see the comments + at the top of ThemeDescriptors.j. + + @param themeValues array of theme values +*/ +- (void)registerThemeValues:(CPArray)themeValues +{ + for (var i = 0; i < themeValues.length; ++i) + { + var attributeValueState = themeValues[i], + attribute = attributeValueState[0], + value = attributeValueState[1], + state = attributeValueState[2]; + + if (state) + [self setValue:value forThemeAttribute:attribute inState:state]; + else + [self setValue:value forThemeAttribute:attribute]; + } +} + +/*! + Registers theme values encoded in an array at runtime. The format of the data in the array + is the same as that used by ThemeDescriptors.j, with the exception that you need to use + CPColorWithImages() in place of PatternColor(). The values in \c inheritedValues are + registered first, then those in \c themeValues override/augment the inherited values. + For more information see the comments at the top of ThemeDescriptors.j. + + @param themeValues array of base theme values + @param inheritedValues array of overridden/additional theme values +*/ +- (void)registerThemeValues:(CPArray)themeValues inherit:(CPArray)inheritedValues +{ + // Register inherited values first, then override those with the subtheme values. + if (inheritedValues) + [self registerThemeValues:inheritedValues]; + + if (themeValues) + [self registerThemeValues:themeValues]; +} + - (CPView)createEphemeralSubviewNamed:(CPString)aViewName { return nil; @@ -2607,6 +2834,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", CPViewBoundsKey = @"CPViewBoundsKey", CPViewFrameKey = @"CPViewFrameKey", CPViewHitTestsKey = @"CPViewHitTestsKey", + CPViewToolTipKey = @"CPViewToolTipKey", CPViewIsHiddenKey = @"CPViewIsHiddenKey", CPViewOpacityKey = @"CPViewOpacityKey", CPViewSubviewsKey = @"CPViewSubviewsKey", @@ -2661,7 +2889,12 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", _autoresizesSubviews = ![aCoder containsValueForKey:CPViewAutoresizesSubviewsKey] || [aCoder decodeBoolForKey:CPViewAutoresizesSubviewsKey]; - _hitTests = ![aCoder containsValueForKey:CPViewHitTestsKey] || [aCoder decodeObjectForKey:CPViewHitTestsKey]; + _hitTests = ![aCoder containsValueForKey:CPViewHitTestsKey] || [aCoder decodeBoolForKey:CPViewHitTestsKey]; + + [self _setupToolTipHandlers]; + _toolTip = [aCoder decodeObjectForKey:CPViewToolTipKey]; + if (_toolTip) + [self _installToolTipEventHandlers]; // DOM SETUP #if PLATFORM(DOM) @@ -2681,10 +2914,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", } #endif - if ([aCoder containsValueForKey:CPViewIsHiddenKey]) - [self setHidden:[aCoder decodeBoolForKey:CPViewIsHiddenKey]]; - else - _isHidden = NO; + [self setHidden:[aCoder decodeBoolForKey:CPViewIsHiddenKey]]; if ([aCoder containsValueForKey:CPViewOpacityKey]) [self setAlphaValue:[aCoder decodeIntForKey:CPViewOpacityKey]]; @@ -2692,8 +2922,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", _opacity = 1.0; [self setBackgroundColor:[aCoder decodeObjectForKey:CPViewBackgroundColorKey]]; - - [self setupViewFlags]; + [self _setupViewFlags]; _theme = [CPTheme defaultTheme]; _themeClass = [aCoder decodeObjectForKey:CPViewThemeClassKey]; @@ -2774,6 +3003,9 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask", if (_isHidden) [aCoder encodeBool:_isHidden forKey:CPViewIsHiddenKey]; + if (_toolTip) + [aCoder encodeObject:_toolTip forKey:CPViewToolTipKey]; + var nextKeyView = [self nextKeyView]; if (nextKeyView !== nil && ![nextKeyView isEqual:self]) @@ -2897,3 +3129,5 @@ var _CPViewGetTransform = function(/*CPView*/ fromView, /*CPView */ toView) return transform; }; + + diff --git a/AppKit/CPViewController.j b/AppKit/CPViewController.j index f5a3230d3..879df04ae 100644 --- a/AppKit/CPViewController.j +++ b/AppKit/CPViewController.j @@ -66,6 +66,7 @@ var CPViewControllerCachedCibs; { CPView _view @accessors(property=view); BOOL _isLoading; + BOOL _isLazy; id _representedObject @accessors(property=representedObject); CPString _title @accessors(property=title); @@ -124,6 +125,7 @@ var CPViewControllerCachedCibs; _cibExternalNameTable = anExternalNameTable || [CPDictionary dictionaryWithObject:self forKey:CPCibOwner]; _isLoading = NO; + _isLazy = NO; } return self; @@ -136,12 +138,12 @@ var CPViewControllerCachedCibs; If you create your views manually, you must override this method and use it to create your view and assign it to the view property. The default - implementation for programmatic views is to create a plain view. You can - invoke super to utilize this view. + implementation for programmatic views is to create a plain, zero width & height + view. You can invoke super to utilize this view. - If you use Interface Builder to create your views, you initialize the view - using the initWithCibName:bundle: method then you must not override this - method. The consequences risk shattering the space-time continuum. + If you use Interface Builder to create your views, and you initialize the + controller using the initWithCibName:bundle: methods, then you MUST NOT override + this method. The consequences risk shattering the space-time continuum. Note: The cib loading system is currently synchronous. */ @@ -150,17 +152,22 @@ var CPViewControllerCachedCibs; if (_view) return; - // check if a cib is already cached for the current _cibName - var cib = [CPViewControllerCachedCibs objectForKey:_cibName]; - - if (!cib) + if (_cibName) { - // if the cib isn't cached yet : fetch it and cache it - cib = [[CPCib alloc] initWithContentsOfURL:[_cibBundle pathForResource:_cibName + @".cib"]]; - [CPViewControllerCachedCibs setObject:cib forKey:_cibName]; - } + // check if a cib is already cached for the current _cibName + var cib = [CPViewControllerCachedCibs objectForKey:_cibName]; - [cib instantiateCibWithExternalNameTable:_cibExternalNameTable]; + if (!cib) + { + // if the cib isn't cached yet : fetch it and cache it + cib = [[CPCib alloc] initWithCibNamed:_cibName bundle:_cibBundle]; + [CPViewControllerCachedCibs setObject:cib forKey:_cibName]; + } + + [cib instantiateCibWithExternalNameTable:_cibExternalNameTable]; + } + else + _view = [CPView new]; } /*! @@ -199,6 +206,11 @@ var CPViewControllerCachedCibs; _isLoading = NO; [self viewDidLoad]; } + else if (_isLazy) + { + _isLazy = NO; + [self viewDidLoad]; + } return _view; } @@ -208,9 +220,9 @@ var CPViewControllerCachedCibs; This method is called after the view controller has loaded its associated views into memory. This method is called regardless of whether the views were stored in a nib - file or created programmatically in the loadView method. This method is - most commonly used to perform additional initialization steps on views - that are loaded from cib files. + file or created programmatically in the loadView method, but NOT when setView + is invoked. This method is most commonly used to perform additional initialization + steps on views that are loaded from cib files. */ - (void)viewDidLoad { @@ -228,13 +240,7 @@ var CPViewControllerCachedCibs; */ - (void)setView:(CPView)aView { - var viewWasLoaded = !_view; - _view = aView; - - // Make sure the viewDidLoad method is called if the view is set directly - if (!_isLoading && viewWasLoaded) - [self viewDidLoad]; } @end @@ -266,6 +272,7 @@ var CPViewControllerViewKey = @"CPViewControllerViewKey", _cibBundle = bundlePath ? [CPBundle bundleWithPath:bundlePath] : [CPBundle mainBundle]; _cibExternalNameTable = [CPDictionary dictionaryWithObject:self forKey:CPCibOwner]; + _isLazy = YES; } return self; diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 3d6e79dda..be1c11a64 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -455,6 +455,7 @@ CPTexturedBackgroundWindowMask if (aStyleMask & CPBorderlessBridgeWindowMask) [self setFullPlatformWindow:YES]; + _autorecalculatesKeyViewLoop = NO; _defaultButtonEnabled = YES; _keyViewLoopIsDirty = YES; @@ -515,6 +516,11 @@ CPTexturedBackgroundWindowMask - (void)awakeFromCib { _keyViewLoopIsDirty = ![self _hasKeyViewLoop]; + + // If no key view loop has been specified by hand, and we are not intending to auto recalculate, + // set up a default key view loop. + if (_keyViewLoopIsDirty && ![self autorecalculatesKeyViewLoop]) + [self recalculateKeyViewLoop]; } - (void)_setWindowView:(CPView)aWindowView @@ -1296,6 +1302,34 @@ CPTexturedBackgroundWindowMask _initialFirstResponder = aView; } +- (void)_setupFirstResponder +{ + /* + If: + + - The key loop is dirty + - The key loop does not auto-recalculate + - The first responder is the window + - The initial first responder is the content view + + Then calculate the key view loop and set the first responder + to the first view in the loop, since we should + always have an initial first responder and a key loop by default. + */ + if (_keyViewLoopIsDirty && + !_autorecalculatesKeyViewLoop && + _firstResponder === self && + _initialFirstResponder === [self contentView]) + { + [self recalculateKeyViewLoop]; + + // Make the first key view of the content view the first responder + var firstKeyView = [[self contentView] nextValidKeyView]; + + [self makeFirstResponder:firstKeyView]; + } +} + /*! Attempts to make the \c aResponder the first responder. Before trying to make it the first responder, the receiver will ask the current first responder @@ -1650,6 +1684,8 @@ CPTexturedBackgroundWindowMask if (_firstResponder !== self && [_firstResponder respondsToSelector:@selector(becomeKeyWindow)]) [_firstResponder becomeKeyWindow]; + [self _setupFirstResponder]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPWindowDidBecomeKeyNotification object:self]; @@ -2015,7 +2051,7 @@ CPTexturedBackgroundWindowMask */ - (BOOL)isMainWindow { - return [CPApp mainWindow] == self; + return [CPApp mainWindow] === self; } /*! @@ -2484,10 +2520,7 @@ CPTexturedBackgroundWindowMask [views sortUsingFunction:keyViewComparator context:nil]; - var index = 0, - count = [views count]; - - for (; index < count; ++index) + for (var index = 0, count = [views count]; index < count; ++index) [views[index] setNextKeyView:views[(index + 1) % count]]; _keyViewLoopIsDirty = NO; @@ -2500,9 +2533,7 @@ CPTexturedBackgroundWindowMask _autorecalculatesKeyViewLoop = shouldRecalculate; - if (_keyViewLoopIsDirty) - [self recalculateKeyViewLoop]; - else if (_autorecalculatesKeyViewLoop) + if (_autorecalculatesKeyViewLoop) [self _dirtyKeyViewLoop]; } @@ -2668,8 +2699,7 @@ var allViews = function(aWindow) [views addObjectsFromArray:[[aWindow contentView] subviews]]; - var index = 0; - for (; index < views.length; ++index) + for (var index = 0; index < views.length; ++index) views = views.concat([views[index] subviews]); return views; @@ -2790,7 +2820,7 @@ var keyViewComparator = function(lhs, rhs, context) - (CGPoint)convertBaseToPlatformWindow:(CGPoint)aPoint { if ([self _sharesChromeWithPlatformWindow]) - return aPoint; + return _CGPointMakeCopy(aPoint); var origin = [self frame].origin; @@ -2798,12 +2828,12 @@ var keyViewComparator = function(lhs, rhs, context) } /*! - Converts aPoint from the parent platform window coordinate system to the windows coordinate system. + Converts aPoint from the parent platform window coordinate system to the window's coordinate system. */ - (CGPoint)convertPlatformWindowToBase:(CGPoint)aPoint { if ([self _sharesChromeWithPlatformWindow]) - return aPoint; + return _CGPointMakeCopy(aPoint); var origin = [self frame].origin; diff --git a/AppKit/CPWindow/_CPAttachedWindowView.j b/AppKit/CPWindow/_CPAttachedWindowView.j index 7ab660aab..315c5ef96 100644 --- a/AppKit/CPWindow/_CPAttachedWindowView.j +++ b/AppKit/CPWindow/_CPAttachedWindowView.j @@ -22,21 +22,28 @@ @import "_CPWindowView.j" +#define ALIGN_STROKE(point) (FLOOR(point) === (point) ? (point) + halfStrokeWidth : (point)) +#define ALIGN_COORD(point) (FLOOR(point)) + +var _CPAttachedWindowViewDefaultCursorSize = CGSizeMake(16, 10), + _CPAttachedWindowViewRadius = 5.0, + _CPAttachedWindowViewStrokeWidth = 1.0, + _CPAttachedWindowViewShadowSize = CGSizeMake(0, 6), + _CPAttachedWindowViewShadowBlur = 15.0; /*! @ignore - A custom CPWindowView that manage border and cursor + A custom CPWindowView that manages a border and cursor */ @implementation _CPAttachedWindowView : _CPWindowView { - BOOL _mouseDownPressed @accessors(getter=isMouseDownPressed, setter=setMouseDownPressed:); - float _arrowOffsetX @accessors(property=arrowOffsetX); - float _arrowOffsetY @accessors(property=arrowOffsetY); - int _appearance @accessors(property=appearance); - unsigned _preferredEdge @accessors(property=preferredEdge); + float _arrowOffsetX @accessors(property=arrowOffsetX); + float _arrowOffsetY @accessors(property=arrowOffsetY); + int _appearance @accessors(property=appearance); + unsigned _preferredEdge @accessors(property=preferredEdge); - CPSize _cursorSize; + CGSize _cursorSize; } /*! @@ -81,18 +88,14 @@ /*! Initialize the _CPWindowView */ -- (id)initWithFrame:(CPRect)aFrame styleMask:(unsigned)aStyleMask +- (id)initWithFrame:(CGRect)aFrame styleMask:(unsigned)aStyleMask { if (self = [super initWithFrame:aFrame styleMask:aStyleMask]) { - var bundle = [CPBundle bundleForClass:[self class]]; _arrowOffsetX = 0.0; _arrowOffsetY = 0.0; - - // @TODO: make this themable - _useGlowingEffect = YES; _appearance = CPPopoverAppearanceMinimal; - _cursorSize = CPSizeMake(15, 10); + _cursorSize = CGSizeMakeCopy(_CPAttachedWindowViewDefaultCursorSize); } return self; @@ -103,7 +106,7 @@ */ - (void)hideCursor { - _cursorSize = CPSizeMakeZero(); + _cursorSize = CGSizeMakeZero(); [self setNeedsDisplay:YES]; } @@ -112,9 +115,8 @@ */ - (void)showCursor { - _cursorSize = CPSizeMake(15, 10); + _cursorSize = CGSizeMakeCopy(_CPAttachedWindowViewDefaultCursorSize); [self setNeedsDisplay:YES]; - _mouseDownPressed = NO; } /*! @@ -125,176 +127,261 @@ [super drawRect:aRect]; var context = [[CPGraphicsContext currentContext] graphicsPort], - radius = 5, + radius = _CPAttachedWindowViewRadius, arrowWidth = _cursorSize.width, arrowHeight = _cursorSize.height, - strokeWidth = 1, + strokeWidth = _CPAttachedWindowViewStrokeWidth, + halfStrokeWidth = strokeWidth / 2.0, strokeColor, shadowColor = [[CPColor blackColor] colorWithAlphaComponent:.2], - shadowSize = CGSizeMake(0, 7), - shadowBlur = 15, - gradient; + shadowSize = _CPAttachedWindowViewShadowSize, + shadowBlur = _CPAttachedWindowViewShadowBlur, + gradient, + frame = [self bounds]; if (_appearance == CPPopoverAppearanceMinimal) { - gradient = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [(254.0 / 255), (254.0 / 255), (254.0 / 255), 0.93, - (231.0 / 255), (231.0 / 255), (231.0 / 255), 0.93], [0,1], 2); + gradient = CGGradientCreateWithColorComponents( + CGColorSpaceCreateDeviceRGB(), + [ + (254.0 / 255), (254.0 / 255), (254.0 / 255), 0.93, + (231.0 / 255), (231.0 / 255), (231.0 / 255), 0.93 + ], + [0, 1], + 2 + ); strokeColor = [CPColor colorWithHexString:@"B8B8B8"]; } else { - gradient = CGGradientCreateWithColorComponents(CGColorSpaceCreateDeviceRGB(), [(38.0 / 255), (38.0 / 255), (38.0 / 255), 0.93, - (18.0 / 255), (18.0 / 255), (18.0 / 255), 0.93], [0,1], 2); + gradient = CGGradientCreateWithColorComponents( + CGColorSpaceCreateDeviceRGB(), + [ + (38.0 / 255), (38.0 / 255), (38.0 / 255), 0.93, + (18.0 / 255), (18.0 / 255), (18.0 / 255), 0.93 + ], + [0, 1], + 2); strokeColor = [CPColor colorWithHexString:@"222222"]; } // fix rect to take care of stroke and shadow - aRect.origin.x += strokeWidth + shadowBlur; - aRect.origin.y += strokeWidth + (shadowBlur + shadowSize.height / 2); - aRect.size.width -= (strokeWidth * 2) + (shadowBlur * 2); - aRect.size.height -= (strokeWidth * 2) + (shadowBlur * 2 + shadowSize.height); + frame.origin.x += halfStrokeWidth + shadowBlur; + frame.origin.y += halfStrokeWidth + (shadowBlur + shadowSize.height / 2); + frame.size.width -= strokeWidth + (shadowBlur * 2); + frame.size.height -= strokeWidth + (shadowBlur * 2 + shadowSize.height); CGContextSetStrokeColor(context, strokeColor); CGContextSetLineWidth(context, strokeWidth); CGContextBeginPath(context); CGContextSetShadowWithColor(context, shadowSize, shadowBlur, shadowColor); - CGContextDrawLinearGradient(context, gradient, CGPointMake(CPRectGetMidX(aRect), 0.0), CGPointMake(CPRectGetMidX(aRect), aRect.size.height), 0); + CGContextDrawLinearGradient(context, gradient, CGPointMake(CGRectGetMidX(frame), 0.0), CGPointMake(CGRectGetMidX(frame), frame.size.height), 0); - - var xMin = _CGRectGetMinX(aRect), - xMax = _CGRectGetMaxX(aRect), - yMin = _CGRectGetMinY(aRect), - yMax = _CGRectGetMaxY(aRect); + var xMin = _CGRectGetMinX(frame), + xMax = _CGRectGetMaxX(frame), + yMin = _CGRectGetMinY(frame), + yMax = _CGRectGetMaxY(frame), + arrowMinX = ALIGN_COORD(xMin + radius + strokeWidth), + arrowMaxX = ALIGN_COORD(xMax - radius - strokeWidth), + arrowMinY = ALIGN_COORD(yMin + radius + strokeWidth), + arrowMaxY = ALIGN_COORD(yMax - radius + strokeWidth), + arrowAnchor = CGPointMakeZero(), + arrowStart = CGPointMakeZero(), + pt = CGPointMakeZero(); // draw! switch (_preferredEdge) { case CPMinXEdge: - // origin ne - CGContextMoveToPoint(context, xMin + radius, yMin); - - // ne - CGContextAddLineToPoint(context, xMax - radius, yMin); - CGContextAddCurveToPoint(context, xMax - radius, yMin, xMax, yMin, xMax, yMin + radius); - - // arrow CPMinXEdge - CGContextAddLineToPoint(context, xMax, (aRect.size.height / 2) + aRect.origin.y + _arrowOffsetY - (arrowHeight - 2)); - CGContextAddLineToPoint(context, aRect.size.width + arrowHeight + aRect.origin.x + _arrowOffsetX, (aRect.size.height / 2) + aRect.origin.y + _arrowOffsetY); - CGContextAddLineToPoint(context, aRect.size.width + aRect.origin.x + _arrowOffsetX, (aRect.size.height / 2 + (arrowWidth / 2)) + aRect.origin.y + _arrowOffsetY); - - // se - CGContextAddLineToPoint(context, xMax, yMax - radius); - CGContextAddCurveToPoint(context, xMax, yMax - radius, xMax, yMax, xMax - radius, yMax); - - // sw - CGContextAddLineToPoint(context, xMin + radius, yMax); - CGContextAddCurveToPoint(context, xMin + radius, yMax, xMin, yMax, xMin, yMax - radius); - - // nw - CGContextAddLineToPoint(context, xMin, yMin + radius); - CGContextAddCurveToPoint(context, xMin, yMin + radius, xMin, yMin, xMin + radius, yMin); - break; - case CPMaxXEdge: - // origin ne - CGContextMoveToPoint(context, xMin + radius, yMin); + // origin nw + pt.x = ALIGN_COORD(xMin + radius); + pt.y = yMin; + CGContextMoveToPoint(context, pt.x, pt.y); // ne - CGContextAddLineToPoint(context, xMax - radius, yMin); - CGContextAddCurveToPoint(context, xMax - radius, yMin, xMax, yMin, xMax, yMin + radius); + pt.x = ALIGN_COORD(xMax - radius); + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, xMax, yMin, xMax, ALIGN_COORD(yMin + radius)); + + if (_preferredEdge === CPMinXEdge) + { + // arrow CPMinXEdge + arrowAnchor.x = ALIGN_STROKE(xMax); + arrowAnchor.y = ALIGN_COORD((frame.size.height / 2) + yMin + _arrowOffsetY); + + // to top edge + pt.y = ALIGN_COORD(arrowAnchor.y - (arrowWidth / 2)); + + // adjust starting point to not go beyond the corner + if (pt.y <= arrowMinY) + pt.y = arrowMinY; + else if ((pt.y + arrowWidth) > arrowMaxY) + pt.y = arrowMaxY - arrowWidth; + + pt.x = arrowAnchor.x; + arrowStart = CGPointMakeCopy(pt); + CGContextAddLineToPoint(context, pt.x, pt.y); + + // top edge -> point + pt.x = ALIGN_STROKE(arrowAnchor.x + arrowHeight); + pt.y = arrowAnchor.y; + CGContextAddLineToPoint(context, pt.x, pt.y); + + // point -> bottom edge + pt.x = arrowAnchor.x; + pt.y = ALIGN_COORD(arrowStart.y + arrowWidth); + CGContextAddLineToPoint(context, pt.x, pt.y); + } // se - CGContextAddLineToPoint(context, xMax, yMax - radius); - CGContextAddCurveToPoint(context, xMax, yMax - radius, xMax, yMax, xMax - radius, yMax); + pt.x = xMax; + pt.y = ALIGN_COORD(yMax - radius); + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, pt.x, yMax, ALIGN_COORD(xMax - radius), yMax); // sw - CGContextAddLineToPoint(context, xMin + radius, yMax); - CGContextAddCurveToPoint(context, xMin + radius, yMax, xMin, yMax, xMin, yMax - radius); + pt.x = ALIGN_COORD(xMin + radius); + pt.y = yMax; + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, xMin, pt.y, xMin, ALIGN_COORD(yMax - radius)); - // arrow CPMaxXEdge - CGContextAddLineToPoint(context, xMin, (aRect.size.height / 2 + (arrowWidth / 2) + aRect.origin.y + _arrowOffsetY)); - CGContextAddLineToPoint(context, aRect.origin.x - arrowHeight + _arrowOffsetX, (aRect.size.height / 2) + aRect.origin.y + _arrowOffsetY); - CGContextAddLineToPoint(context, aRect.origin.x + _arrowOffsetX, (aRect.size.height / 2 - (arrowWidth / 2) + aRect.origin.y + _arrowOffsetY)); + if (_preferredEdge === CPMaxXEdge) + { + // arrow CPMaxXEdge + arrowAnchor.x = ALIGN_STROKE(xMin); + arrowAnchor.y = ALIGN_COORD((frame.size.height / 2) + yMin + _arrowOffsetY); + + // to bottom edge + pt.y = ALIGN_COORD(arrowAnchor.y + (arrowWidth / 2)); + + // adjust starting point to not go beyond the corner + if ((pt.y - arrowWidth) < arrowMinY) + pt.y = arrowMinY + arrowWidth; + else if (pt.y > arrowMaxY) + pt.y = arrowMaxY; + + pt.x = arrowAnchor.x; + arrowStart = CGPointMakeCopy(pt); + CGContextAddLineToPoint(context, pt.x, pt.y); + + // bottom edge -> point + pt.x = ALIGN_STROKE(arrowAnchor.x - arrowHeight); + pt.y = arrowAnchor.y; + CGContextAddLineToPoint(context, pt.x, pt.y); + + // point -> top edge + pt.x = arrowAnchor.x; + pt.y = ALIGN_COORD(arrowStart.y - arrowWidth); + CGContextAddLineToPoint(context, pt.x, pt.y); + } // nw - CGContextAddLineToPoint(context, xMin, yMin + radius); - CGContextAddCurveToPoint(context, xMin, yMin + radius, xMin, yMin, xMin + radius, yMin); + pt.x = xMin; + pt.y = ALIGN_COORD(yMin + radius); + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, pt.x, yMin, ALIGN_COORD(xMin + radius), yMin); break; case CPMaxYEdge: - // origin nw - CGContextMoveToPoint(context, xMin, yMin + yMin); - - // nw - CGContextAddLineToPoint(context, xMin, yMin + radius); - CGContextAddCurveToPoint(context, xMin, yMin + radius, xMin, yMin, xMin + radius, yMin); - - // arrow CPMaxYEdge - CGContextAddLineToPoint(context, (aRect.size.width / 2) + aRect.origin.x + _arrowOffsetX - (arrowWidth / 2), yMin); - CGContextAddLineToPoint(context, (aRect.size.width / 2) + aRect.origin.x + _arrowOffsetX, aRect.origin.y - arrowHeight + _arrowOffsetY); - CGContextAddLineToPoint(context, (aRect.size.width / 2) + (arrowWidth / 2) + aRect.origin.x + _arrowOffsetX, aRect.origin.y + _arrowOffsetY); - - // ne - CGContextAddLineToPoint(context, xMax - radius, yMin); - CGContextAddCurveToPoint(context, xMax - radius, yMin, xMax, yMin, xMax, yMin + radius); - - // se - CGContextAddLineToPoint(context, xMax, yMax - radius); - CGContextAddCurveToPoint(context, xMax, yMax - radius, xMax, yMax, xMax - radius, yMax); - - // sw - CGContextAddLineToPoint(context, xMin + radius, yMax); - CGContextAddCurveToPoint(context, xMin + radius, yMax, xMin, yMax, xMin, yMax - radius); - break; - case CPMinYEdge: - // origin nw - CGContextMoveToPoint(context, xMin, yMin + yMin); + // origin sw + pt.x = xMin; + pt.y = ALIGN_COORD(yMax - radius); + CGContextMoveToPoint(context, pt.x, pt.y); // nw - CGContextAddLineToPoint(context, xMin, yMin + radius); - CGContextAddCurveToPoint(context, xMin, yMin + radius, xMin, yMin, xMin + radius, yMin); + pt.y = ALIGN_COORD(yMin + radius); + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, pt.x, yMin, ALIGN_COORD(xMin + radius), yMin); + + if (_preferredEdge === CPMaxYEdge) + { + // arrow CPMaxYEdge + arrowAnchor.x = ALIGN_COORD((frame.size.width / 2) + xMin + _arrowOffsetX); + arrowAnchor.y = ALIGN_STROKE(yMin + _arrowOffsetY); + + // to left edge + pt.x = ALIGN_COORD(arrowAnchor.x - (arrowWidth / 2)); + + // adjust starting point to not go beyond the corner + if (pt.x < arrowMinX) + pt.x = arrowMinX; + else if ((pt.x + arrowWidth) > arrowMaxX) + pt.x = arrowMaxX - arrowWidth; + + pt.y = arrowAnchor.y; + arrowStart = CGPointMakeCopy(pt); + CGContextAddLineToPoint(context, pt.x, pt.y); + + // left edge -> point + pt.x = arrowAnchor.x; + pt.y = ALIGN_STROKE(arrowAnchor.y - arrowHeight); + CGContextAddLineToPoint(context, pt.x, pt.y); + + // point -> right edge + pt.x = ALIGN_COORD(arrowStart.x + arrowWidth); + pt.y = arrowAnchor.y; + CGContextAddLineToPoint(context, pt.x, pt.y); + } // ne - CGContextAddLineToPoint(context, xMax - radius, yMin); - CGContextAddCurveToPoint(context, xMax - radius, yMin, xMax, yMin, xMax, yMin + radius); + pt.x = ALIGN_COORD(xMax - radius); + pt.y = yMin; + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, xMax, pt.y, xMax, ALIGN_COORD(yMin + radius)); // se - CGContextAddLineToPoint(context, xMax, yMax - radius); - CGContextAddCurveToPoint(context, xMax, yMax - radius, xMax, yMax, xMax - radius, yMax); + pt.x = xMax; + pt.y = ALIGN_COORD(yMax - radius); + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, pt.x, yMax, ALIGN_COORD(xMax - radius), yMax); - // arrow CPMinYEdge - CGContextAddLineToPoint(context, (aRect.size.width / 2) + (arrowWidth / 2) + aRect.origin.x + _arrowOffsetX , yMax); - CGContextAddLineToPoint(context, (aRect.size.width / 2) + aRect.origin.x + _arrowOffsetX, aRect.size.height + aRect.origin.y + arrowHeight + _arrowOffsetY); - CGContextAddLineToPoint(context, (aRect.size.width / 2) - (arrowWidth / 2) + aRect.origin.x + _arrowOffsetX, aRect.size.height + aRect.origin.y + _arrowOffsetY); + if (_preferredEdge === CPMinYEdge) + { + // arrow CPMinYEdge + arrowAnchor.x = ALIGN_COORD((frame.size.width / 2) + xMin + _arrowOffsetX); + arrowAnchor.y = ALIGN_STROKE(yMax + _arrowOffsetY); + + // to right edge + pt.x = ALIGN_COORD(arrowAnchor.x + (arrowWidth / 2)); + + // adjust starting point to not go beyond the corner + if ((pt.x - arrowWidth) < arrowMinX) + pt.x = arrowMinX + arrowWidth; + else if (pt.x > arrowMaxX) + pt.x = arrowMaxX; + + pt.y = arrowAnchor.y; + arrowStart = CGPointMakeCopy(pt); + CGContextAddLineToPoint(context, pt.x, pt.y); + + // right edge -> point + pt.x = arrowAnchor.x; + pt.y = ALIGN_STROKE(arrowAnchor.y + arrowHeight); + CGContextAddLineToPoint(context, pt.x, pt.y); + + // point -> left edge + pt.x = ALIGN_COORD(arrowStart.x - arrowWidth); + pt.y = arrowAnchor.y; + CGContextAddLineToPoint(context, pt.x, pt.y); + } // sw - CGContextAddLineToPoint(context, xMin + radius, yMax); - CGContextAddCurveToPoint(context, xMin + radius, yMax, xMin, yMax, xMin, yMax - radius); + pt.x = ALIGN_COORD(xMin + radius); + pt.y = yMax; + CGContextAddLineToPoint(context, pt.x, pt.y); + CGContextAddCurveToPoint(context, pt.x, pt.y, xMin, pt.y, xMin, ALIGN_COORD(yMax - radius)); break; default: // no computed edge means standard rounded rect - CGContextAddPath(context, CGPathWithRoundedRectangleInRect(aRect, radius, radius, YES, YES, YES, YES)); + CGContextAddPath(context, CGPathWithRoundedRectangleInRect(frame, radius, radius, YES, YES, YES, YES)); } CGContextClosePath(context); - - //Draw it CGContextStrokePath(context); CGContextFillPath(context); } -- (void)mouseDown:(CPEvent)anEvent -{ - _mouseDownPressed = YES; - [super mouseDown:anEvent]; -} - -- (void)mouseUp:(CPEvent)anEvent -{ - _mouseDownPressed = NO; - [super mouseUp:anEvent]; -} - @end diff --git a/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j b/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j index 26293bf4b..24faf9ba8 100644 --- a/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j +++ b/AppKit/CPWindow/_CPBorderlessBridgeWindowView.j @@ -33,7 +33,14 @@ var _CPToolbarViewBackgroundColor = nil; + (CPColor)toolbarBackgroundColor { if (!_CPToolbarViewBackgroundColor) - _CPToolbarViewBackgroundColor = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[_CPBorderlessBridgeWindowView class]] pathForResource:@"_CPToolbarView/_CPToolbarViewBackground.png"] size:CGSizeMake(1.0, 59.0)]]; + { + var bundle = [CPBundle bundleForClass:[_CPBorderlessBridgeWindowView class]]; + _CPToolbarViewBackgroundColor = CPColorWithImages([ + ["_CPToolbarView/toolbar-background-top.png", 1, 1, bundle], + ["_CPToolbarView/toolbar-background-center.png", 1, 57.0, bundle], + ["_CPToolbarView/toolbar-background-bottom.png", 1, 1, bundle], + ], CPColorPatternIsVertical); + } return _CPToolbarViewBackgroundColor; } diff --git a/AppKit/CPWindow/_CPHUDWindowView.j b/AppKit/CPWindow/_CPHUDWindowView.j index 1f3a391bf..b668e865f 100644 --- a/AppKit/CPWindow/_CPHUDWindowView.j +++ b/AppKit/CPWindow/_CPHUDWindowView.j @@ -105,7 +105,7 @@ var HUD_TITLEBAR_HEIGHT = 26.0; if ([[[self window] toolbar] isVisible]) { - toolbarHeight = CGRectGetHeight([[self toolbarView] frame]); + var toolbarHeight = CGRectGetHeight([[self toolbarView] frame]); frameRect.origin.y -= toolbarHeight; frameRect.size.height += toolbarHeight; diff --git a/AppKit/CPWindow/_CPStandardWindowView.j b/AppKit/CPWindow/_CPStandardWindowView.j index 03c44a6c0..47cf61ddb 100644 --- a/AppKit/CPWindow/_CPStandardWindowView.j +++ b/AppKit/CPWindow/_CPStandardWindowView.j @@ -197,7 +197,7 @@ var STANDARD_GRADIENT_HEIGHT = 41.0, if ([theToolbar isVisible]) { - toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); + var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); frameRect.origin.y -= toolbarHeight; frameRect.size.height += toolbarHeight; diff --git a/AppKit/CPWorkspace.j b/AppKit/CPWorkspace.j new file mode 100644 index 000000000..9f40622bd --- /dev/null +++ b/AppKit/CPWorkspace.j @@ -0,0 +1,56 @@ +/* + * CPWorkspace.j + * AppKit + * + * Created by Alexander Ljungberg. + * Copyright 2012, SlevenBits Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +@import + +var SharedWorkspace = nil; + + +@implementation CPWorkspace : CPObject +{ + +} + ++ (CPWorkspace)sharedWorkspace +{ + if (!SharedWorkspace) + SharedWorkspace = [CPWorkspace new]; + + return SharedWorkspace; +} + +- (BOOL)openFile:(CPString)fullPath +{ + var url = [CPURL URLWithString:fullPath]; + return [self openURL:url]; +} + +- (BOOL)openURL:(CPURL)url +{ + if (!url || ![url absoluteURL]) + return NO; + window.open([url absoluteURL]); + return YES; +} + +@end diff --git a/AppKit/Cib/CPCib.j b/AppKit/Cib/CPCib.j index 8e85a012b..7277e8bca 100644 --- a/AppKit/Cib/CPCib.j +++ b/AppKit/Cib/CPCib.j @@ -137,7 +137,7 @@ var CPCibObjectDataKey = @"CPCibObjectDataKey"; var key = nil, keyEnumerator = [replacementClasses keyEnumerator]; - while (key = [keyEnumerator nextObject]) + while ((key = [keyEnumerator nextObject]) !== nil) [unarchiver setClass:[replacementClasses objectForKey:key] forClassName:key]; } diff --git a/AppKit/Cib/CPCibHelpConnector.j b/AppKit/Cib/CPCibHelpConnector.j new file mode 100644 index 000000000..8049abda9 --- /dev/null +++ b/AppKit/Cib/CPCibHelpConnector.j @@ -0,0 +1,59 @@ +/* + * CPCibHelpConnector.j + * AppKit + * + * Created by Antoine Mercadal. + * Copyright 2012, The Cappuccino Project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@import "CPCibConnector.j" + +@implementation CPCibHelpConnector : CPCibConnector +{ + id _destination; + id _file; + id _marker; +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + if (self = [super initWithCoder:aCoder]) + { + _destination = [aCoder decodeObjectForKey:@"_destination"]; + _file = [aCoder decodeObjectForKey:@"_file"]; + _marker = [aCoder decodeObjectForKey:@"_marker"]; + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [super encodeWithCoder:aCoder]; + + [aCoder encodeObject:_destination forKey:@"_destination"]; + [aCoder encodeObject:_file forKey:@"_file"]; + [aCoder encodeObject:_marker forKey:@"_marker"]; +} + +- (void)establishConnection +{ + [_destination setToolTip:_marker]; +} + +@end + diff --git a/AppKit/Cib/CPCibRuntimeAttributesConnector.j b/AppKit/Cib/CPCibRuntimeAttributesConnector.j new file mode 100644 index 000000000..ed7b736e6 --- /dev/null +++ b/AppKit/Cib/CPCibRuntimeAttributesConnector.j @@ -0,0 +1,64 @@ +/* + * CPCibRuntimeAttributesConnector.j + * AppKit + * + * Created by Aparajita Fishman. + * Copyright 2012, The Cappuccino Project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@import "CPCibConnector.j" + +var CPCibRuntimeAttributesConnectorObjectKey = @"CPCibRuntimeAttributesConnectorObjectKey", + CPCibRuntimeAttributesConnectorKeyPathsKey = @"CPCibRuntimeAttributesConnectorKeyPathsKey", + CPCibRuntimeAttributesConnectorValuesKey = @"CPCibRuntimeAttributesConnectorValuesKey"; + +@implementation CPCibRuntimeAttributesConnector : CPCibConnector +{ + id _keyPaths; + id _values; +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + if (self = [super initWithCoder:aCoder]) + { + _source = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorObjectKey]; + _keyPaths = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorKeyPathsKey]; + _values = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorValuesKey]; + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [super encodeWithCoder:aCoder]; + + [aCoder encodeObject:_source forKey:CPCibRuntimeAttributesConnectorObjectKey]; + [aCoder encodeObject:_keyPaths forKey:CPCibRuntimeAttributesConnectorKeyPathsKey]; + [aCoder encodeObject:_values forKey:CPCibRuntimeAttributesConnectorValuesKey]; +} + +- (void)establishConnection +{ + var count = [_keyPaths count]; + + while (count--) + [_source setValue:_values[count] forKeyPath:_keyPaths[count]]; +} + +@end diff --git a/AppKit/Cib/_CPCibClassSwapper.j b/AppKit/Cib/_CPCibClassSwapper.j index 8e1c133df..0d432a313 100644 --- a/AppKit/Cib/_CPCibClassSwapper.j +++ b/AppKit/Cib/_CPCibClassSwapper.j @@ -61,14 +61,14 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey", if (!object) { - CPLog.error("Unable to find class " + theClassName + " in cib file."); + CPLog.error("Unable to find class " + theClassName + " referenced in cib file."); object = [self allocObjectWithCoder:aCoder className:[aCoder decodeObjectForKey:_CPCibClassSwapperOriginalClassNameKey]]; } } if (!object) - [CPException raise:CPInvalidArgumentException reason:@"Unable to find class " + theClassName + " in cib file."]; + [CPException raise:CPInvalidArgumentException reason:@"Unable to find class " + theClassName + " referenced in cib file."]; return object; } diff --git a/AppKit/Cib/_CPCibCustomResource.j b/AppKit/Cib/_CPCibCustomResource.j index 3daf2f0bd..a1dc2c703 100644 --- a/AppKit/Cib/_CPCibCustomResource.j +++ b/AppKit/Cib/_CPCibCustomResource.j @@ -43,6 +43,11 @@ var _CPCibCustomResourceClassNameKey = @"_CPCibCustomResourceClassNameKey", return [[self alloc] initWithClassName:@"CPImage" resourceName:aResourceName properties:[CPDictionary dictionaryWithObject:aSize forKey:@"size"]]; } ++ (id)imageResourceWithName:(CPString)aResourceName size:(CGSize)aSize bundleClass:(CPString)aBundleClass +{ + return [[self alloc] initWithClassName:@"CPImage" resourceName:aResourceName properties:[CPDictionary dictionaryWithObjects:[aSize, aBundleClass] forKeys:[@"size", @"bundleClass"]]]; +} + - (id)initWithClassName:(CPString)aClassName resourceName:(CPString)aResourceName properties:(CPDictionary)properties { self = [super init]; @@ -89,12 +94,32 @@ var _CPCibCustomResourceClassNameKey = @"_CPCibCustomResourceClassNameKey", else if (_resourceName == "CPRemoveTemplate") return [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPButtonBar class]] pathForResource:@"minus_button.png"] size:CGSizeMake(11, 4)]; - return [[CPImage alloc] initWithContentsOfFile:[[aCoder bundle] pathForResource:_resourceName] size:_properties.valueForKey(@"size")]; + return [self imageFromBundle:[aCoder bundle]]; } return self; } +- (CPImage)imageFromBundle:(CPBundle)aBundle +{ + if (!aBundle) + { + var bundleClass = _properties.valueForKey(@"bundleClass"); + + if (bundleClass) + { + bundleClass = CPClassFromString(bundleClass); + + if (bundleClass) + aBundle = [CPBundle bundleForClass:bundleClass]; + } + else + aBundle = [CPBundle mainBundle]; + } + + return [[CPImage alloc] initWithContentsOfFile:[aBundle pathForResource:_resourceName] size:_properties.valueForKey(@"size")]; +} + @end @implementation _CPCibCustomResource (CPImage) @@ -129,4 +154,11 @@ var _CPCibCustomResourceClassNameKey = @"_CPCibCustomResourceClassNameKey", return nil; } +- (CPString)description +{ + var image = [self imageFromBundle:nil]; + + return [image description]; +} + @end diff --git a/AppKit/Cib/_CPCibObjectData.j b/AppKit/Cib/_CPCibObjectData.j index 22e511592..2d1eecf95 100644 --- a/AppKit/Cib/_CPCibObjectData.j +++ b/AppKit/Cib/_CPCibObjectData.j @@ -29,6 +29,8 @@ @import "CPCibControlConnector.j" @import "CPCibOutletConnector.j" @import "CPCibBindingConnector.j" +@import "CPCibRuntimeAttributesConnector.j" +@import "CPCibHelpConnector.j" @implementation _CPCibObjectData : CPObject @@ -106,7 +108,7 @@ var object = nil, objectEnumerator = [_visibleWindows objectEnumerator]; - while (object = [objectEnumerator nextObject]) + while ((object = [objectEnumerator nextObject]) !== nil) [_replacementObjects[[object UID]] makeKeyAndOrderFront:self]; } @@ -232,15 +234,15 @@ var _CPCibObjectDataNamesKeysKey = @"_CPCibObjectDataNamesKeysKey { _replacementObjects[[object UID]] = instantiatedObject; - if ([instantiatedObject isKindOfClass:[CPView class]]) + if ([instantiatedObject isKindOfClass:CPView]) { var clipView = [instantiatedObject superview]; - if ([clipView isKindOfClass:[CPClipView class]]) + if ([clipView isKindOfClass:CPClipView]) { var scrollView = [clipView superview]; - if ([scrollView isKindOfClass:[CPScrollView class]]) + if ([scrollView isKindOfClass:CPScrollView]) [scrollView setDocumentView:instantiatedObject]; } } @@ -257,11 +259,29 @@ var _CPCibObjectDataNamesKeysKey = @"_CPCibObjectDataNamesKeysKey _replacementObjects[[_fileOwner UID]] = anOwner; var index = 0, - count = _connections.length; + count = _connections.length, + runtimeAttributeConnectors = [], + connection = nil; for (; index < count; ++index) { - var connection = _connections[index]; + connection = _connections[index]; + + if ([connection isKindOfClass:CPCibRuntimeAttributesConnector]) + // Defer runtime attribute connections until after all other connections are made + runtimeAttributeConnectors.push(connection); + else + { + [connection replaceObjects:_replacementObjects]; + [connection establishConnection]; + } + } + + count = runtimeAttributeConnectors.length; + + for (index = 0; index < count; ++index) + { + connection = runtimeAttributeConnectors[index]; [connection replaceObjects:_replacementObjects]; [connection establishConnection]; diff --git a/AppKit/Cib/_CPCibWindowTemplate.j b/AppKit/Cib/_CPCibWindowTemplate.j index 808b74154..9ea2b4096 100644 --- a/AppKit/Cib/_CPCibWindowTemplate.j +++ b/AppKit/Cib/_CPCibWindowTemplate.j @@ -77,8 +77,8 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemp _windowTitle = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowTitleKey]; _windowView = [aCoder decodeObjectForKey:_CPCibWindowTemplateWindowViewKey]; - _windowAutorecalculatesKeyViewLoop = !![aCoder decodeObjectForKey:_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop]; - _windowIsFullPlatformWindow = !![aCoder decodeObjectForKey:_CPCibWindowTemplateWindowIsFullPlatformWindowKey]; + _windowAutorecalculatesKeyViewLoop = [aCoder decodeBoolForKey:_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoop]; + _windowIsFullPlatformWindow = [aCoder decodeBoolForKey:_CPCibWindowTemplateWindowIsFullPlatformWindowKey]; } return self; @@ -125,14 +125,13 @@ var _CPCibWindowTemplateMinSizeKey = @"_CPCibWindowTemp - (id)_cibInstantiate { - var windowClass = CPClassFromString([self windowClass]); + var windowClass = CPClassFromString([self windowClass]), + theWindow = [[windowClass alloc] initWithContentRect:_windowRect styleMask:_windowStyleMask]; /* if (!windowClass) [NSException raise:NSInvalidArgumentException format:@"Unable to locate NSWindow class %@, using NSWindow",_windowClass]; class=[NSWindow class];*/ - var theWindow = [[windowClass alloc] initWithContentRect:_windowRect styleMask:_windowStyleMask]; - if (_minSize) [theWindow setMinSize:_minSize]; if (_maxSize) diff --git a/AppKit/CoreGraphics/CGGeometry.j b/AppKit/CoreGraphics/CGGeometry.j index 18029f7f1..ecb0cb4e3 100644 --- a/AppKit/CoreGraphics/CGGeometry.j +++ b/AppKit/CoreGraphics/CGGeometry.j @@ -267,6 +267,32 @@ function CGPointFromEvent(anEvent) return _CGPointMake(anEvent.clientX, anEvent.clientY); } +/*! + Combines two insets by adding their individual elements and returns the result. + + @group CGInset +*/ +function CGInsetUnion(lhsInset, rhsInset) +{ + return _CGInsetMake(lhsInset.top + rhsInset.top, + lhsInset.right + rhsInset.right, + lhsInset.bottom + rhsInset.bottom, + lhsInset.left + rhsInset.left); +} + +/*! + Subtract one inset from another by subtracting their individual elements and returns the result. + + @group CGInset +*/ +function CGInsetDifference(lhsInset, rhsInset) +{ + return _CGInsetMake(lhsInset.top - rhsInset.top, + lhsInset.right - rhsInset.right, + lhsInset.bottom - rhsInset.bottom, + lhsInset.left - rhsInset.left); +} + function CGInsetFromString(aString) { var numbers = aString.substr(1, aString.length - 2).split(','); diff --git a/AppKit/CoreGraphics/CGGradient.j b/AppKit/CoreGraphics/CGGradient.j index 24d0c3573..2635f0514 100644 --- a/AppKit/CoreGraphics/CGGradient.j +++ b/AppKit/CoreGraphics/CGGradient.j @@ -29,16 +29,16 @@ kCGGradientDrawsAfterEndLocation = 1 << 1; function CGGradientCreateWithColorComponents(aColorSpace, components, locations, count) { - if ( locations === undefined || locations === NULL ) + if (locations === undefined || locations === NULL) { var num_of_colors = components.length / 4, locations = []; - for ( var idx = 0; idx < num_of_colors; idx++ ) + for (var idx = 0; idx < num_of_colors; idx++) locations.push( idx / (num_of_colors - 1) ); } - if ( count === undefined || count === NULL) - var count = locations.length; + if (count === undefined || count === NULL) + count = locations.length; var colors = []; diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index 0a1ce85b8..076ec8f12 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -661,7 +661,7 @@ var ModifierKeyCodes = [ - (void)keyEvent:(DOMEvent)aDOMEvent { var event, - timestamp = aDOMEvent.timeStamp || new Date(), + timestamp = [CPEvent currentTimestamp], sourceElement = aDOMEvent.target || aDOMEvent.srcElement, windowNumber = [[CPApp keyWindow] windowNumber], modifierFlags = (aDOMEvent.shiftKey ? CPShiftKeyMask : 0) | @@ -871,11 +871,11 @@ var ModifierKeyCodes = [ { if ([self _validateCopyCutOrPasteEvent:aDOMEvent flags:CPPlatformActionKeyMask] && !_ignoreNativeCopyOrCutEvent) { - //we have to send out a fake copy or cut event so that we can force the copy/cut mechanisms to take place + // we have to send out a fake copy or cut event so that we can force the copy/cut mechanisms to take place var cut = aDOMEvent.type === "beforecut", keyCode = cut ? CPKeyCodes.X : CPKeyCodes.C, characters = cut ? "x" : "c", - timestamp = aDOMEvent.timeStamp ? aDOMEvent.timeStamp : new Date(), + timestamp = [CPEvent currentTimestamp], // fake event, might as well use current timestamp windowNumber = [[CPApp keyWindow] windowNumber], modifierFlags = CPPlatformActionKeyMask; @@ -1008,7 +1008,7 @@ var ModifierKeyCodes = [ var deltaX = 0.0, deltaY = 0.0, windowNumber = 0, - timestamp = aDOMEvent.timeStamp ? aDOMEvent.timeStamp : new Date(), + timestamp = [CPEvent currentTimestamp], modifierFlags = (aDOMEvent.shiftKey ? CPShiftKeyMask : 0) | (aDOMEvent.ctrlKey ? CPControlKeyMask : 0) | (aDOMEvent.altKey ? CPAlternateKeyMask : 0) | @@ -1135,7 +1135,7 @@ var ModifierKeyCodes = [ newEvent.clientX = touch.clientX; newEvent.clientY = touch.clientY; - newEvent.timestamp = aDOMEvent.timestamp; + newEvent.timestamp = [CPEvent currentTimestamp]; newEvent.target = aDOMEvent.target; newEvent.shiftKey = newEvent.ctrlKey = newEvent.altKey = newEvent.metaKey = false; @@ -1179,7 +1179,7 @@ var ModifierKeyCodes = [ var event, location = _CGPointMake(aDOMEvent.clientX, aDOMEvent.clientY), - timestamp = aDOMEvent.timeStamp ? aDOMEvent.timeStamp : new Date(), + timestamp = [CPEvent currentTimestamp], sourceElement = (aDOMEvent.target || aDOMEvent.srcElement), windowNumber = 0, modifierFlags = (aDOMEvent.shiftKey ? CPShiftKeyMask : 0) | @@ -1625,7 +1625,7 @@ function CPWindowObjectList() platformWindow = nil, windowObjects = []; - while (platformWindow = [platformWindowEnumerator nextObject]) + while ((platformWindow = [platformWindowEnumerator nextObject]) !== nil) { var levels = platformWindow._windowLevels, layers = platformWindow._windowLayers, diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif new file mode 100644 index 000000000..e0124ff71 Binary files /dev/null and b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif new file mode 100644 index 000000000..140e850c7 Binary files /dev/null and b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif differ diff --git a/AppKit/Resources/_CPToolbarView/_CPToolbarViewBackground.png b/AppKit/Resources/_CPToolbarView/_CPToolbarViewBackground.png deleted file mode 100644 index 25cfcc484..000000000 Binary files a/AppKit/Resources/_CPToolbarView/_CPToolbarViewBackground.png and /dev/null differ diff --git a/AppKit/Resources/_CPToolbarView/toolbar-background-bottom.png b/AppKit/Resources/_CPToolbarView/toolbar-background-bottom.png new file mode 100644 index 000000000..4dcfb044e Binary files /dev/null and b/AppKit/Resources/_CPToolbarView/toolbar-background-bottom.png differ diff --git a/AppKit/Resources/_CPToolbarView/toolbar-background-center.png b/AppKit/Resources/_CPToolbarView/toolbar-background-center.png new file mode 100644 index 000000000..18e0335f4 Binary files /dev/null and b/AppKit/Resources/_CPToolbarView/toolbar-background-center.png differ diff --git a/AppKit/Resources/_CPToolbarView/toolbar-background-top.png b/AppKit/Resources/_CPToolbarView/toolbar-background-top.png new file mode 100644 index 000000000..a6946f1b2 Binary files /dev/null and b/AppKit/Resources/_CPToolbarView/toolbar-background-top.png differ diff --git a/AppKit/_CPAttachedWindow.j b/AppKit/_CPAttachedWindow.j index f67dba070..8e53162a6 100644 --- a/AppKit/_CPAttachedWindow.j +++ b/AppKit/_CPAttachedWindow.j @@ -38,32 +38,31 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, @ignore This is a simple attached window like the one that pops up - when you double click on a meeting in iCal + when you double click on a meeting in iCal. */ @implementation _CPAttachedWindow : CPWindow { BOOL _animates @accessors(property=animates); id _targetView @accessors(property=targetView); int _appearance @accessors(getter=appearance); + BOOL _isClosing @accessors(property=isClosing); BOOL _closeOnBlur; - BOOL _isClosed; + BOOL _browserAnimates; BOOL _shouldPerformAnimation; - CPButton _closeButton; - float _animationDuration; CPInteger _implementedDelegateMethods; } -/*! - override default windowView class loader - - @param aStyleMask the window mask - @return the windowView class -*/ #pragma mark - #pragma mark Class methods +/*! + Overrides the default windowView class loader. + + @param aStyleMask the window mask + @return the windowView class +*/ + (Class)_windowViewClassForStyleMask:(unsigned)aStyleMask { return _CPAttachedWindowView; @@ -74,7 +73,7 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, #pragma mark Initialization /*! - Create and init a _CPAttachedWindow with given size of and view + Create and init a _CPAttachedWindow with the given size and view. @param aSize the size of the attached window @param aView the target view @@ -82,20 +81,20 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, */ + (id)attachedWindowWithSize:(CGSize)aSize forView:(CPView)aView { - return [_CPAttachedWindow attachedWindowWithSize:aSize forView:aView styleMask:nil]; + return [_CPAttachedWindow attachedWindowWithSize:aSize forView:aView styleMask:0]; } /*! - Create and init a _CPAttachedWindow with given size of and view + Create and init a _CPAttachedWindow with given the size, view and style mask. @param aSize the size of the attached window @param aView the target view - @return ready to use _CPAttachedWindow @param styleMask the window style mask (combine CPClosableWindowMask and CPClosableOnBlurWindowMask) + @return ready to use _CPAttachedWindow */ + (id)attachedWindowWithSize:(CGSize)aSize forView:(CPView)aView styleMask:(int)aMask { - var attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:CPRectMake(0.0, 0.0, aSize.width, aSize.height) styleMask:aMask]; + var attachedWindow = [[_CPAttachedWindow alloc] initWithContentRect:_CGRectMake(0.0, 0.0, aSize.width, aSize.height) styleMask:aMask]; [attachedWindow attachToView:aView]; @@ -103,19 +102,19 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, } /*! - Create and init a _CPAttachedWindow with given frame + Create and init a _CPAttachedWindow with given the given frame. @param aFrame the frame of the attached window @return ready to use _CPAttachedWindow */ - (id)initWithContentRect:(CGRect)aFrame { - self = [self initWithContentRect:aFrame styleMask:nil]; + self = [self initWithContentRect:aFrame styleMask:0]; return self; } /*! - Create and init a _CPAttachedWindow with given frame + Designated initializer. Create and init a _CPAttachedWindow with the given frame and style mask. @param aFrame the frame of the attached window @param styleMask the window style mask (combine CPClosableWindowMask and CPClosableOnBlurWindowMask) @@ -126,19 +125,16 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, if (self = [super initWithContentRect:aFrame styleMask:aStyleMask]) { _animates = YES; - _animates = YES; - _animationDuration = 150; _closeOnBlur = (aStyleMask & CPClosableOnBlurWindowMask); - _isClosed = NO; - _shouldPerformAnimation = _animates; + _isClosing = NO; + _browserAnimates = [self browserSupportsAnimation]; + _shouldPerformAnimation = YES; [self setLevel:CPStatusWindowLevel]; [self setMovableByWindowBackground:YES]; [self setHasShadow:NO]; - _DOMElement.style.WebkitBackfaceVisibility = "hidden"; - _DOMElement.style.WebkitTransitionProperty = "-webkit-transform, opacity"; - _DOMElement.style.WebkitTransitionDuration = _animationDuration + "ms"; + [self setCSS3Property:@"TransitionProperty" value:@"-webkit-transform, opacity"]; [_windowView setNeedsDisplay:YES]; } @@ -151,15 +147,20 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, - (void)setAppearance:(int)anAppearance { - if (_appearance == anAppearance) + if (_appearance === anAppearance) return; [_windowView setAppearance:anAppearance]; } +- (void)setStyleMask:(unsigned)aStyleMask +{ + _closeOnBlur = (aStyleMask & CPClosableOnBlurWindowMask); +} + - (void)setDelegate:(id)aDelegate { - if (_delegate == aDelegate) + if (_delegate === aDelegate) return; _delegate = aDelegate; @@ -176,33 +177,16 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, #pragma mark Observer /*! - Update the _CPAttachedWindow frame if a resize event is observed - + Update the _CPAttachedWindow frame if a resize event is observed. */ - (void)observeValueForKeyPath:(CPString)aPath ofObject:(id)anObject change:(CPDictionary)theChange context:(void)aContext { if ([aPath isEqual:@"frame"]) { - // @TODO: not recompute everything, just compute the move offset - var g = [_windowView preferredEdge]; + // TODO: don't recompute everything, just compute the move offset + var edge = [_windowView preferredEdge]; - [self positionRelativeToView:_targetView preferredEdge:g]; - } -} - - -#pragma mark - -#pragma mark Notification handlers - -- (void)_attachedWindowDidMove:(CPNotification)aNotification -{ - if ([_windowView isMouseDownPressed]) - { - [_targetView removeObserver:self forKeyPath:@"frame"]; - [_windowView hideCursor]; - [self setLevel:CPNormalWindowLevel]; - [_closeButton setFrameOrigin:CPPointMake(1.0, 1.0)]; - [[CPNotificationCenter defaultCenter] removeObserver:self name:CPWindowDidMoveNotification object:self]; + [self positionRelativeToRect:nil ofView:_targetView preferredEdge:edge]; } } @@ -210,59 +194,35 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, #pragma mark - #pragma mark Utilities -- (CPPoint)computeOrigin:(CPView)aView preferredEdge:(int)anEdge +- (CGPoint)computeOriginFromRect:(CGRect)aRect ofView:(CPView)positioningView preferredEdge:(int)anEdge { - var frameView = [aView frame], - currentView = aView, - origin = [aView frameOrigin], - lastView; - - // if somebody succeed to use the conversion function of CPView - // to get this working, please do. - while (currentView = [currentView superview]) - { - origin.x += [currentView frameOrigin].x; - origin.y += [currentView frameOrigin].y; - lastView = currentView; - } - - origin.x += [[lastView window] frame].origin.x; - origin.y += [[lastView window] frame].origin.y; - - // take care of the scrolling point - if ([aView enclosingScrollView]) - { - var offsetPoint = [[[aView enclosingScrollView] contentView] boundsOrigin]; - origin.x -= offsetPoint.x; - origin.y -= offsetPoint.y; - } - - return [self computeOriginFromRect:CPRectMake(origin.x, origin.y, CPRectGetWidth(frameView), CPRectGetHeight(frameView)) preferredEdge:anEdge]; -} - -- (CPPoint)computeOriginFromRect:(CPRect)aRect preferredEdge:(int)anEdge -{ - var nativeRect = [[[CPApp mainWindow] platformWindow] nativeContentRect], - originLeft = CPPointCreateCopy(aRect.origin), - originRight = CPPointCreateCopy(aRect.origin), - originTop = CPPointCreateCopy(aRect.origin), - originBottom = CPPointCreateCopy(aRect.origin); + var mainWindow = [CPApp mainWindow], + platformWindow = [mainWindow platformWindow], + nativeRect = [platformWindow nativeContentRect], + baseOrigin = [positioningView convertPointToBase:aRect.origin], + platformOrigin = [mainWindow convertBaseToPlatformWindow:baseOrigin], + platformRect = _CGRectMake(platformOrigin.x, platformOrigin.y, aRect.size.width, aRect.size.height), + originLeft = _CGPointCreateCopy(platformOrigin), + originRight = _CGPointCreateCopy(platformOrigin), + originTop = _CGPointCreateCopy(platformOrigin), + originBottom = _CGPointCreateCopy(platformOrigin), + frameSize = [self frame].size; // CPMaxXEdge - originRight.x += aRect.size.width; - originRight.y += (aRect.size.height / 2.0) - (CPRectGetHeight([self frame]) / 2.0); + originRight.x += platformRect.size.width; + originRight.y += (platformRect.size.height / 2.0) - (frameSize.height / 2.0); // CPMinXEdge - originLeft.x -= CPRectGetWidth([self frame]); - originLeft.y += (aRect.size.height / 2.0) - (CPRectGetHeight([self frame]) / 2.0); + originLeft.x -= frameSize.width; + originLeft.y += (platformRect.size.height / 2.0) - (frameSize.height / 2.0); // CPMaxYEdge - originBottom.x += aRect.size.width / 2.0 - CPRectGetWidth([self frame]) / 2.0; - originBottom.y += aRect.size.height; + originBottom.x += platformRect.size.width / 2.0 - frameSize.width / 2.0; + originBottom.y += platformRect.size.height; // CPMinYEdge - originTop.x += aRect.size.width / 2.0 - CPRectGetWidth([self frame]) / 2.0; - originTop.y -= CPRectGetHeight([self frame]); + originTop.x += platformRect.size.width / 2.0 - frameSize.width / 2.0; + originTop.y -= frameSize.height; var requestedEdge = (anEdge !== nil) ? anEdge : CPMaxXEdge, requestedOrigin; @@ -288,51 +248,57 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, for (var i = 0; i < origins.length; i++) { - var o = origins[i], - g = edges[i]; + var origin = origins[i], + edge = edges[i]; [_windowView setArrowOffsetX:0]; [_windowView setArrowOffsetY:0]; - [_windowView setPreferredEdge:g]; + [_windowView setPreferredEdge:edge]; - if (o.x < 0) + if (origin.x < 0) { - [_windowView setArrowOffsetX:o.x]; - o.x = 0; - } - if (o.x + CPRectGetWidth([self frame]) > nativeRect.size.width) - { - [_windowView setArrowOffsetX:(o.x + CPRectGetWidth([self frame]) - nativeRect.size.width)]; - o.x = nativeRect.size.width - CPRectGetWidth([self frame]); - } - if (o.y < 0) - { - [_windowView setArrowOffsetY:o.y]; - o.y = 0; - } - if (o.y + CPRectGetHeight([self frame]) > nativeRect.size.height) - { - [_windowView setArrowOffsetY:(CPRectGetHeight([self frame]) + o.y - nativeRect.size.height)]; - o.y = nativeRect.size.height - CPRectGetHeight([self frame]); + [_windowView setArrowOffsetX:origin.x]; + origin.x = 0; } - switch (g) + if (origin.x + frameSize.width > nativeRect.size.width) + { + [_windowView setArrowOffsetX:(origin.x + frameSize.width - nativeRect.size.width)]; + origin.x = nativeRect.size.width - frameSize.width; + } + + if (origin.y < 0) + { + [_windowView setArrowOffsetY:origin.y]; + origin.y = 0; + } + + if (origin.y + frameSize.height > nativeRect.size.height) + { + [_windowView setArrowOffsetY:(frameSize.height + origin.y - nativeRect.size.height)]; + origin.y = nativeRect.size.height - frameSize.height; + } + + switch (edge) { case CPMaxXEdge: - if (o.x >= (aRect.origin.x + aRect.size.width)) - return o; + if (origin.x >= _CGRectGetMaxX(platformRect)) + return origin; break; + case CPMinXEdge: - if ((o.x + _frame.size.width) <= aRect.origin.x) - return o; + if ((origin.x + frameSize.width) <= platformRect.origin.x) + return origin; break; + case CPMaxYEdge: - if (o.y >= (aRect.origin.y + aRect.size.height)) - return o; + if (origin.y >= _CGRectGetMaxY(platformRect)) + return origin; break; + case CPMinYEdge: - if ((o.y + _frame.size.height) <= aRect.origin.y) - return o; + if ((origin.y + frameSize.height) <= platformRect.origin.y) + return origin; break; } } @@ -349,59 +315,58 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, */ - (void)positionRelativeToView:(CPView)aView { - [self positionRelativeToView:aView preferredEdge:nil]; + [self positionRelativeToRect:nil ofView:aView preferredEdge:nil]; } /*! - Compute the frame needed to be placed to the given view - and position the attached window according to this view + Position the _CPAttachedWindow relative to a given rect's edge. - @param aView the view where _CPAttachedWindow must be attached - @param anEdge the preferd edge to use -*/ -- (void)positionRelativeToView:(CPView)aView preferredEdge:(int)anEdge -{ - var point = [self computeOrigin:aView preferredEdge:anEdge]; - - [self setFrameOrigin:point]; - [_windowView showCursor]; - [self setLevel:CPStatusWindowLevel]; - [_closeButton setFrameOrigin:CPPointMake(1.0, 1.0)]; - [_windowView setNeedsDisplay:YES]; - [self makeKeyAndOrderFront:nil]; - - _targetView = aView; - [_targetView addObserver:self forKeyPath:@"frame" options:nil context:nil]; -} - -/*! - Position the _CPAttachedWindow to a random point - - @param aPoint the point where the _CPAttachedWindow will be attached -*/ -- (void)positionRelativeToRect:(CPRect)aRect -{ - [self positionRelativeToRect:aRect preferredEdge:nil]; -} - -/*! - Position the _CPAttachedWindow to a random point - - @param aPoint the point where the _CPAttachedWindow will be attached + @param aRect the rect relative to which the attached window will be positioned + @param positioningView the view to which the attached window is attached @param anEdge the prefered edge */ -- (void)positionRelativeToRect:(CPRect)aRect preferredEdge:(int)anEdge +- (void)positionRelativeToRect:(CGRect)aRect ofView:(CPView)positioningView preferredEdge:(int)anEdge { - var point = [self computeOriginFromRect:aRect preferredEdge:anEdge]; + if (!aRect || _CGRectIsEmpty(aRect)) + aRect = [positioningView bounds]; + + var point = [self computeOriginFromRect:aRect ofView:positioningView preferredEdge:anEdge]; [self setFrameOrigin:point]; [_windowView showCursor]; [self setLevel:CPStatusWindowLevel]; - [_closeButton setFrameOrigin:CPPointMake(1.0, 1.0)]; [_windowView setNeedsDisplay:YES]; [self makeKeyAndOrderFront:nil]; + + if (positioningView !== _targetView) + { + [_targetView removeObserver:self forKeyPath:@"frame"]; + _targetView = positioningView; + [_targetView addObserver:self forKeyPath:@"frame" options:0 context:nil]; + } } +/*! @ignore */ +- (void)setCSS3Property:(CPString)property value:(CPString)value +{ + _DOMElement.style['webkit' + property] = value; + + // Support other browsers here eventually +} + +/*! @ignore */ +- (BOOL)browserSupportsAnimation +{ + return typeof(_DOMElement.style.webkitTransition) !== "undefined"; + + /* + No others browsers supported yet. + + typeof(_DOMElement.style.MozTransition) !== "undefined" || + typeof(_DOMElement.style.MsTransition) !== "undefined" || + typeof(_DOMElement.style.OTransition) !== "undefined"; + */ +} #pragma mark - #pragma mark Actions @@ -421,99 +386,133 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, #pragma mark Overrides /*! - Called when the window is loowing focus and close the window if CPClosableOnBlurWindowMask is setted + Called when the window is losing focus. */ - (void)resignMainWindow { - if (_closeOnBlur && !_isClosed) + if (_closeOnBlur && !_isClosing) { - if (!_delegate || ((_implementedDelegateMethods & _CPAttachedWindow_attachedWindowShouldClose_) - && [_delegate attachedWindowShouldClose:self])) - [self close]; + if (!_delegate || + ((_implementedDelegateMethods & _CPAttachedWindow_attachedWindowShouldClose_) && + [_delegate attachedWindowShouldClose:self])) + { + [self close]; + } } } /*! - Order front the window as usual and add listener for CPWindowDidMoveNotification + When the window appears, show animation if necessary. + Also take this opportunity to keep track of window moves. @param sender the sender of the action */ - (IBAction)orderFront:(is)aSender { - [super orderFront:aSender]; - - var tranformOrigin = "50% 100%"; - - switch ([_windowView preferredEdge]) + if (![self isMainWindow]) { - case CPMaxYEdge: - var posX = 50 + (([_windowView arrowOffsetX] * 100) / _frame.size.width); - tranformOrigin = posX + "% 0%"; // 50 0 - break; - case CPMinYEdge: - var posX = 50 + (([_windowView arrowOffsetX] * 100) / _frame.size.width); - tranformOrigin = posX + "% 100%"; // 50 100 - break; - case CPMinXEdge: - var posY = 50 + (([_windowView arrowOffsetY] * 100) / _frame.size.height); - tranformOrigin = "100% " + posY + "%"; // 100 50 - break; - case CPMaxXEdge: - var posY = 50 + (([_windowView arrowOffsetY] * 100) / _frame.size.height); - tranformOrigin = "0% "+ posY + "%"; // 0 50 - break; - } + [super orderFront:aSender]; - // @TODO: implement for FF - if (_animates && _shouldPerformAnimation && typeof(_DOMElement.style.WebkitTransform) != "undefined") - { - _DOMElement.style.opacity = 0; - _DOMElement.style.WebkitTransform = "scale(0)"; - _DOMElement.style.WebkitTransformOrigin = tranformOrigin; - window.setTimeout(function() + if (_animates && _browserAnimates && _shouldPerformAnimation) { - _DOMElement.style.height = _frame.size.height + @"px"; - _DOMElement.style.width = _frame.size.width + @"px"; - _DOMElement.style.opacity = 1; - _DOMElement.style.WebkitTransform = "scale(1.1)"; - var transitionEndFunction = function() - { - _DOMElement.style.WebkitTransform = "scale(1)"; - _DOMElement.removeEventListener("webkitTransitionEnd", transitionEndFunction, YES); - }; - _DOMElement.addEventListener("webkitTransitionEnd", transitionEndFunction, YES); - },0); - } + var transformOrigin = "50% 100%", + frame = [self frame], + preferredEdge = [_windowView preferredEdge], + posX; - [[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(_attachedWindowDidMove:) name:CPWindowDidMoveNotification object:self]; + switch (preferredEdge) + { + case CPMaxYEdge: + case CPMinYEdge: + posX = 50 + (([_windowView arrowOffsetX] * 100) / frame.size.width); + transformOrigin = posX + "% " + (preferredEdge === CPMaxYEdge ? "0%" : "100%"); + break; + + case CPMinXEdge: + case CPMaxXEdge: + posY = 50 + (([_windowView arrowOffsetY] * 100) / frame.size.height); + transformOrigin = (preferredEdge === CPMaxXEdge ? "0% " : "100% ") + posY + "%"; + break; + } + + // This is the initial transform. We start scaled to zero and watch for opacity changes. + [self setCSS3Property:@"Transform" value:@"scale(0)"]; + [self setCSS3Property:@"TransformOrigin" value:transformOrigin]; + [self setCSS3Property:@"Transition" value:"opacity 0 linear"]; + + window.setTimeout(function() + { + // We are watching opacity, so this triggers the next transition + _DOMElement.style.opacity = 1; + _DOMElement.style.height = frame.size.height + @"px"; + _DOMElement.style.width = frame.size.width + @"px"; + + // Set up the pop-out transition + [self setCSS3Property:@"Transform" value:@"scale(1.1)"]; + [self setCSS3Property:@"Transition" value:@"-webkit-transform 200ms ease-in"]; + + var transitionEndFunction = function() + { + _DOMElement.removeEventListener("webkitTransitionEnd", transitionEndFunction, YES); + + // Now set up the pop-in to normal size transition. + // Because we are watching the -webkit-transform, it will occur now. + [self setCSS3Property:@"Transform" value:@"scale(1)"]; + [self setCSS3Property:@"Transition" value:@"-webkit-transform 50ms linear"]; + }; + + _DOMElement.addEventListener("webkitTransitionEnd", transitionEndFunction, YES); + }, 0); + } + else + { + [self setCSS3Property:@"Transition" value:@""]; + _DOMElement.style.opacity = 1; + } + } _shouldPerformAnimation = NO; - _isClosed = NO; + _isClosing = NO; } /*! - Close the windo with animation + Animate window closing. */ - (void)close { - // set a close flag to avoid infinite loop - _isClosed = YES; + if (![self isVisible]) + return; - if (_animates && typeof(_DOMElement.style.WebkitTransform) != "undefined") + // set a flag to avoid an infinite loop in resignMainWindow + _isClosing = YES; + + if (_animates && _browserAnimates) { + // Tell the element to fade out when the opacity changes + [self setCSS3Property:@"Transition" value:@"opacity 250ms linear"]; _DOMElement.style.opacity = 0; - var transitionEndFunction = function(){ - [super close]; + + var transitionEndFunction = function() + { _DOMElement.removeEventListener("webkitTransitionEnd", transitionEndFunction, YES); + [self _close]; }; + _DOMElement.addEventListener("webkitTransitionEnd", transitionEndFunction, YES); } else - [super close]; + { + [self _close]; + } +} +- (void)_close +{ + [super close]; [_targetView removeObserver:self forKeyPath:@"frame"]; - _shouldPerformAnimation = _animates; + _shouldPerformAnimation = YES; + _isClosing = NO; if (_implementedDelegateMethods & _CPAttachedWindow_attachedWindowDidClose_) [_delegate attachedWindowDidClose:self]; diff --git a/AppKit/_CPCornerView.j b/AppKit/_CPCornerView.j index c68d8d4f5..27df6c25c 100644 --- a/AppKit/_CPCornerView.j +++ b/AppKit/_CPCornerView.j @@ -46,7 +46,7 @@ CGContextSetStrokeColor(context, [self currentValueForThemeAttribute:@"divider-color"]); CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 0.5, ROUND(_CGRectGetMinY(aRect))); - CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 0.5, ROUND(_CGRectGetMaxY(aRect))); + CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 0.5, ROUND(_CGRectGetMaxY(aRect)) - 1.0); CGContextClosePath(context); CGContextStrokePath(context); diff --git a/AppKit/_CPImageAndTextView.j b/AppKit/_CPImageAndTextView.j index 49190f27d..adb34716f 100644 --- a/AppKit/_CPImageAndTextView.j +++ b/AppKit/_CPImageAndTextView.j @@ -100,7 +100,7 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, [self setAlignment:CPCenterTextAlignment]; [self setFont:[CPFont systemFontOfSize:12.0]]; [self setImagePosition:CPNoImage]; - [self setImageScaling:CPScaleNone]; + [self setImageScaling:CPImageScaleNone]; } _textSize = nil; @@ -288,6 +288,28 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, return _textShadowOffset; } +- (CGRect)textFrame +{ + [self layoutIfNeeded]; + + var textFrame = CGRectMakeZero(); + + if (_DOMTextElement) + { + var textStyle = _DOMTextElement.style; + + textFrame.origin.y = parseInt(textStyle.top.substr(0, textStyle.top.length - 2), 10), + textFrame.origin.x = parseInt(textStyle.left.substr(0, textStyle.left.length - 2), 10), + textFrame.size.width = parseInt(textStyle.width.substr(0, textStyle.width.length - 2), 10), + textFrame.size.height = parseInt(textStyle.height.substr(0, textStyle.height.length - 2), 10); + + textFrame.size.width += _textShadowOffset.width; + textFrame.size.height += _textShadowOffset.height; + } + + return textFrame; +} + - (void)setImage:(CPImage)anImage { if (_image == anImage) @@ -462,7 +484,7 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, if (_flags & _CPImageAndTextViewFontChangedFlag) { - var fontStyle = [_font ? _font : [CPFont systemFontOfSize:12.0] cssString]; + var fontStyle = [(_font ? _font : [CPFont systemFontOfSize:12.0]) cssString]; textStyle.font = fontStyle; if (shadowStyle) @@ -585,12 +607,12 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, imageWidth = imageSize.width, imageHeight = imageSize.height; - if (_imageScaling === CPScaleToFit) + if (_imageScaling === CPImageScaleAxesIndependently) { imageWidth = size.width; imageHeight = size.height; } - else if (_imageScaling === CPScaleProportionally) + else if (_imageScaling === CPImageScaleProportionallyDown) { var scale = MIN(MIN(size.width, imageWidth) / imageWidth, MIN(size.height, imageHeight) / imageHeight); diff --git a/AppKit/_CPToolTip.j b/AppKit/_CPToolTip.j index cc4591a16..db37f34e3 100644 --- a/AppKit/_CPToolTip.j +++ b/AppKit/_CPToolTip.j @@ -27,10 +27,7 @@ _CPToolTipWindowMask = 1 << 27; var _CPToolTipHeight = 24.0, - _CPToolTipFontSize = 11.0, - _CPCurrentToolTip, - _CPCurrentToolTipTimer, - _CPToolTipDelay = 1.0; + _CPToolTipFontSize = 11.0; /*! @ingroup appkit This is a basic tooltip that behaves mostly like Cocoa ones. @@ -178,118 +175,4 @@ var _CPToolTipHeight = 24.0, -/*! @ingroup appkit - Add tooltip support to CPView. -*/ -@implementation CPView (toolTips) -/*! - Sets the tooltip for the receiver. - - @param aToolTip the tooltip -*/ -- (void)setToolTip:(CPString)aToolTip -{ - if (_toolTip == aToolTip) - return; - - _toolTip = aToolTip; - - if (!_DOMElement) - return; - - var fIn = function(e) - { - [self _fireToolTip]; - }, - fOut = function(e) - { - [self _invalidateToolTip]; - }; - - if (_toolTip) - { - if (_DOMElement.addEventListener) - { - _DOMElement.addEventListener("mouseover", fIn, NO); - _DOMElement.addEventListener("keypress", fOut, NO); - _DOMElement.addEventListener("mouseout", fOut, NO); - } - else if (_DOMElement.attachEvent) - { - _DOMElement.attachEvent("onmouseover", fIn); - _DOMElement.attachEvent("onkeypress", fOut); - _DOMElement.attachEvent("onmouseout", fOut); - } - } - else - { - if (_DOMElement.removeEventListener) - { - _DOMElement.removeEventListener("mouseover", fIn, NO); - _DOMElement.removeEventListener("keypress", fOut, NO); - _DOMElement.removeEventListener("mouseout", fOut, NO); - } - else if (_DOMElement.detachEvent) - { - _DOMElement.detachEvent("onmouseover", fIn); - _DOMElement.detachEvent("onkeypress", fOut); - _DOMElement.detachEvent("onmouseout", fOut); - } - } -} - -/*! - Returns the receiver's tooltip. -*/ -- (CPString)toolTip -{ - return _toolTip; -} - -/*! @ignore - Starts the tooltip timer. -*/ -- (void)_fireToolTip -{ - if (_CPCurrentToolTipTimer) - { - [_CPCurrentToolTipTimer invalidate]; - if (_CPCurrentToolTip) - [_CPCurrentToolTip close]; - _CPCurrentToolTip = nil; - } - - if (_toolTip) - _CPCurrentToolTipTimer = [CPTimer scheduledTimerWithTimeInterval:_CPToolTipDelay target:self selector:@selector(_showToolTip:) userInfo:nil repeats:NO]; -} - -/*! @ignore - Stop the tooltip timer if any -*/ -- (void)_invalidateToolTip -{ - if (_CPCurrentToolTipTimer) - { - [_CPCurrentToolTipTimer invalidate]; - _CPCurrentToolTipTimer = nil; - } - - if (_CPCurrentToolTip) - { - [_CPCurrentToolTip close]; - _CPCurrentToolTip = nil; - } -} - -/*! @ignore - Actually shows the tooltip if any -*/ -- (void)_showToolTip:(CPTimer)aTimer -{ - if (_CPCurrentToolTip) - [_CPCurrentToolTip close]; - _CPCurrentToolTip = [_CPToolTip toolTipWithString:_toolTip]; -} - -@end diff --git a/CommonJS/lib/cappuccino/cib-analysis-tools.j b/CommonJS/lib/cappuccino/cib-analysis-tools.j index ac82bc648..32d5a0883 100644 --- a/CommonJS/lib/cappuccino/cib-analysis-tools.j +++ b/CommonJS/lib/cappuccino/cib-analysis-tools.j @@ -49,7 +49,7 @@ function findCibClassDependencies(cibPath) { var key = nil, keyEnumerator = [replacementClasses keyEnumerator]; - while (key = [keyEnumerator nextObject]) + while ((key = [keyEnumerator nextObject]) !== nil) [unarchiver setClass:[replacementClasses objectForKey:key] forClassName:key]; } diff --git a/External/rhino-narwhal-java-opts.patch b/External/rhino-narwhal-java-opts.patch new file mode 100644 index 000000000..687f92631 --- /dev/null +++ b/External/rhino-narwhal-java-opts.patch @@ -0,0 +1,12 @@ +diff -rupN a/engines/rhino/bin/narwhal-rhino b/engines/rhino/bin/narwhal-rhino +--- a/engines/rhino/bin/narwhal-rhino 2011-11-16 11:01:40.000000000 +0000 ++++ b/engines/rhino/bin/narwhal-rhino 2012-04-23 18:35:45.000000000 +0100 +@@ -22,7 +22,7 @@ fi + CLASSPATH=$NARWHAL_ENGINE_HOME/jars/jna.jar + BOOTCLASSPATH=$NARWHAL_ENGINE_HOME/jars/js.jar + +-JAVA_OPTS="-Dnarwhal.http_proxy=$http_proxy" ++JAVA_OPTS="-Dnarwhal.http_proxy=$http_proxy $JAVA_OPTS" + + if [ -n "$NARWHAL_CLASSPATH" ]; then + CLASSPATH=$NARWHAL_CLASSPATH:$CLASSPATH diff --git a/Foundation/CPArray+KVO.j b/Foundation/CPArray+KVO.j index d58666ff2..11068d42e 100644 --- a/Foundation/CPArray+KVO.j +++ b/Foundation/CPArray+KVO.j @@ -22,6 +22,7 @@ @import "CPArray.j" @import "CPNull.j" +@import "_CPCollectionKVCOperators.j" @implementation CPObject (CPArrayKVO) @@ -240,6 +241,7 @@ { if (_objectsAtIndexes) return _objectsAtIndexes(_proxyObject, _objectsAtIndexesSEL, theIndexes); + if (_objectAtIndex) { var index = CPNotFound, @@ -413,21 +415,21 @@ @end -//KVC on CPArray objects act on each item of the array, rather than on the array itself +// KVC on CPArray objects act on each item of the array, rather than on the array itself -@implementation CPArray (KeyValueCoding) +@implementation CPArray (CPKeyValueCoding) - (id)valueForKey:(CPString)aKey { if (aKey.indexOf("@") === 0) { if (aKey.indexOf(".") !== -1) - [CPException raise:CPInvalidArgumentException reason:"called valueForKey: on an array with a complex key ("+aKey+"). use valueForKeyPath:"]; + [CPException raise:CPInvalidArgumentException reason:"called valueForKey: on an array with a complex key (" + aKey + "). use valueForKeyPath:"]; - if (aKey == "@count") + if (aKey === "@count") return length; - return nil; + return [self valueForUndefinedKey:aKey]; } else { @@ -451,6 +453,9 @@ - (id)valueForKeyPath:(CPString)aKeyPath { + if (!aKeyPath) + [self valueForUndefinedKey:@""]; + if (aKeyPath.charAt(0) === "@") { var dotIndex = aKeyPath.indexOf("."), @@ -465,10 +470,7 @@ else operator = aKeyPath.substring(1); - if (kvoOperators[operator]) - return kvoOperators[operator](self, _cmd, parameter); - - return nil; + return [_CPCollectionKVCOperator performOperation:operator withCollection:self propertyPath:parameter]; } else { @@ -495,7 +497,7 @@ var enumerator = [self objectEnumerator], object; - while (object = [enumerator nextObject]) + while ((object = [enumerator nextObject]) !== nil) [object setValue:aValue forKey:aKey]; } @@ -504,86 +506,12 @@ var enumerator = [self objectEnumerator], object; - while (object = [enumerator nextObject]) + while ((object = [enumerator nextObject]) !== nil) [object setValue:aValue forKeyPath:aKeyPath]; } @end -var kvoOperators = []; - -// HACK: prevent these from becoming globals. workaround for obj-j "function foo(){}" behavior -var avgOperator, - maxOperator, - minOperator, - countOperator, - sumOperator; - -kvoOperators["avg"] = function avgOperator(self, _cmd, param) -{ - var objects = [self valueForKeyPath:param], - length = [objects count], - index = length, - average = 0.0; - - if (!length) - return 0; - - while (index--) - average += [objects[index] doubleValue]; - - return average / length; -} - -kvoOperators["max"] = function maxOperator(self, _cmd, param) -{ - var objects = [self valueForKeyPath:param], - index = [objects count] - 1, - max = [objects lastObject]; - - while (index--) - { - var item = objects[index]; - if ([max compare:item] < 0) - max = item; - } - - return max; -} - -kvoOperators["min"] = function minOperator(self, _cmd, param) -{ - var objects = [self valueForKeyPath:param], - index = [objects count] - 1, - min = [objects lastObject]; - - while (index--) - { - var item = objects[index]; - if ([min compare:item] > 0) - min = item; - } - - return min; -} - -kvoOperators["count"] = function countOperator(self, _cmd, param) -{ - return [self count]; -} - -kvoOperators["sum"] = function sumOperator(self, _cmd, param) -{ - var objects = [self valueForKeyPath:param], - index = [objects count], - sum = 0.0; - - while (index--) - sum += [objects[index] doubleValue]; - - return sum; -} - @implementation CPArray (KeyValueObserving) - (void)addObserver:(id)anObserver toObjectsAtIndexes:(CPIndexSet)indexes forKeyPath:(CPString)aKeyPath options:(unsigned)options context:(id)context @@ -610,20 +538,4 @@ kvoOperators["sum"] = function sumOperator(self, _cmd, param) } } -- (void)addObserver:(id)observer forKeyPath:(CPString)aKeyPath options:(unsigned)options context:(id)context -{ - if ([isa instanceMethodForSelector:_cmd] === [CPArray instanceMethodForSelector:_cmd]) - [CPException raise:CPInvalidArgumentException reason:"Unsupported method on CPArray"]; - else - [super addObserver:observer forKeyPath:aKeyPath options:options context:context]; -} - -- (void)removeObserver:(id)observer forKeyPath:(CPString)aKeyPath -{ - if ([isa instanceMethodForSelector:_cmd] === [CPArray instanceMethodForSelector:_cmd]) - [CPException raise:CPInvalidArgumentException reason:"Unsupported method on CPArray"]; - else - [super removeObserver:observer forKeyPath:aKeyPath]; -} - @end diff --git a/Foundation/CPArray/CPArray.j b/Foundation/CPArray/CPArray.j index cd804043f..78c462aae 100755 --- a/Foundation/CPArray/CPArray.j +++ b/Foundation/CPArray/CPArray.j @@ -522,7 +522,7 @@ var concat = Array.prototype.concat, if ([objects count]) { - argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; + var argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; for (; index < count; ++index) { @@ -536,13 +536,46 @@ var concat = Array.prototype.concat, objj_msgSend([self objectAtIndex:index], aSelector); } -- (void)enumerateObjectsUsingBlock:(Function)aFunction +- (void)enumerateObjectsUsingBlock:(Function /*(id anObject, int idx, @ref BOOL stop)*/)aFunction { + // This could have been [self enumerateObjectsWithOptions:CPEnumerationNormal usingBlock:aFunction] + // but this method should be as fast as possible. var index = 0, - count = [self count]; + count = [self count], + shouldStop = NO, + shouldStopRef = AT_REF(shouldStop); for (; index < count; ++index) - aFunction([self objectAtIndex:index], index); + { + aFunction([self objectAtIndex:index], index, shouldStopRef); + if (shouldStop) + return; + } +} + +- (void)enumerateObjectsWithOptions:(CPEnumerationOptions)options usingBlock:(Function /*(id anObject, int idx, @ref BOOL stop)*/)aFunction +{ + var shouldStop = NO; + + if (options & CPEnumerationReverse) + { + var index = [self count] - 1, + stop = -1, + increment = -1; + } + else + { + var index = 0, + stop = [self count], + increment = 1; + } + + for (; index !== stop; index += increment) + { + aFunction([self objectAtIndex:index], index, AT_REF(shouldStop)); + if (shouldStop) + return; + } } // Comparing arrays diff --git a/Foundation/CPArray/_CPJavaScriptArray.j b/Foundation/CPArray/_CPJavaScriptArray.j index 2cadc2113..7860a9adc 100644 --- a/Foundation/CPArray/_CPJavaScriptArray.j +++ b/Foundation/CPArray/_CPJavaScriptArray.j @@ -163,7 +163,7 @@ var concat = Array.prototype.concat, if ([objects count]) { - argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; + var argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; for (; index < count; ++index) { diff --git a/Foundation/CPCharacterSet.j b/Foundation/CPCharacterSet.j index 458c77ded..a72cf7c4c 100644 --- a/Foundation/CPCharacterSet.j +++ b/Foundation/CPCharacterSet.j @@ -241,7 +241,7 @@ var CPCharacterSetInvertedKey = @"CPCharacterSetInvertedKey"; var enu = [_ranges objectEnumerator], range; - while (range = [enu nextObject]) + while ((range = [enu nextObject]) !== nil) { if (CPLocationInRange(c, range)) return !_inverted; diff --git a/Foundation/CPData.j b/Foundation/CPData.j index fa32c65e7..b5fe53c5f 100644 --- a/Foundation/CPData.j +++ b/Foundation/CPData.j @@ -65,6 +65,22 @@ return [[self alloc] initWithJSONObject:anObject]; } ++ (CPData)dataWithBytes:(CPArray)bytesArray +{ + var data = [[self alloc] init]; + data.setBytes(bytesArray); + + return data; +} + ++ (CPData)dataWithBase64:(CPString)aString +{ + var data = [[self alloc] init]; + data.setBase64String(aString); + + return data; +} + - (id)initWithRawString:(CPString)aString { self = [super init]; @@ -120,6 +136,16 @@ return self.JSONObject(); } +- (CPArray)bytes +{ + return self.bytes(); +} + +- (CPString)base64 +{ + return self.base64(); +} + - (int)length { return [[self rawString] length]; diff --git a/Foundation/CPDate.j b/Foundation/CPDate.j index 3d4d12915..e666ceb15 100644 --- a/Foundation/CPDate.j +++ b/Foundation/CPDate.j @@ -119,7 +119,7 @@ var CPDateReferenceDate = new Date(Date.UTC(2001, 1, 1, 0, 0, 0, 0)); date.setMinutes(d[5]); date.setSeconds(d[6]); - self = new Date(date.getTime() + (timeZoneOffset - date.getTimezoneOffset()) * 60 * 1000); + self = new Date(date.getTime() + (timeZoneOffset - date.getTimezoneOffset()) * 60 * 1000); return self; } @@ -231,4 +231,40 @@ var CPDateTimeKey = @"CPDateTimeKey"; @end +// Based on 'Universal JavaScript Date.parse for ISO 8601' available at https://github.com/csnover/js-iso8601. +var numericKeys = [1, 4, 5, 6, 7, 10, 11]; + +Date.parseISO8601 = function (date) +{ + var timestamp, + struct, + minutesOffset = 0; + + // First, check for native parsing. + timestamp = Date.parse(date); + + if (isNaN(timestamp) && (struct = /^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(date))) + { + // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC + for (var i = 0, k; (k = numericKeys[i]); ++i) + struct[k] = +struct[k] || 0; + + // allow undefined days and months + struct[2] = (+struct[2] || 1) - 1; + struct[3] = +struct[3] || 1; + + if (struct[8] !== 'Z' && struct[9] !== undefined) + { + minutesOffset = struct[10] * 60 + struct[11]; + + if (struct[9] === '+') + minutesOffset = 0 - minutesOffset; + } + + return Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]); + } + + return timestamp; +}; + Date.prototype.isa = CPDate; diff --git a/Foundation/CPDateFormatter.j b/Foundation/CPDateFormatter.j new file mode 100644 index 000000000..661beac79 --- /dev/null +++ b/Foundation/CPDateFormatter.j @@ -0,0 +1,136 @@ +/* + * CPDateFormatter.j + * Foundation + * + * Created by Alexander Ljungberg. + * Copyright 2012, SlevenBits Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#import "Ref.h" + +@import +@import +@import + +CPDateFormatterNoStyle = 0; +CPDateFormatterShortStyle = 1; +CPDateFormatterMediumStyle = 2; +CPDateFormatterLongStyle = 3; +CPDateFormatterFullStyle = 4; + +/*! + @ingroup foundation + @class CPDateFormatter + + * Not yet implemented. This is a stub class. * + + CPDateFormatter takes a CPDate value and formats it as text for + display. It also supports the converse, taking text and interpreting it as a + CPDate by configurable formatting rules. +*/ +@implementation CPDateFormatter : CPFormatter +{ + CPDateFormatterStyle _dateStyle @accessors(property=dateStyle); +} + +- (id)init +{ + if (self = [super init]) + { + _dateStyle = CPDateFormatterShortStyle; + } + + return self; +} + +- (CPString)stringFromDate:(CPDate)aDate +{ + // TODO Add locale support. + switch (_dateStyle) + { + case CPDateFormatterShortStyle: + var format = "d/m/Y"; + return aDate.dateFormat(format); + default: + return [aDate description]; + } +} + +- (CPDate)dateFromString:(CPString)aString +{ + if (!aString) + return nil; + switch (_dateStyle) + { + case CPDateFormatterShortStyle: + var format = "d/m/Y"; + return Date.parseDate(string, format); + default: + return Date.parseDate(string); + } +} + +- (CPString)stringForObjectValue:(id)anObject +{ + if ([anObject isKindOfClass:[CPDate class]]) + return [self stringFromDate:anObject]; + else + return [anObject description]; +} + +- (CPString)editingStringForObjectValue:(id)anObject +{ + return [self stringForObjectValue:anObject]; +} + +- (BOOL)getObjectValue:(id)anObject forString:(CPString)aString errorDescription:(CPString)anError +{ + console.log("getObjectValue: forString:" + aString); + // TODO Error handling. + var value = [self dateFromString:aString]; + AT_DEREF(anObject, value); + + console.log("got " + value); + return YES; +} + +@end + +var CPDateFormatterStyleKey = "CPDateFormatterStyle"; + +@implementation CPDateFormatter (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder +{ + self = [super initWithCoder:aCoder]; + + if (self) + { + _dateStyle = [aCoder decodeIntForKey:CPDateFormatterStyleKey]; + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [super encodeWithCoder:aCoder]; + + [aCoder encodeInt:_dateStyle forKey:CPDateFormatterStyleKey]; +} + +@end diff --git a/Foundation/CPDictionary.j b/Foundation/CPDictionary.j index 61780fe18..caea40a50 100755 --- a/Foundation/CPDictionary.j +++ b/Foundation/CPDictionary.j @@ -50,7 +50,7 @@ { var key = [_keyEnumerator nextObject]; - if (!key) + if (key === nil) return nil; return [_dictionary objectForKey:key]; diff --git a/Foundation/CPIndexSet.j b/Foundation/CPIndexSet.j index 01c16626b..eac5a42a3 100644 --- a/Foundation/CPIndexSet.j +++ b/Foundation/CPIndexSet.j @@ -483,6 +483,75 @@ return description; } +- (void)enumerateIndexesUsingBlock:(Function /*(int idx, @ref BOOL stop) */)aFunction +{ + [self enumerateIndexesWithOptions:CPEnumerationNormal usingBlock:aFunction]; +} + +- (void)enumerateIndexesWithOptions:(CPEnumerationOptions)options usingBlock:(Function /*(int idx, @ref BOOL stop)*/)aFunction +{ + if (!_count) + return; + [self enumerateIndexesInRange:CPMakeRange(0, _CPMaxRange(_ranges[_ranges.length - 1])) options:options usingBlock:aFunction]; +} + +- (void)enumerateIndexesInRange:(CPRange)enumerationRange options:(CPEnumerationOptions)options usingBlock:(Function /*(int idx, @ref BOOL stop)*/)aFunction +{ + if (!_count || CPEmptyRange(enumerationRange)) + return; + + var shouldStop = NO, + index, + stop, + increment; + + if (options & CPEnumerationReverse) + { + index = _ranges.length - 1, + stop = -1, + increment = -1; + } + else + { + index = 0; + stop = _ranges.length; + increment = 1; + } + + for (; index !== stop; index += increment) + { + var range = _ranges[index]; + + var rangeIndex, + rangeStop, + rangeIncrement; + + if (options & CPEnumerationReverse) + { + rangeIndex = _CPMaxRange(range) - 1; + rangeStop = range.location - 1; + rangeIncrement = -1; + } + else + { + rangeIndex = range.location; + rangeStop = _CPMaxRange(range); + rangeIncrement = 1; + } + + for (; rangeIndex !== rangeStop; rangeIndex += rangeIncrement) + { + if (CPLocationInRange(rangeIndex, enumerationRange)) + { + aFunction(rangeIndex, AT_REF(shouldStop)); + if (shouldStop) + return; + } + } + } +} + + @end @implementation CPIndexSet(CPMutableIndexSet) @@ -537,7 +606,7 @@ if (lhsRangeIndexCEIL === lhsRangeIndex && lhsRangeIndexCEIL < rangeCount) aRange = CPUnionRange(aRange, _ranges[lhsRangeIndexCEIL]); - var rhsRangeIndex = assumedPositionOfIndex(_ranges, CPMaxRange(aRange)), + var rhsRangeIndex = assumedPositionOfIndex(_ranges, _CPMaxRange(aRange)), rhsRangeIndexFLOOR = FLOOR(rhsRangeIndex); if (rhsRangeIndexFLOOR === rhsRangeIndex && rhsRangeIndexFLOOR >= 0) @@ -640,8 +709,8 @@ // If these ranges don't start in the same place, we have to cull it. if (aRange.location !== existingRange.location) { - var maxRange = CPMaxRange(aRange), - existingMaxRange = CPMaxRange(existingRange); + var maxRange = _CPMaxRange(aRange), + existingMaxRange = _CPMaxRange(existingRange); existingRange.length = aRange.location - existingRange.location; @@ -661,14 +730,14 @@ } } - var rhsRangeIndex = assumedPositionOfIndex(_ranges, CPMaxRange(aRange) - 1), + var rhsRangeIndex = assumedPositionOfIndex(_ranges, _CPMaxRange(aRange) - 1), rhsRangeIndexFLOOR = FLOOR(rhsRangeIndex); if (rhsRangeIndex === rhsRangeIndexFLOOR && rhsRangeIndexFLOOR >= 0) { - var maxRange = CPMaxRange(aRange), + var maxRange = _CPMaxRange(aRange), existingRange = _ranges[rhsRangeIndexFLOOR], - existingMaxRange = CPMaxRange(existingRange); + existingMaxRange = _CPMaxRange(existingRange); if (maxRange !== existingMaxRange) { @@ -714,7 +783,7 @@ for (; i >= 0; --i) { var range = _ranges[i], - maximum = CPMaxRange(range); + maximum = _CPMaxRange(range); if (anIndex >= maximum) break; @@ -734,7 +803,7 @@ // If it's negative, it needs to be added properly later. else if (shifted.location < 0) { - shifted.length = CPMaxRange(shifted); + shifted.length = _CPMaxRange(shifted); shifted.location = 0; } @@ -745,8 +814,8 @@ // Shift the range, and normalize it if the result is negative. if ((range.location += aDelta) < 0) { - _count -= range.length - CPMaxRange(range); - range.length = CPMaxRange(range); + _count -= range.length - _CPMaxRange(range); + range.length = _CPMaxRange(range); range.location = 0; } } @@ -766,7 +835,7 @@ if ((j = i + 1) < count) { - [_ranges removeObjectsInRange:CPMakeRange(j, count - j)]; + [_ranges removeObjectsInRange:_CPMakeRange(j, count - j)]; for (j = 0, count = shifts.length; j < count; ++j) [self addIndexesInRange:shifts[j]]; @@ -882,7 +951,7 @@ var positionOfIndex = function(ranges, anIndex) if (anIndex < range.location) high = middle - 1; - else if (anIndex >= CPMaxRange(range)) + else if (anIndex >= _CPMaxRange(range)) low = middle + 1; else @@ -910,7 +979,7 @@ var assumedPositionOfIndex = function(ranges, anIndex) if (position === positionFLOOR) { - if (positionFLOOR - 1 >= 0 && anIndex < CPMaxRange(ranges[positionFLOOR - 1])) + if (positionFLOOR - 1 >= 0 && anIndex < _CPMaxRange(ranges[positionFLOOR - 1])) high = middle - 1; else if (positionFLOOR < count && anIndex >= ranges[positionFLOOR].location) @@ -926,7 +995,7 @@ var assumedPositionOfIndex = function(ranges, anIndex) if (anIndex < range.location) high = middle - 1; - else if (anIndex >= CPMaxRange(range)) + else if (anIndex >= _CPMaxRange(range)) low = middle + 1; else diff --git a/Foundation/CPKeyValueCoding.j b/Foundation/CPKeyValueCoding.j index 765594331..edc2f585d 100644 --- a/Foundation/CPKeyValueCoding.j +++ b/Foundation/CPKeyValueCoding.j @@ -157,7 +157,7 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey", - (id)valueForUndefinedKey:(CPString)aKey { [[CPException exceptionWithName:CPUndefinedKeyException - reason:[self description] + " is not key value coding-compliant for the key " + aKey + reason:[self _objectDescription] + " is not key value coding-compliant for the key " + aKey userInfo:[CPDictionary dictionaryWithObjects:[self, aKey] forKeys:[CPTargetObjectUserInfoKey, CPUnknownUserInfoKey]]] raise]; } @@ -235,7 +235,7 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey", key, keyEnumerator = [keyedValues keyEnumerator]; - while (key = [keyEnumerator nextObject]) + while ((key = [keyEnumerator nextObject]) !== nil) { value = [keyedValues objectForKey: key]; @@ -250,10 +250,15 @@ var CPObjectAccessorsForClassKey = @"$CPObjectAccessorsForClassKey", - (void)setValue:(id)aValue forUndefinedKey:(CPString)aKey { [[CPException exceptionWithName:CPUndefinedKeyException - reason:[self description] + " is not key value coding-compliant for the key " + aKey + reason:[self _objectDescription] + " is not key value coding-compliant for the key " + aKey userInfo:[CPDictionary dictionaryWithObjects:[self, aKey] forKeys:[CPTargetObjectUserInfoKey, CPUnknownUserInfoKey]]] raise]; } +- (CPString)_objectDescription +{ + return "<" + [self className] + " 0x" + [CPString stringWithHash:[self UID]] + ">"; +} + @end @implementation CPDictionary (CPKeyValueCoding) diff --git a/Foundation/CPKeyValueObserving.j b/Foundation/CPKeyValueObserving.j index 86df9ed48..5bcedbe5e 100644 --- a/Foundation/CPKeyValueObserving.j +++ b/Foundation/CPKeyValueObserving.j @@ -69,8 +69,24 @@ [self[KVOProxyKey] _removeObserver:anObserver forKeyPath:aPath]; } +/*! + Whether -willChangeValueForKey/-didChangeValueForKey should automatically be invoked when the + setter of the given key is used. The default is YES. If you override this method to return NO + for some key, you will need to call -willChangeValueForKey/-didChangeValueForKey manually to + be KVO compliant. + + The default implementation of this method will check if the receiving class implements + `+ (BOOL)automaticallyNotifiesObserversOf` and return the response of that method if it + exists. +*/ + (BOOL)automaticallyNotifiesObserversForKey:(CPString)aKey { + var capitalizedKey = aKey.charAt(0).toUpperCase() + aKey.substring(1), + selector = "automaticallyNotifiesObserversOf" + capitalizedKey; + + if ([[self class] respondsToSelector:selector]) + return objj_msgSend([self class], selector); + return YES; } @@ -648,7 +664,7 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew | CPKeyValueObservingOpti var forwarder = nil; - if (aPath.indexOf('.') != CPNotFound) + if (aPath.indexOf('.') !== CPNotFound && aPath.charAt(0) !== '@') forwarder = [[_CPKVOForwardingObserver alloc] initWithKeyPath:aPath object:_targetObject observer:anObserver options:options context:aContext]; else [self _replaceModifiersForKey:aPath]; @@ -1076,7 +1092,7 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew | CPKeyValueObservingOpti var dotIndex = aKeyPath.indexOf('.'); - if (dotIndex == CPNotFound) + if (dotIndex === CPNotFound) [CPException raise:CPInvalidArgumentException reason:"Created _CPKVOForwardingObserver without compound key path: "+aKeyPath]; _firstPart = aKeyPath.substring(0, dotIndex); diff --git a/Foundation/CPKeyedArchiver.j b/Foundation/CPKeyedArchiver.j index d3a844e09..870ae465b 100644 --- a/Foundation/CPKeyedArchiver.j +++ b/Foundation/CPKeyedArchiver.j @@ -398,7 +398,7 @@ var _CPKeyedArchiverStringClass = Nil, keys = [aDictionary keyEnumerator], references = [CPDictionary dictionary]; - while (key = [keys nextObject]) + while ((key = [keys nextObject]) !== nil) [references setObject:_CPKeyedArchiverEncodeObject(self, [aDictionary objectForKey:key], NO) forKey:key]; [_plistObject setObject:references forKey:aKey]; diff --git a/Foundation/CPKeyedUnarchiver.j b/Foundation/CPKeyedUnarchiver.j index a2d1f077b..9d5f0a3f6 100644 --- a/Foundation/CPKeyedUnarchiver.j +++ b/Foundation/CPKeyedUnarchiver.j @@ -251,7 +251,9 @@ var CPArrayClass = Ni */ - (float)decodeFloatForKey:(CPString)aKey { - return [self decodeObjectForKey:aKey]; + var f = [self decodeObjectForKey:aKey]; + + return f === nil ? 0.0 : f; } /* @@ -261,7 +263,9 @@ var CPArrayClass = Ni */ - (double)decodeDoubleForKey:(CPString)aKey { - return [self decodeObjectForKey:aKey]; + var d = [self decodeObjectForKey:aKey]; + + return d === nil ? 0.0 : d; } /* @@ -271,7 +275,9 @@ var CPArrayClass = Ni */ - (int)decodeIntForKey:(CPString)aKey { - return [self decodeObjectForKey:aKey]; + var i = [self decodeObjectForKey:aKey]; + + return i === nil ? 0 : i; } /* @@ -284,9 +290,9 @@ var CPArrayClass = Ni var object = [self decodeObjectForKey:aKey]; if (object) - return CPPointFromString(object); + return CGPointFromString(object); else - return CPPointMake(0.0, 0.0); + return CGPointMakeZero(); } /* @@ -299,9 +305,9 @@ var CPArrayClass = Ni var object = [self decodeObjectForKey:aKey]; if (object) - return CPRectFromString(object); + return CGRectFromString(object); else - return CPRectMakeZero(); + return CGRectMakeZero(); } /* @@ -314,9 +320,9 @@ var CPArrayClass = Ni var object = [self decodeObjectForKey:aKey]; if (object) - return CPSizeFromString(object); + return CGSizeFromString(object); else - return CPSizeMake(0.0, 0.0); + return CGSizeMakeZero(); } /* @@ -366,8 +372,9 @@ var CPArrayClass = Ni return nil; var objectClass = data.isa; + if (objectClass === CPDataClass) - return data.bytes; + return data.bytes(); return nil; } diff --git a/Foundation/CPNotificationCenter.j b/Foundation/CPNotificationCenter.j index 70cf20b7e..dcf611bad 100644 --- a/Foundation/CPNotificationCenter.j +++ b/Foundation/CPNotificationCenter.j @@ -103,7 +103,7 @@ var CPNotificationDefaultCenter = nil; var name = nil, names = [_namedRegistries keyEnumerator]; - while (name = [names nextObject]) + while ((name = [names nextObject]) !== nil) [[_namedRegistries objectForKey:name] removeObserver:anObserver object:nil]; [_unnamedRegistry removeObserver:anObserver object:nil]; @@ -122,7 +122,7 @@ var CPNotificationDefaultCenter = nil; var name = nil, names = [_namedRegistries keyEnumerator]; - while (name = [names nextObject]) + while ((name = [names nextObject]) !== nil) [[_namedRegistries objectForKey:name] removeObserver:anObserver object:anObject]; [_unnamedRegistry removeObserver:anObserver object:anObject]; @@ -225,7 +225,7 @@ var _CPNotificationCenterPostNotification = function(/* CPNotificationCenter */ keys = [_objectObservers keyEnumerator]; // Iterate through every set of observers - while (key = [keys nextObject]) + while ((key = [keys nextObject]) !== nil) { var observers = [_objectObservers objectForKey:key], observer = nil, diff --git a/Foundation/CPNumberFormatter.j b/Foundation/CPNumberFormatter.j index fda0ba00a..3bb9489a9 100644 --- a/Foundation/CPNumberFormatter.j +++ b/Foundation/CPNumberFormatter.j @@ -77,7 +77,7 @@ CPNumberFormatterRoundHalfUp = CPRoundPlain; - (CPString)stringFromNumber:(CPNumber)number { // TODO Add locale support. - switch(_numberStyle) + switch (_numberStyle) { case CPNumberFormatterDecimalStyle: UPDATE_NUMBER_HANDLER_IF_NECESSARY(); @@ -96,7 +96,7 @@ CPNumberFormatterRoundHalfUp = CPRoundPlain; // TODO This is just a temporary solution. Should be generalised. // Add in thousands separators. if (perMillSymbol) - while(commaPosition < [preFraction length]) + while (commaPosition < [preFraction length]) { preFraction = [preFraction stringByReplacingCharactersInRange:CPMakeRange(commaPosition, 0) withString:perMillSymbol]; commaPosition += 4; diff --git a/Foundation/CPObject.j b/Foundation/CPObject.j index 0a9e4f02c..c840c63ff 100644 --- a/Foundation/CPObject.j +++ b/Foundation/CPObject.j @@ -329,6 +329,18 @@ CPLog(@"Got some class: %@", inst); return objj_msgSend(self, aSelector, anObject, anotherObject); } +/*! + Sends the specified message to the reciever, with any number of arguments. + @param aSelector the message to send + @param anObject... comma seperated objects to pass to the selector + @return the return value of the message +*/ +- (id)performSelector:(SEL)aSelector withObjects:(id)anObject, ... +{ + var params = [self, aSelector].concat(Array.prototype.slice.apply(arguments, [3])); + return objj_msgSend.apply(this, params); +} + - (id)forwardingTargetForSelector:(SEL)aSelector { return nil; diff --git a/Foundation/CPPredicate/CPComparisonPredicate.j b/Foundation/CPPredicate/CPComparisonPredicate.j index 2864111ab..d890aa76e 100644 --- a/Foundation/CPPredicate/CPComparisonPredicate.j +++ b/Foundation/CPPredicate/CPComparisonPredicate.j @@ -512,9 +512,10 @@ var CPComparisonPredicateModifier, result = (_modifier == CPAllPredicateModifier), value; - while (value = [e nextObject]) + while ((value = [e nextObject]) !== nil) { var eval = [self _evaluateValue:value rightValue:rightValue]; + if (eval != result) return eval; } diff --git a/Foundation/CPPredicate/CPCompoundPredicate.j b/Foundation/CPPredicate/CPCompoundPredicate.j index c4b94b4ad..d4fa0b1b2 100644 --- a/Foundation/CPPredicate/CPCompoundPredicate.j +++ b/Foundation/CPPredicate/CPCompoundPredicate.j @@ -170,7 +170,7 @@ var CPCompoundPredicateType; switch (_type) { - case CPNotPredicateType: result += "NOT %s" + [args objectAtIndex:0]; + case CPNotPredicateType: result += "NOT " + [args objectAtIndex:0]; break; case CPAndPredicateType: result += [args objectAtIndex:0]; diff --git a/Foundation/CPPredicate/_CPAggregateExpression.j b/Foundation/CPPredicate/_CPAggregateExpression.j index cce684187..40214f895 100644 --- a/Foundation/CPPredicate/_CPAggregateExpression.j +++ b/Foundation/CPPredicate/_CPAggregateExpression.j @@ -59,7 +59,7 @@ collection = [_aggregate objectEnumerator], exp; - while (exp = [collection nextObject]) + while ((exp = [collection nextObject]) !== nil) { var eval = [exp expressionValueWithObject:object context:context]; [eval_array addObject:eval]; diff --git a/Foundation/CPSet+KVO.j b/Foundation/CPSet+KVO.j index 7f963e3a8..4af539b36 100644 --- a/Foundation/CPSet+KVO.j +++ b/Foundation/CPSet+KVO.j @@ -23,6 +23,7 @@ @import "CPException.j" @import "CPObject.j" @import "CPSet.j" +@import "_CPCollectionKVCOperators.j" @implementation CPObject (CPSetKVO) @@ -218,7 +219,8 @@ { var object, objectEnumerator = [objects objectEnumerator]; - while (object = [objectEnumerator nextObject]) + + while ((object = [objectEnumerator nextObject]) !== nil) _add(_proxyObject, _addSEL, object); } else @@ -237,7 +239,8 @@ { var object, objectEnumerator = [aSet objectEnumerator]; - while (object = [objectEnumerator nextObject]) + + while ((object = [objectEnumerator nextObject]) !== nil) _add(_proxyObject, _addSEL, object); } else @@ -273,7 +276,8 @@ { var object, objectEnumerator = [aSet objectEnumerator]; - while (object = [objectEnumerator nextObject]) + + while ((object = [objectEnumerator nextObject]) !== nil) _remove(_proxyObject, _removeSEL, object); } else @@ -295,7 +299,8 @@ { var object, objectEnumerator = [objects objectEnumerator]; - while (object = [objectEnumerator nextObject]) + + while ((object = [objectEnumerator nextObject]) !== nil) _remove(_proxyObject, _removeSEL, object); } else @@ -317,7 +322,8 @@ { var object, objectEnumerator = [[[self _representedObject] copy] objectEnumerator]; - while (object = [objectEnumerator nextObject]) + + while ((object = [objectEnumerator nextObject]) !== nil) _remove(_proxyObject, _removeSEL, object); } else @@ -381,7 +387,10 @@ - (id)valueForKeyPath:(CPString)aKeyPath { - if (aKeyPath.indexOf("@") === 0) + if (!aKeyPath) + [self valueForUndefinedKey:@""]; + + if (aKeyPath.charAt(0) === "@") { var dotIndex = aKeyPath.indexOf("."), operator, @@ -395,10 +404,7 @@ else operator = aKeyPath.substring(1); - if (kvoOperators[operator]) - return kvoOperators[operator](self, _cmd, parameter); - - return nil; + return [_CPCollectionKVCOperator performOperation:operator withCollection:self propertyPath:parameter]; } else { @@ -406,12 +412,17 @@ containedObject, containedObjectValue, containedObjectEnumerator = [self objectEnumerator]; - while (containedObject = [containedObjectEnumerator nextObject]) + + while ((containedObject = [containedObjectEnumerator nextObject]) !== nil) { containedObjectValue = [containedObject valueForKeyPath:aKeyPath]; - if (containedObjectValue) - [valuesForKeySet addObject:containedObjectValue]; + + if (containedObjectValue === nil || containedObjectValue === undefined) + containedObjectValue = [CPNull null]; + + [valuesForKeySet addObject:containedObjectValue]; } + return valuesForKeySet; } } @@ -420,108 +431,9 @@ { var containedObject, containedObjectEnumerator = [self objectEnumerator]; - while (containedObject = [containedObjectEnumerator nextObject]) + + while ((containedObject = [containedObjectEnumerator nextObject]) !== nil) [containedObject setValue:aValue forKey:aKey]; } @end - -var kvoOperators = []; - -// FIXME: this is not DRY because the implementation in CPArray+KVO is merely the same! -// HACK: prevent these from becoming globals. workaround for obj-j "function foo(){}" behavior -var avgOperator, - maxOperator, - minOperator, - countOperator, - sumOperator; - -kvoOperators["avg"] = function avgOperator(self, _cmd, param) -{ - //CPSet returns a CPSet - to obtain an array call allObjects - var objects = [[self valueForKeyPath:param] allObjects], - length = [objects count], - index = length, - average = 0.0; - - if (!length) - return 0; - - while (index--) - average += [objects[index] doubleValue]; - - return average / length; -} - -kvoOperators["max"] = function maxOperator(self, _cmd, param) -{ - //CPSet returns a CPSet - to obtain an array call allObjects - var objects = [[self valueForKeyPath:param] allObjects], - index = [objects count] - 1, - max = [objects lastObject]; - - while (index--) - { - var item = objects[index]; - if ([max compare:item] < 0) - max = item; - } - - return max; -} - -kvoOperators["min"] = function minOperator(self, _cmd, param) -{ - //CPSet returns a CPSet - to obtain an array call allObjects - var objects = [[self valueForKeyPath:param] allObjects], - index = [objects count] - 1, - min = [objects lastObject]; - - while (index--) - { - var item = objects[index]; - if ([min compare:item] > 0) - min = item; - } - - return min; -} - -kvoOperators["count"] = function countOperator(self, _cmd, param) -{ - return [self count]; -} - -kvoOperators["sum"] = function sumOperator(self, _cmd, param) -{ - //CPSet returns a CPSet - to obtain an array call allObjects - var objects = [[self valueForKeyPath:param] allObjects], - index = [objects count], - sum = 0.0; - - while (index--) - sum += [objects[index] doubleValue]; - - return sum; -} - - -@implementation CPSet (CPKeyValueObserving) - -- (void)addObserver:(id)observer forKeyPath:(CPString)aKeyPath options:(unsigned)options context:(id)context -{ - if ([isa instanceMethodForSelector:_cmd] === [CPSet instanceMethodForSelector:_cmd]) - [CPException raise:CPInvalidArgumentException reason:"Unsupported method on CPSet"]; - else - [super addObserver:observer forKeyPath:aKeyPath options:options context:context]; -} - -- (void)removeObserver:(id)observer forKeyPath:(CPString)aKeyPath -{ - if ([isa instanceMethodForSelector:_cmd] === [CPSet instanceMethodForSelector:_cmd]) - [CPException raise:CPInvalidArgumentException reason:"Unsupported method on CPSet"]; - else - [super removeObserver:observer forKeyPath:aKeyPath]; -} - -@end diff --git a/Foundation/CPSet/CPMutableSet.j b/Foundation/CPSet/CPMutableSet.j index d5cdafe76..79b76aee0 100644 --- a/Foundation/CPSet/CPMutableSet.j +++ b/Foundation/CPSet/CPMutableSet.j @@ -9,10 +9,9 @@ @import "CPSet.j" - @implementation CPMutableSet : CPSet -/* +/*! Returns an initialized set with a given initial capacity. @param aCapacity, only present for compatability */ @@ -21,7 +20,7 @@ return [self init]; } -/* +/*! Creates and returns a set with a given initial capacity. @param aCapacity, only present for compatability */ @@ -30,7 +29,10 @@ return [[self alloc] initWithCapacity:aCapacity]; } -- (void)filterUsingPredicate:(CPPredicate)aPredicate +/*! + Returns a set filtered using a given predicate. + @prarm aPredicate a CPPredicate object used to filter the objects in the set. +*/- (void)filterUsingPredicate:(CPPredicate)aPredicate { var object, objectEnumerator = [self objectEnumerator]; @@ -40,11 +42,19 @@ [self removeObject:object]; } +/*! + Removes an object from the set. + @param anObject the object to remove from the set. If the object is not in the set, the method will not modify the set. +*/ - (void)removeObject:(id)anObject { _CPRaiseInvalidAbstractInvocation(self, _cmd); } +/*! + Removes an array of objects from the set. + @param anArray an array of object to remove from the set. +*/ - (void)removeObjectsInArray:(CPArray)anArray { var index = 0, @@ -54,6 +64,9 @@ [self removeObject:[anArray objectAtIndex:index]]; } +/*! + Removes all the objects from the set. +*/ - (void)removeAllObjects { var object, @@ -63,7 +76,7 @@ [self removeObject:object]; } -/* +/*! Adds to the receiver each object contained in a given array that is not already a member. @param array An array of objects to add to the receiver. */ @@ -75,7 +88,7 @@ [self addObject:objects[count]]; } -/* +/*! Adds to the receiver each object contained in another given set @param set The set of objects to add to the receiver. */ @@ -88,7 +101,7 @@ [self addObject:object]; } -/* +/*! Removes from the receiver each object contained in another given set that is present in the receiver. @param set The set of objects to remove from the receiver. */ @@ -101,7 +114,7 @@ [self removeObject:object]; } -/* +/*! Removes from the receiver each object that isn't a member of another given set. @param set The set with which to perform the intersection. */ @@ -121,7 +134,7 @@ [self removeObject:objectsToRemove[count]]; } -/* +/*! Empties the receiver, then adds to the receiver each object contained in another given set. @param set The set whose members replace the receiver's content. */ diff --git a/Foundation/CPSet/CPSet.j b/Foundation/CPSet/CPSet.j index 7a0844de9..4c0773bb4 100644 --- a/Foundation/CPSet/CPSet.j +++ b/Foundation/CPSet/CPSet.j @@ -29,6 +29,13 @@ @import "CPNumber.j" @import "CPObject.j" +/*! + @class CPMutableSet + @ingroup Foundation + + CPSet is a data structure for storing an an unordered collection of unique objects. + Sets have O(1) insertion/lookup/deletion time complexity. +*/ @implementation CPSet : CPObject { @@ -42,7 +49,7 @@ return [super alloc]; } -/* +/*! Creates and returns an empty set. */ + (id)set @@ -50,7 +57,7 @@ return [[self alloc] init]; } -/* +/*! Creates and returns a set containing a uniqued collection of those objects contained in a given array. @param anArray array containing the objects to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. */ @@ -59,7 +66,7 @@ return [[self alloc] initWithArray:anArray]; } -/* +/*! Creates and returns a set that contains a single given object. @param anObject The object to add to the new set. */ @@ -68,7 +75,7 @@ return [[self alloc] initWithObjects:anObject]; } -/* +/*! Creates and returns a set containing a specified number of objects from a given array of objects. @param objects A array of objects to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. @param count The number of objects from objects to add to the new set. @@ -78,7 +85,7 @@ return [[self alloc] initWithObjects:objects count:count]; } -/* +/*! Creates and returns a set containing the objects in a given argument list. @param anObject The first object to add to the new set. @param ... A comma-separated list of objects, ending with nil, to add to the new set. If the same object appears more than once objects, it is added only once to the returned set. @@ -93,7 +100,7 @@ return objj_msgSend.apply(this, argumentsArray); } -/* +/*! Creates and returns a set containing the objects from another set. @param aSet A set containing the objects to add to the new set. */ @@ -102,30 +109,42 @@ return [[self alloc] initWithSet:set]; } +/*! + Creates and returns a set by adding anObject. + @param anObject to add to the new set. +*/ - (id)setByAddingObject:(id)anObject { return [[self class] setWithArray:[[self allObjects] arrayByAddingObject:anObject]]; } +/*! + Creates and returns a set by adding the objects from another set. + @param aSet to add objects to add to the new set. +*/ - (id)setByAddingObjectsFromSet:(CPSet)aSet { return [self setByAddingObjectsFromArray:[aSet allObjects]]; } +/*! + Creates and returns a set by adding the objects from an array. + @param anArray with objects to add to a new set. +*/ - (id)setByAddingObjectsFromArray:(CPArray)anArray { return [[self class] setWithArray:[[self allObjects] arrayByAddingObjectsFromArray:anArray]]; } -/* - Basic initializer, returns an empty set +/*! + Basic initializer, returns an empty set. */ - (id)init { return [self initWithObjects:nil count:0]; } -/* +/*! Initializes a newly allocated set with the objects that are contained in a given array. @param array An array of objects to add to the new set. If the same object appears more than once in array, it is represented only once in the returned set. */ @@ -134,7 +153,7 @@ return [self initWithObjects:anArray count:[anArray count]]; } -/* +/*! Initializes a newly allocated set with members taken from the specified list of objects. @param anObject The first object to add to the new set. @param ... A comma-separated list of objects, ending with nil, to add to the new set. If the same object appears more than once in the list, it is represented only once in the returned set. @@ -151,6 +170,11 @@ return [self initWithObjects:Array.prototype.slice.call(arguments, 2, index) count:index - 2]; } +/*! + Creates and returns a set containing the objects from an array. + @param anArray An array containing the objects to add to the new set. + @param aCount the number of objects in anArray. +*/ - (id)initWithObjects:(CPArray)objects count:(CPUInteger)aCount { if (self === _CPSharedPlaceholderSet) @@ -159,16 +183,19 @@ return [super init]; } -/* +/*! Initializes a newly allocated set and adds to it objects from another given set. + @param aSet a set containing objects to add to the new set. */ - (id)initWithSet:(CPSet)aSet { return [self initWithArray:[aSet allObjects]]; } -/* +/*! Initializes a newly allocated set and adds to it members of another given set. Only included for compatability. + @param aSet a set of objects to add to the new set. + @param shouldCopyItems a boolean value. If YES the objects would be copied, if NO the objects will not be copied. */ - (id)initWithSet:(CPSet)aSet copyItems:(BOOL)shouldCopyItems { @@ -178,7 +205,7 @@ return [self initWithSet:aSet]; } -/* +/*! Returns the number of members in the receiver. */ - (CPUInteger)count @@ -186,7 +213,7 @@ _CPRaiseInvalidAbstractInvocation(self, _cmd); } -/* +/*! Returns an array containing the receiver’s members, or an empty array if the receiver has no members. */ - (CPArray)allObjects @@ -201,7 +228,7 @@ return objects; } -/* +/*! Returns one of the objects in the receiver, or nil if the receiver contains no objects. */ - (id)anyObject @@ -209,7 +236,7 @@ return [[self objectEnumerator] nextObject]; } -/* +/*! Returns a Boolean value that indicates whether a given object is present in the receiver. @param anObject The object for which to test membership of the receiver. */ @@ -218,7 +245,11 @@ return [self member:anObject] !== nil; } -- (void)filteredSetUsingPredicate:(CPPredicate)aPredicate +/*! + Returns a set filtered using a given predicate. + @prarm aPredicate a CPPredicate object used to filter the objects in the set. +*/ +- (CPSet)filteredSetUsingPredicate:(CPPredicate)aPredicate { var objects = [], object, @@ -231,7 +262,7 @@ return [[[self class] alloc] initWithArray:objects]; } -/* +/*! Sends to each object in the receiver a message specified by a given selector. @param aSelector A selector that specifies the message to send to the members of the receiver. The method must not take any arguments. It should not have the side effect of modifying the receiver. This value must not be NULL. */ @@ -240,7 +271,7 @@ [self makeObjectsPerformSelector:aSelector withObjects:nil]; } -/* +/*! Sends to each object in the receiver a message specified by a given selector. @param aSelector A selector that specifies the message to send to the receiver's members. The method must take a single argument of type id. The method should not, as a side effect, modify the receiver. The value must not be NULL. @param anObject The object to pass as an argument to the method specified by aSelector. @@ -250,7 +281,7 @@ [self makeObjectsPerformSelector:aSelector withObjects:[anObject]]; } -/* +/*! Sends to each object in the receiver a message specified by a given selector. @param aSelector A selector that specifies the message to send to the receiver's members. The method must take a single argument of type id. The method should not, as a side effect, modify the receiver. The value must not be NULL. @param objects The objects to pass as an argument to the method specified by aSelector. @@ -268,7 +299,7 @@ } } -/* +/*! Determines whether the receiver contains an object equal to a given object, and returns that object if it is present. @param anObject The object for which to test for membership of the receiver. */ @@ -277,11 +308,18 @@ _CPRaiseInvalidAbstractInvocation(self, _cmd); } +/*! + Returns an object enumerator (CPEnumerator) for the receiver. +*/ - (CPEnumerator)objectEnumerator { _CPRaiseInvalidAbstractInvocation(self, _cmd); } +/*! + Enumberates over the objects in a set using a given function. + @param aFunction a callback for each itteration, should be of the format: function(anObject). +*/ - (void)enumerateObjectsUsingBlock:(Function)aFunction { var object, @@ -306,7 +344,7 @@ return [[[self class] alloc] initWithArray:objects]; } -/* +/*! Returns a Boolean value that indicates whether every object in the receiver is also present in another given set. @param set The set with which to compare the receiver. */ @@ -322,7 +360,7 @@ return YES; } -/* +/*! Returns a Boolean value that indicates whether at least one object in the receiver is also present in another given set. @param set The set with which to compare the receiver. */ @@ -342,7 +380,17 @@ return NO; } -/* +/*! + Returns an array of the set's content sorted as specified by a given array of sort descriptors. + + @param sortDescriptors an array of CPSortDescriptor objects. +*/ +- (CPArray)sortedArrayUsingDescriptors:(CPArray)someSortDescriptors +{ + return [[self allObjects] sortedArrayUsingDescriptors:someSortDescriptors]; +} + +/*! Compares the receiver to another set. @param set The set with which to compare the receiver. */ @@ -351,6 +399,10 @@ return [self isEqual:aSet]; } +/*! + Returns YES if BOTH sets are a subset of the other. + @param aSet a set of objects +*/ - (BOOL)isEqual:(CPSet)aSet { // If both are subsets of each other, they are equal diff --git a/Foundation/CPURL.j b/Foundation/CPURL.j index 810677c7e..669614dd9 100644 --- a/Foundation/CPURL.j +++ b/Foundation/CPURL.j @@ -122,8 +122,8 @@ CPURLCustomIconKey = @"CPURLCustomIconKey"; - (CPArray)pathComponents { - var path = self.pathComponents(); - return [path copy]; + var components = self.pathComponents(); + return [components copy]; } // if absolute, returns the same as path @@ -202,6 +202,13 @@ CPURLCustomIconKey = @"CPURLCustomIconKey"; return self.pathExtension(); } +- (CPURL)URLByDeletingLastPathComponent +{ + var result = self.createCopyDeletingLastPathComponent(); + result.isa = [self class]; + return result; +} + - (CPURL)standardizedURL { return self.standardizedURL(); diff --git a/Foundation/CPURLConnection.j b/Foundation/CPURLConnection.j index 7691c4ce0..db8198ff9 100644 --- a/Foundation/CPURLConnection.j +++ b/Foundation/CPURLConnection.j @@ -106,7 +106,7 @@ var CPURLConnectionDelegate = nil; key = nil, keys = [fields keyEnumerator]; - while (key = [keys nextObject]) + while ((key = [keys nextObject]) !== nil) request.setRequestHeader(key, [fields objectForKey:key]); request.send([aRequest HTTPBody]); @@ -196,7 +196,7 @@ var CPURLConnectionDelegate = nil; key = nil, keys = [fields keyEnumerator]; - while (key = [keys nextObject]) + while ((key = [keys nextObject]) !== nil) _HTTPRequest.setRequestHeader(key, [fields objectForKey:key]); _HTTPRequest.send([_request HTTPBody]); diff --git a/Foundation/CPURLRequest.j b/Foundation/CPURLRequest.j index 84740e0a8..f7fcf7439 100644 --- a/Foundation/CPURLRequest.j +++ b/Foundation/CPURLRequest.j @@ -54,7 +54,16 @@ } /*! - Initializes the request with a URL. + Equal to `[receiver initWithURL:nil]`. +*/ +- (id)init +{ + return [self initWithURL:nil]; +} + +/*! + Initializes the request with a URL. This is the designated initializer. + @param aURL the url to set @return the initialized CPURLRequest */ diff --git a/Foundation/CPWebDAVManager.j b/Foundation/CPWebDAVManager.j index 237f23698..87cc5cd82 100644 --- a/Foundation/CPWebDAVManager.j +++ b/Foundation/CPWebDAVManager.j @@ -84,7 +84,7 @@ CPWebDAVManagerNonCollectionResourceType = 0; URLString = nil, URLStrings = [response keyEnumerator]; - while (URLString = [URLStrings nextObject]) + while ((URLString = [URLStrings nextObject]) !== nil) { var URL = [CPURL URLWithString:URLString], properties = [response objectForKey:URLString]; diff --git a/Foundation/Foundation.j b/Foundation/Foundation.j index e3f17d3ec..d26bfbb1f 100755 --- a/Foundation/Foundation.j +++ b/Foundation/Foundation.j @@ -28,6 +28,7 @@ @import "CPCompoundPredicate.j" @import "CPData.j" @import "CPDate.j" +@import "CPDateFormatter.j" @import "CPDecimal.j" @import "CPDecimalNumber.j" @import "CPDictionary.j" diff --git a/Foundation/_CPCollectionKVCOperators.j b/Foundation/_CPCollectionKVCOperators.j new file mode 100644 index 000000000..f2be4101d --- /dev/null +++ b/Foundation/_CPCollectionKVCOperators.j @@ -0,0 +1,118 @@ +/* + * _CPCollectionKVCOperators.j + * Foundation + * + * Created by Aparajita Fishman. + * Copyright 2012 Cappuccino Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@implementation _CPCollectionKVCOperator : CPObject + ++ (id)performOperation:(CPString)operator withCollection:(id)aCollection propertyPath:(CPString)propertyPath +{ + var selector = CPSelectorFromString(operator + @"ForCollection:propertyPath:"); + + if (![self respondsToSelector:selector]) + return [aCollection valueForUndefinedKey:@"@" + operator]; + + return [self performSelector:selector withObject:aCollection withObject:propertyPath]; +} + ++ (double)avgForCollection:(id)aCollection propertyPath:(CPString)propertyPath +{ + if (!propertyPath) + return [aCollection valueForUndefinedKey:@"@avg"]; + + var objects = [aCollection valueForKeyPath:propertyPath], + average = 0.0, + enumerator = [objects objectEnumerator], + object; + + while ((object = [enumerator nextObject]) !== nil) + average += [object doubleValue]; + + return average / [objects count]; +} + ++ (double)minForCollection:(id)aCollection propertyPath:(CPString)propertyPath +{ + if (!propertyPath) + return [aCollection valueForUndefinedKey:@"@min"]; + + var objects = [aCollection valueForKeyPath:propertyPath]; + + if ([objects count] === 0) + return nil; + + var enumerator = [objects objectEnumerator], + min = [enumerator nextObject], + object; + + while ((object = [enumerator nextObject]) !== nil) + { + if ([min compare:object] > 0) + min = object; + } + + return min; +} + ++ (double)maxForCollection:(id)aCollection propertyPath:(CPString)propertyPath +{ + if (!propertyPath) + return [aCollection valueForUndefinedKey:@"@max"]; + + var objects = [aCollection valueForKeyPath:propertyPath]; + + if ([objects count] === 0) + return nil; + + var enumerator = [objects objectEnumerator], + max = [enumerator nextObject], + object; + + while ((object = [enumerator nextObject]) !== nil) + { + if ([max compare:object] < 0) + max = object; + } + + return max; +} + ++ (double)sumForCollection:(id)aCollection propertyPath:(CPString)propertyPath +{ + if (!propertyPath) + return [aCollection valueForUndefinedKey:@"@sum"]; + + var objects = [aCollection valueForKeyPath:propertyPath], + sum = 0.0, + enumerator = [objects objectEnumerator], + object; + + while ((object = [enumerator nextObject]) !== nil) + sum += [object doubleValue]; + + return sum; +} + ++ (int)countForCollection:(id)aCollection propertyPath:(CPString)propertyPath +{ + return [aCollection count]; +} + +@end diff --git a/Objective-J/CFBundle.js b/Objective-J/CFBundle.js index dcb166aab..44280e871 100644 --- a/Objective-J/CFBundle.js +++ b/Objective-J/CFBundle.js @@ -65,7 +65,7 @@ CFBundle.environments = function() { // Passed in by GCC. return ENVIRONMENTS; -} +}; DISPLAY_NAME(CFBundle.environments); @@ -89,14 +89,14 @@ CFBundle.bundleContainingURL = function(/*CFURL|String*/ aURL) } return NULL; -} +}; DISPLAY_NAME(CFBundle.bundleContainingURL); CFBundle.mainBundle = function() { return new CFBundle(mainBundleURL); -} +}; DISPLAY_NAME(CFBundle.mainBundle); @@ -109,21 +109,21 @@ function addClassToBundle(aClass, aBundle) CFBundle.bundleForClass = function(/*Class*/ aClass) { return CFBundlesForClasses[aClass.name] || CFBundle.mainBundle(); -} +}; DISPLAY_NAME(CFBundle.bundleForClass); CFBundle.prototype.bundleURL = function() { return this._bundleURL; -} +}; DISPLAY_NAME(CFBundle.prototype.bundleURL); CFBundle.prototype.resourcesDirectoryURL = function() { return this._resourcesDirectoryURL; -} +}; DISPLAY_NAME(CFBundle.prototype.resourcesDirectoryURL); @@ -138,7 +138,7 @@ CFBundle.prototype.resourceURL = function(/*String*/ aResourceName, /*String*/ a var resourceURL = (new CFURL(aResourceName, this.resourcesDirectoryURL())).mappedURL(); return resourceURL.absoluteURL(); -} +}; DISPLAY_NAME(CFBundle.prototype.resourceURL); @@ -165,21 +165,21 @@ CFBundle.prototype.executableURL = function() } return this._executableURL; -} +}; DISPLAY_NAME(CFBundle.prototype.executableURL); CFBundle.prototype.infoDictionary = function() { return this._infoDictionary; -} +}; DISPLAY_NAME(CFBundle.prototype.infoDictionary); CFBundle.prototype.valueForInfoDictionaryKey = function(/*String*/ aKey) { return this._infoDictionary.valueForKey(aKey); -} +}; DISPLAY_NAME(CFBundle.prototype.valueForInfoDictionaryKey); @@ -194,14 +194,14 @@ CFBundle.prototype.hasSpritedImages = function() return YES; return NO; -} +}; DISPLAY_NAME(CFBundle.prototype.hasSpritedImages); CFBundle.prototype.environments = function() { return this._infoDictionary.valueForKey("CPBundleEnvironments") || ["ObjJ"]; -} +}; DISPLAY_NAME(CFBundle.prototype.environments); @@ -226,21 +226,21 @@ CFBundle.prototype.mostEligibleEnvironment = function(/*Array*/ environments) } return NULL; -} +}; DISPLAY_NAME(CFBundle.prototype.mostEligibleEnvironment); CFBundle.prototype.isLoading = function() { return this._loadStatus & CFBundleLoading; -} +}; DISPLAY_NAME(CFBundle.prototype.isLoading); CFBundle.prototype.isLoaded = function() { - return this._loadStatus & CFBundleLoaded; -} + return !!(this._loadStatus & CFBundleLoaded); +}; DISPLAY_NAME(CFBundle.prototype.isLoaded); @@ -299,7 +299,7 @@ CFBundle.prototype.load = function(/*BOOL*/ shouldExecute) new FileRequest(new CFURL("Info.plist", self.bundleURL()), onsuccess, onfailure); }); -} +}; DISPLAY_NAME(CFBundle.prototype.load); @@ -346,7 +346,7 @@ function loadExecutableAndResources(/*Bundle*/ aBundle, /*BOOL*/ shouldExecute) if ((typeof CPApp === "undefined" || !CPApp || !CPApp._finishedLaunching) && typeof OBJJ_PROGRESS_CALLBACK === "function" && CPApplicationSizeInBytes) { - OBJJ_PROGRESS_CALLBACK(MAX(MIN(1.0, CFTotalBytesLoaded / CPApplicationSizeInBytes), 0.0), CPApplicationSizeInBytes, aBundle.bundlePath()) + OBJJ_PROGRESS_CALLBACK(MAX(MIN(1.0, CFTotalBytesLoaded / CPApplicationSizeInBytes), 0.0), CPApplicationSizeInBytes, aBundle.bundlePath()); } if (aBundle._loadStatus === CFBundleLoading) @@ -497,7 +497,7 @@ function CFBundleTestSpriteSupport(/*String*/ MHTMLPath, /*Function*/ aCallback) } CPApplicationSizeInBytes += size; - }) + }); CFBundleTestSpriteTypes([ CFBundleDataURLSpriteType, @@ -538,12 +538,12 @@ function CFBundleTestSpriteTypes(/*Array*/ spriteTypes) } else image.onerror(); - } + }; image.onerror = function() { CFBundleTestSpriteTypes(spriteTypes.slice(2)); - } + }; image.src = spriteTypes[1]; } @@ -669,36 +669,36 @@ function decompileStaticFile(/*Bundle*/ aBundle, /*String*/ aString, /*String*/ CFBundle.prototype.addEventListener = function(/*String*/ anEventName, /*Function*/ anEventListener) { this._eventDispatcher.addEventListener(anEventName, anEventListener); -} +}; DISPLAY_NAME(CFBundle.prototype.addEventListener); CFBundle.prototype.removeEventListener = function(/*String*/ anEventName, /*Function*/ anEventListener) { this._eventDispatcher.removeEventListener(anEventName, anEventListener); -} +}; DISPLAY_NAME(CFBundle.prototype.removeEventListener); CFBundle.prototype.onerror = function(/*Event*/ anEvent) { throw anEvent.error; -} +}; DISPLAY_NAME(CFBundle.prototype.onerror); CFBundle.prototype.bundlePath = function() { return this._bundleURL.absoluteURL().path(); -} +}; CFBundle.prototype.path = function() { CPLog.warn("CFBundle.prototype.path is deprecated, use CFBundle.prototype.bundlePath instead."); return this.bundlePath.apply(this, arguments); -} +}; CFBundle.prototype.pathForResource = function(aResource) { return this.resourceURL(aResource).absoluteString(); -} +}; diff --git a/Objective-J/CFData.js b/Objective-J/CFData.js index 7898756f7..afbfe20d7 100644 --- a/Objective-J/CFData.js +++ b/Objective-J/CFData.js @@ -67,9 +67,11 @@ CFData.prototype.rawString = function() else if (this._JSONObject) this._rawString = JSON.stringify(this._JSONObject); -// Ideally we would convert these bytes or base64 into a string. -// else if (this._bytes) -// else if (this._base64) + else if (this._bytes) + this._rawString = CFData.bytesToString(this._bytes); + + else if (this._base64) + this._rawString = CFData.decodeBase64ToString(this._base64, true); else throw new Error("Can't convert data to string."); @@ -80,11 +82,28 @@ CFData.prototype.rawString = function() CFData.prototype.bytes = function() { + if (this._bytes === NULL) + { + var bytes = CFData.stringToBytes(this.rawString()); + this.setBytes(bytes); + } + return this._bytes; } CFData.prototype.base64 = function() { + if (this._base64 === NULL) + { + var base64; + if (this._bytes) + base64 = CFData.encodeBase64Array(this._bytes); + else + base64 = CFData.encodeBase64String(this.rawString()); + + this.setBase64String(base64); + } + return this._base64; } @@ -238,6 +257,14 @@ CFData.bytesToString = function(bytes) return String.fromCharCode.apply(NULL, bytes); } +CFData.stringToBytes = function(input) +{ + var temp = []; + for (var i = 0; i < input.length; i++) + temp.push(input.charCodeAt(i)); + + return temp; +} CFData.encodeBase64String = function(input) { diff --git a/Objective-J/CFHTTPRequest.js b/Objective-J/CFHTTPRequest.js index 2ef8c721f..6d57fc3da 100644 --- a/Objective-J/CFHTTPRequest.js +++ b/Objective-J/CFHTTPRequest.js @@ -52,7 +52,10 @@ function Asynchronous(/*Function*/ aFunction) if (asynchronousTimeoutCount > currentAsynchronousTimeoutCount) aFunction.apply(this, args); else - asynchronousFunctionQueue.push(function() { aFunction.apply(this, args) }); + asynchronousFunctionQueue.push(function() + { + aFunction.apply(this, args); + }); }; } @@ -77,7 +80,7 @@ if (window.ActiveXObject !== undefined) NativeRequest = function() { return new ActiveXObject(MSXML_XMLHTTP); - } + }; break; } @@ -103,12 +106,15 @@ GLOBAL(CFHTTPRequest) = function() this._stateChangeHandler = function() { determineAndDispatchHTTPRequestEvents(self); - } + }; this._nativeRequest.onreadystatechange = this._stateChangeHandler; if (CFHTTPRequest.AuthenticationDelegate !== nil) - this._eventDispatcher.addEventListener("HTTP403", function(){CFHTTPRequest.AuthenticationDelegate(self)}); + this._eventDispatcher.addEventListener("HTTP403", function() + { + CFHTTPRequest.AuthenticationDelegate(self); + }); } CFHTTPRequest.UninitializedState = 0; @@ -130,7 +136,7 @@ CFHTTPRequest.prototype.status = function() { return 0; } -} +}; CFHTTPRequest.prototype.statusText = function() { @@ -142,12 +148,12 @@ CFHTTPRequest.prototype.statusText = function() { return ""; } -} +}; CFHTTPRequest.prototype.readyState = function() { return this._nativeRequest.readyState; -} +}; CFHTTPRequest.prototype.success = function() { @@ -159,7 +165,7 @@ CFHTTPRequest.prototype.success = function() // file:// requests return with status 0, to know if they succeeded, we // need to know if there was any content. return status === 0 && this.responseText() && this.responseText().length; -} +}; CFHTTPRequest.prototype.responseXML = function() { @@ -169,7 +175,7 @@ CFHTTPRequest.prototype.responseXML = function() return responseXML; return parseXML(this.responseText()); -} +}; CFHTTPRequest.prototype.responsePropertyList = function() { @@ -179,32 +185,32 @@ CFHTTPRequest.prototype.responsePropertyList = function() return CFPropertyList.propertyListFromXML(this.responseXML()); return CFPropertyList.propertyListFromString(responseText); -} +}; CFHTTPRequest.prototype.responseText = function() { return this._nativeRequest.responseText; -} +}; CFHTTPRequest.prototype.setRequestHeader = function(/*String*/ aHeader, /*Object*/ aValue) { this._requestHeaders[aHeader] = aValue; -} +}; CFHTTPRequest.prototype.getResponseHeader = function(/*String*/ aHeader) { return this._nativeRequest.getResponseHeader(aHeader); -} +}; CFHTTPRequest.prototype.getAllResponseHeaders = function() { return this._nativeRequest.getAllResponseHeaders(); -} +}; CFHTTPRequest.prototype.overrideMimeType = function(/*String*/ aMimeType) { this._mimeType = aMimeType; -} +}; CFHTTPRequest.prototype.open = function(/*String*/ aMethod, /*String*/ aURL, /*Boolean*/ isAsynchronous, /*String*/ aUser, /*String*/ aPassword) { @@ -215,7 +221,7 @@ CFHTTPRequest.prototype.open = function(/*String*/ aMethod, /*String*/ aURL, /*B this._user = aUser; this._password = aPassword; return this._nativeRequest.open(aMethod, aURL, isAsynchronous, aUser, aPassword); -} +}; CFHTTPRequest.prototype.send = function(/*Object*/ aBody) { @@ -246,23 +252,23 @@ CFHTTPRequest.prototype.send = function(/*Object*/ aBody) // FIXME: Do something more complex, with 404's? this._eventDispatcher.dispatchEvent({ type:"failure", request:this }); } -} +}; CFHTTPRequest.prototype.abort = function() { this._isOpen = false; return this._nativeRequest.abort(); -} +}; CFHTTPRequest.prototype.addEventListener = function(/*String*/ anEventName, /*Function*/ anEventListener) { this._eventDispatcher.addEventListener(anEventName, anEventListener); -} +}; CFHTTPRequest.prototype.removeEventListener = function(/*String*/ anEventName, /*Function*/ anEventListener) { this._eventDispatcher.removeEventListener(anEventName, anEventListener); -} +}; function determineAndDispatchHTTPRequestEvents(/*CFHTTPRequest*/ aRequest) { diff --git a/Objective-J/CFPropertyList.js b/Objective-J/CFPropertyList.js index da935afba..00174387c 100644 --- a/Objective-J/CFPropertyList.js +++ b/Objective-J/CFPropertyList.js @@ -159,7 +159,7 @@ CFPropertyListSerializers[CFPropertyList.FormatXML_v1_0] = "string": function(/*String*/ aString) { - return "" + encodeHTMLComponent(aString) + "";; + return "" + encodeHTMLComponent(aString) + ""; }, "boolean" : function(/*Boolean*/ aBoolean) @@ -297,6 +297,7 @@ var XML_XML = "xml", PLIST_DICTIONARY = "dict", PLIST_ARRAY = "array", PLIST_STRING = "string", + PLIST_DATE = "date", PLIST_BOOLEAN_TRUE = "true", PLIST_BOOLEAN_FALSE = "false", PLIST_NUMBER_REAL = "real", @@ -596,6 +597,10 @@ CFPropertyList.propertyListFromXML = function(/*String | XMLNode*/ aStringOrXMLN object = decodeHTMLComponent(FIRST_CHILD(XMLNode) ? TEXT_CONTENT(XMLNode) : ""); break; + + case PLIST_DATE: var timestamp = Date.parseISO8601(TEXT_CONTENT(XMLNode)); + object = isNaN(timestamp) ? new Date() : new Date(timestamp); + break; case PLIST_BOOLEAN_TRUE: object = YES; break; @@ -603,7 +608,8 @@ CFPropertyList.propertyListFromXML = function(/*String | XMLNode*/ aStringOrXMLN break; case PLIST_DATA: object = new CFMutableData(); - object.bytes = FIRST_CHILD(XMLNode) ? CFData.decodeBase64ToArray(TEXT_CONTENT(XMLNode), YES) : []; + var data_bytes = FIRST_CHILD(XMLNode) ? CFData.decodeBase64ToArray(TEXT_CONTENT(XMLNode), YES) : []; + object.setBytes(data_bytes); break; default: throw new Error("*** " + NODE_NAME(XMLNode) + " tag not recognized in Plist."); diff --git a/Objective-J/CFURL.js b/Objective-J/CFURL.js index b9b5052b5..757af5617 100644 --- a/Objective-J/CFURL.js +++ b/Objective-J/CFURL.js @@ -122,20 +122,19 @@ function CFURLGetParts(/*CFURL*/ aURL) { var split = parts.path.split("/"), pathComponents = parts.pathComponents, - index = 0, count = split.length; - - for (; index < count; ++index) + + for (index = 0; index < count; ++index) { var component = split[index]; - + if (component) pathComponents.push(component); - + else if (index === 0) pathComponents.push("/"); } - + parts.pathComponents = pathComponents; } @@ -160,7 +159,7 @@ GLOBAL(CFURL) = function(/*CFURL|String*/ aURL, /*CFURL*/ aBaseURL) if (aURL instanceof CFURL) { if (!aBaseURL) - return aURL; + return new CFURL(aURL.absoluteString()); var existingBaseURL = aURL.baseURL(); @@ -209,7 +208,7 @@ DISPLAY_NAME(CFURL); CFURL.prototype.UID = function() { return this._UID; -} +}; DISPLAY_NAME(CFURL.prototype.UID); @@ -218,14 +217,14 @@ var URLMap = { }; CFURL.prototype.mappedURL = function() { return URLMap[this.absoluteString()] || this; -} +}; DISPLAY_NAME(CFURL.prototype.mappedURL); CFURL.setMappedURLForURL = function(/*CFURL*/ fromURL, /*CFURL*/ toURL) { URLMap[fromURL.absoluteString()] = toURL; -} +}; DISPLAY_NAME(CFURL.setMappedURLForURL); @@ -243,7 +242,7 @@ CFURL.prototype.schemeAndAuthority = function() string += "//" + authority; return string; -} +}; DISPLAY_NAME(CFURL.prototype.schemeAndAuthority); @@ -253,14 +252,14 @@ CFURL.prototype.absoluteString = function() this._absoluteString = this.absoluteURL().string(); return this._absoluteString; -} +}; DISPLAY_NAME(CFURL.prototype.absoluteString); CFURL.prototype.toString = function() { return this.absoluteString(); -} +}; DISPLAY_NAME(CFURL.prototype.toString); @@ -280,7 +279,7 @@ function resolveURL(aURL) if (parts.scheme || parts.authority) resolvedParts = parts; - + else { resolvedParts = { }; @@ -296,14 +295,14 @@ function resolveURL(aURL) resolvedParts.queryString = parts.queryString; resolvedParts.fragment = parts.fragment; - var pathComponents = parts.pathComponents + var pathComponents = parts.pathComponents; if (pathComponents.length && pathComponents[0] === "/") { resolvedParts.path = parts.path; resolvedParts.pathComponents = pathComponents; } - + else { var basePathComponents = baseParts.pathComponents, @@ -360,7 +359,7 @@ function standardizePathComponents(/*Array*/ pathComponents, /*BOOL*/ inPlace) var component = pathComponents[index]; if (component === "") - continue; + continue; if (component === ".") { @@ -424,7 +423,7 @@ CFURL.prototype.absoluteURL = function() this._absoluteURL = resolveURL(this); return this._absoluteURL; -} +}; DISPLAY_NAME(CFURL.prototype.absoluteURL); @@ -458,7 +457,7 @@ CFURL.prototype.standardizedURL = function() } return this._standardizedURL; -} +}; DISPLAY_NAME(CFURL.prototype.standardizedURL); @@ -466,7 +465,7 @@ function CFURLPartsCreateCopy(parts) { var copiedParts = { }, count = URI_KEYS.length; - + while (count--) { var partName = URI_KEYS[count]; @@ -480,7 +479,7 @@ function CFURLPartsCreateCopy(parts) CFURL.prototype.string = function() { return this._string; -} +}; DISPLAY_NAME(CFURL.prototype.string); @@ -494,7 +493,7 @@ CFURL.prototype.authority = function() var baseURL = this.baseURL(); return baseURL && baseURL.authority() || ""; -} +}; DISPLAY_NAME(CFURL.prototype.authority); @@ -520,21 +519,21 @@ CFURL.prototype.hasDirectoryPath = function() } return hasDirectoryPath; -} +}; DISPLAY_NAME(CFURL.prototype.hasDirectoryPath); CFURL.prototype.hostName = function() { return this.authority(); -} +}; DISPLAY_NAME(CFURL.prototype.hostName); CFURL.prototype.fragment = function() { return PARTS(this).fragment; -} +}; DISPLAY_NAME(CFURL.prototype.fragment); @@ -553,21 +552,40 @@ CFURL.prototype.lastPathComponent = function() } return this._lastPathComponent; -} +}; DISPLAY_NAME(CFURL.prototype.lastPathComponent); CFURL.prototype.path = function() { return PARTS(this).path; -} +}; DISPLAY_NAME(CFURL.prototype.path); +CFURL.prototype.createCopyDeletingLastPathComponent = function() +{ + var parts = PARTS(this), + components = standardizePathComponents(parts.pathComponents, NO); + + if (components.length > 0) + if (components.length > 1 || components[0] !== "/") + components.pop(); + + // pathFromPathComponents() returns an empty path for ["/"] + var isRoot = components.length === 1 && components[0] === "/"; + + parts.pathComponents = components; + parts.path = isRoot ? "/" : pathFromPathComponents(components, NO); + return new CFURL(URLStringFromParts(parts)); +}; + +DISPLAY_NAME(CFURL.prototype.createCopyDeletingLastPathComponent); + CFURL.prototype.pathComponents = function() { return PARTS(this).pathComponents; -} +}; DISPLAY_NAME(CFURL.prototype.pathComponents); @@ -583,14 +601,14 @@ CFURL.prototype.pathExtension = function() var index = lastPathComponent.lastIndexOf("."); return index <= 0 ? "" : lastPathComponent.substring(index + 1); -} +}; DISPLAY_NAME(CFURL.prototype.pathExtension); CFURL.prototype.queryString = function() { return PARTS(this).queryString; -} +}; DISPLAY_NAME(CFURL.prototype.queryString); @@ -613,42 +631,42 @@ CFURL.prototype.scheme = function() } return scheme; -} +}; DISPLAY_NAME(CFURL.prototype.scheme); CFURL.prototype.user = function() { return PARTS(this).user; -} +}; DISPLAY_NAME(CFURL.prototype.user); CFURL.prototype.password = function() { return PARTS(this).password; -} +}; DISPLAY_NAME(CFURL.prototype.password); CFURL.prototype.portNumber = function() { return PARTS(this).portNumber; -} +}; DISPLAY_NAME(CFURL.prototype.portNumber); CFURL.prototype.domain = function() { return PARTS(this).domain; -} +}; DISPLAY_NAME(CFURL.prototype.domain); CFURL.prototype.baseURL = function() { return this._baseURL; -} +}; DISPLAY_NAME(CFURL.prototype.baseURL); @@ -665,7 +683,7 @@ CFURL.prototype.asDirectoryPathURL = function() lastPathComponent = "./" + lastPathComponent; return new CFURL(lastPathComponent + "/", this); -} +}; DISPLAY_NAME(CFURL.prototype.asDirectoryPathURL); @@ -680,14 +698,14 @@ function CFURLGetResourcePropertiesForKeys(/*CFURL*/ aURL) CFURL.prototype.resourcePropertyForKey = function(/*String*/ aKey) { return CFURLGetResourcePropertiesForKeys(this).valueForKey(aKey); -} +}; DISPLAY_NAME(CFURL.prototype.resourcePropertyForKey); CFURL.prototype.setResourcePropertyForKey = function(/*String*/ aKey, /*id*/ aValue) { CFURLGetResourcePropertiesForKeys(this).setValueForKey(aKey, aValue); -} +}; DISPLAY_NAME(CFURL.prototype.setResourcePropertyForKey); @@ -698,6 +716,6 @@ CFURL.prototype.staticResourceData = function() data.setRawString(StaticResource.resourceAtURL(this).contents()); return data; -} +}; DISPLAY_NAME(CFURL.prototype.staticResourceData); diff --git a/Objective-J/CPLog.js b/Objective-J/CPLog.js index 11a3676ee..87e325cc7 100644 --- a/Objective-J/CPLog.js +++ b/Objective-J/CPLog.js @@ -106,16 +106,34 @@ for (var i = 0; i < CPLogLevels.length; i++) var _CPFormatLogMessage = function(aString, aLevel, aTitle) { - var now = new Date(); - aLevel = ( aLevel == null ? '' : ' [' + CPLogColorize(aLevel, aLevel) + ']' ); + var now = new Date(), + titleAndLevel; + + if (aLevel === null) + aLevel = ""; + else + { + aLevel = aLevel || "info"; + aLevel = "[" + CPLogColorize(aLevel, aLevel) + "]"; + } + + aTitle = aTitle || ""; + + if (aTitle && aLevel) + aTitle += " "; + + titleAndLevel = aTitle + aLevel; + + if (titleAndLevel) + titleAndLevel += ": "; if (typeof exports.sprintf == "function") - return exports.sprintf("%4d-%02d-%02d %02d:%02d:%02d.%03d %s%s: %s", + return exports.sprintf("%4d-%02d-%02d %02d:%02d:%02d.%03d %s%s", now.getFullYear(), now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds(), - aTitle, aLevel, aString); + titleAndLevel, aString); else - return now + " " + aTitle + aLevel + ": " + aString; + return now + " " + titleAndLevel + ": " + aString; } // Loggers: @@ -125,16 +143,15 @@ GLOBAL(CPLogConsole) = function(aString, aLevel, aTitle, aFormatter) { if (typeof console != "undefined") { - var message = (aFormatter || _CPFormatLogMessage)(aString, aLevel, aTitle); - - var logger = { - "fatal": "error", - "error": "error", - "warn": "warn", - "info": "info", - "debug": "debug", - "trace": "debug" - }[aLevel]; + var message = (aFormatter || _CPFormatLogMessage)(aString, aLevel, aTitle), + logger = { + "fatal": "error", + "error": "error", + "warn": "warn", + "info": "info", + "debug": "debug", + "trace": "debug" + }[aLevel]; if (logger && console[logger]) console[logger](message); diff --git a/Objective-J/CommonJS/lib/objective-j/compiler.js b/Objective-J/CommonJS/lib/objective-j/compiler.js index d34451446..b55264689 100644 --- a/Objective-J/CommonJS/lib/objective-j/compiler.js +++ b/Objective-J/CommonJS/lib/objective-j/compiler.js @@ -14,13 +14,16 @@ var compressors = { //,yui : { id : "minify/yuicompressor" } // ,cc : { id : "minify/closure-compiler" } }; + var compressorStats = {}; -function compressor(code) { +function compressor(code) +{ var winner, winnerName; compressorStats['original'] = (compressorStats['original'] || 0) + code.length; - for (var name in compressors) { - var compressor = require(compressors[name].id); - var result = compressor.compress(code, { charset : "UTF-8", useServer : true }); + for (var name in compressors) + { + var aCompressor = require(compressors[name].id), + result = aCompressor.compress(code, { charset : "UTF-8", useServer : true }); compressorStats[name] = (compressorStats[name] || 0) + result.length; if (!winner || result < winner.length) { winner = result; @@ -130,6 +133,9 @@ function resolveFlags(args) else if (argument.indexOf("-S") === 0) objjcFlags &= ~ObjectiveJ.Preprocessor.Flags.CheckSyntax; + else if (argument.indexOf("-T") === 0) + objjcFlags |= ObjectiveJ.Preprocessor.Flags.IncludeTypeSignatures; + else if (argument.indexOf("-g") === 0) objjcFlags |= ObjectiveJ.Preprocessor.Flags.IncludeDebugSymbols; @@ -156,7 +162,8 @@ exports.compile = function(aFilePath, flags) exports.main = function(args) { var shouldPrintOutput = false, - asPlainJavascript = false; + asPlainJavascript = false, + objjcFlags = 0; var argv = args.slice(1); @@ -182,12 +189,22 @@ exports.main = function(args) continue; } + if (argv[0] === "-T" || argv[0] === "--incluceTypeSignatures") + { + objjcFlags |= ObjectiveJ.Preprocessor.Flags.IncludeTypeSignatures; + argv.shift(); + continue; + } + if (argv[0] === "--help" || argv[0].substr(0, 1) == '-') { print("Usage: " + args[0] + " [options] [--] file..."); - print(" -p, --print print the output directly to stdout"); - print(" --unmarked don't tag the output with @STATIC header"); - print(" --help print this help"); + print(" -p, --print print the output directly to stdout"); + print(" --unmarked don't tag the output with @STATIC header"); + print(""); + print(" -T, --includeTypeSignatures include type signatures in the compiled output"); + print(""); + print(" --help print this help"); return; } @@ -199,9 +216,9 @@ exports.main = function(args) var resolved = resolveFlags(argv), outputFilePaths = resolved.outputFilePaths, - objjcFlags = resolved.objjcFlags, gccFlags = resolved.gccFlags; + objjcFlags |= resolved.objjcFlags; resolved.filePaths.forEach(function(filePath, index) { if (!shouldPrintOutput) diff --git a/README.markdown b/README.markdown index b0c6fa6d5..5a4c78b13 100644 --- a/README.markdown +++ b/README.markdown @@ -33,7 +33,7 @@ Getting Started --------------- To get started, download and install the current release version of Cappuccino: - $ curl https://raw.github.com/cappuccino/cappuccino/v0.9.5/bootstrap.sh >/tmp/cappuccino_bootstrap.sh && sh /tmp/cappuccino_bootstrap.sh + $ curl https://raw.github.com/cappuccino/cappuccino/v0.9.6-RC1/bootstrap.sh >/tmp/cappuccino_bootstrap.sh && bash /tmp/cappuccino_bootstrap.sh If you'd just like to get started using Cappuccino for your web apps, you are done. diff --git a/Tests/AppKit/CPArrayControllerTest.j b/Tests/AppKit/CPArrayControllerTest.j index 05e75a978..08597ab64 100644 --- a/Tests/AppKit/CPArrayControllerTest.j +++ b/Tests/AppKit/CPArrayControllerTest.j @@ -8,6 +8,7 @@ CPArray _contentArray @accessors(property=contentArray); CPArray observations; + int aCount @accessors; } - (CPArray)makeTestArray @@ -201,12 +202,32 @@ [arrayController setPreservesSelection:NO]; [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(1, 2)]]; - [arrayController removeObjects:[arrayController selectedObjects]] + [arrayController removeObjects:[arrayController selectedObjects]]; [self assert:[CPIndexSet indexSet] equals:[arrayController selectionIndexes] message:@"selection should be empty if arraycontroller doesn't avoid empty selection"]; } +- (void)testRemoveObjectWithAvoidingEmptySelection +{ + var arrayController = [self arrayController]; + [arrayController setAvoidsEmptySelection:YES]; + + [arrayController setSelectionIndex:2]; + [arrayController removeObjectsAtArrangedObjectIndexes:[CPIndexSet indexSetWithIndex:2]]; + + [self assertTrue:([[arrayController selectionIndexes] count] > 0) message:@"Selection should not empty when arraycontroller avoids empty selection"]; + + [arrayController setContent:[self contentArray]]; + [arrayController setSelectionIndex:2]; + [arrayController removeObjects:[arrayController selectedObjects]]; + + [self assertTrue:([[arrayController selectionIndexes] count] > 0) message:@"Selection should not empty when arraycontroller avoids empty selection"]; + +// This will fail, currently we select the first index instead of an adjacent index. +// [self assertTrue:([arrayController selectionIndex] == 1) message:@"The selected index should be 1, was " + [arrayController selectionIndex]]; +} + - (void)testRemoveObjectsWithPreservesSelection_SimpleArray { [self initControllerWithSimpleArray]; @@ -269,6 +290,40 @@ [self assertFalse:[[arrayController arrangedObjects] containsObject:objectToRemove] message:@"removed objects should no longer appear in arrangedObjects"]; } +- (void)testRemove_ +{ + var arrayController = [self arrayController], + objectToRemove = [[arrayController arrangedObjects] objectAtIndex:0]; + + [arrayController setSelectedObjects:[objectToRemove]]; + [arrayController remove:nil]; + + [self assertFalse:[[arrayController arrangedObjects] containsObject:objectToRemove] message:@"removed objects should no longer appear in arrangedObjects"]; +} + +- (void)testRemoveObjectsAtArrangedObjectIndexes_ +{ + var arrayController = [self arrayController]; + + [arrayController removeObjectsAtArrangedObjectIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(1, 2)]]; + + [self assert:1 equals:[[arrayController arrangedObjects] count] message:@"objects should be removed"]; +} + +- (void)testRemoveObjectsAtArrangedObjectIndexes_whenObservingCount +{ + var arrayController = [self arrayController]; + + [arrayController addObserver:self forKeyPath:@"arrangedObjects.name" options:0 context:nil]; + [self bind:@"aCount" toObject:arrayController withKeyPath:@"arrangedObjects.@count" options:nil]; + + // This crashed in a previous version of Cappuccino due to an error in _CPObservableArray's removeObjectAtIndex. + [arrayController removeObjectsAtArrangedObjectIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(1, 2)]]; + + [self assert:1 equals:[[arrayController arrangedObjects] count] message:@"objects should be removed"]; + [self assert:aCount equals:[[arrayController arrangedObjects] count] message:@"count should be updated"]; +} + - (void)testSelectionWhenObjectsDisappear { // If the selected object disappears during a rearrange, the selection @@ -287,9 +342,29 @@ [self assert:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 2)] equals:[arrayController selectionIndexes] message:@"last object cannot be selected"]; } +- (void)testSelectingEmptyIndexesExplicitlyWithAvoidsEmptySelection +{ + var arrayController = [self arrayController]; + [arrayController setAvoidsEmptySelection:YES]; + + [arrayController setSelectionIndex:0]; + [arrayController setSelectionIndexes:[CPIndexSet indexSet]]; + [self assertTrue:([[arrayController selectionIndexes] count] == 0) message:@"Selection should be empty when unselecting explicitly, even with avoidsEmptySelection"]; +} + +- (void)testSelectingEmptyObjectsExplicitlyWithAvoidsEmptySelection +{ + var arrayController = [self arrayController]; + [arrayController setAvoidsEmptySelection:YES]; + + [arrayController setSelectionIndex:0]; + [arrayController setSelectedObjects:[CPArray array]]; + [self assertTrue:([[arrayController selectionIndexes] count] == 0) message:@"Selection should be empty when unselecting explicitly, even with avoidsEmptySelection"]; +} + - (void)testContentBinding { - [[self arrayController] bind:@"contentArray" toObject:self withKeyPath:@"contentArray" options:0]; + [[self arrayController] bind:@"contentArray" toObject:self withKeyPath:@"contentArray" options:nil]; [self assert:[[self arrayController] contentArray] equals:[self contentArray]]; @@ -587,6 +662,25 @@ [self assert:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 4)] equals:indexes]; } +- (void)testBindToNoSelectionMarker +{ + var arrayController1 = [CPArrayController new], + arrayController2 = [CPArrayController new]; + + [arrayController2 setContent:[CPDictionary dictionaryWithObject:[1, 2, 3] forKey:@"x"]]; + + [arrayController1 bind:@"contentArray" toObject:arrayController2 withKeyPath:@"selection.x" options:nil]; + // This used to cause a bug where the _CPKVCArray wrapping the selection proxy tried to call 'count' on + // CPNoSelectionMarker while attempting to copy itself. + [arrayController2 setSelectionIndexes:[CPIndexSet indexSet]]; + + [self assert:[] equals:[arrayController1 arrangedObjects] message:"arranged objects of an empty selection should be empty"]; + + // Make sure the regular case works. + [arrayController2 setSelectionIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 1)]]; + [self assert:[1, 2, 3] equals:[arrayController1 arrangedObjects] message:"normal selection"]; +} + - (void)observeValueForKeyPath:keyPath ofObject:anActivity change:change diff --git a/Tests/AppKit/CPButtonTest.j b/Tests/AppKit/CPButtonTest.j index a859f69f1..eff7f75ec 100644 --- a/Tests/AppKit/CPButtonTest.j +++ b/Tests/AppKit/CPButtonTest.j @@ -41,11 +41,11 @@ [button setAction:@selector(clickMe:)]; [button setKeyEquivalent:"a"]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"b" charactersIgnoringModifiers:"b" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } @@ -57,11 +57,11 @@ [button setKeyEquivalent:"a"]; [button setKeyEquivalentModifierMask:CPAlternateKeyMask]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:CPAlternateKeyMask - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } @@ -73,12 +73,12 @@ [button setKeyEquivalent:"A"]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:CPShiftKeyMask - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"A" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } @@ -89,15 +89,15 @@ [button setAction:@selector(clickMe:)]; [button setKeyEquivalent:CPEscapeFunctionKey]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:CPDeleteCharacter charactersIgnoringModifiers:CPDeleteCharacter isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:CPEscapeFunctionKey charactersIgnoringModifiers:CPEscapeFunctionKey isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } diff --git a/Tests/AppKit/CPCheckBoxTest.j b/Tests/AppKit/CPCheckBoxTest.j new file mode 100644 index 000000000..d2b388dbe --- /dev/null +++ b/Tests/AppKit/CPCheckBoxTest.j @@ -0,0 +1,101 @@ +@import + +[CPApplication sharedApplication] + +@implementation CPCheckBoxTest : OJTestCase +{ +} + +/*! + Verify that CPCheckBox placeholders work, both explicit and default ones. +*/ +- (void)testPlaceholders +{ + var control = [[CPCheckBox alloc] initWithFrame:CGRectMakeZero()]; + [control setAllowsMixedState:YES]; + + content = [ + CPOffState, + CPOnState + ]; + arrayController = [[CPArrayController alloc] initWithContent:content]; + + // First test defaults. + [control bind:CPValueBinding toObject:arrayController withKeyPath:@"selection.self" options:nil]; + + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 2)]]; + [self assert:CPMixedState equals:[control objectValue] message:"default CPMultipleValuesPlaceholderBindingOption placeholder should be 'mixed'"]; + + [arrayController setSelectionIndexes:[CPIndexSet indexSet]]; + [self assert:CPOffState equals:[control objectValue] message:"default CPNoSelectionMarker placeholder should be 'off'"]; + + // There seems to be no obvious way to trigger a CPNullMarker here. Setting an index outside of the allowed range + // results in a no selection marker. In Cocoa, adding a [CPNull null] to the content array just results in it being + // converted (oddly) to CPOnState when in mixed state and an exception when not. The placeholder doesn't play in. + //[arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:2]]; + //[self assert:CPOffState equals:[control objectValue] message:"default CPNullMarker placeholder should be 'off'"]; + + // And just to verify things are making sense. + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]]; + [self assert:CPOffState equals:[control objectValue] message:"content 0 is off"]; + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:1]]; + [self assert:CPOnState equals:[control objectValue] message:"content 1 is on"]; + + [control unbind:CPValueBinding]; + + // Set up a new binding with explicit placeholders, different from the default ones. + var options = [CPDictionary dictionaryWithObjects:[ + CPOffState, + CPOnState, + CPOnState, + CPMixedState + ] forKeys:[ + CPMultipleValuesPlaceholderBindingOption, + CPNoSelectionPlaceholderBindingOption, + CPNotApplicablePlaceholderBindingOption, + CPNullPlaceholderBindingOption + ]]; + + [control bind:CPValueBinding toObject:arrayController withKeyPath:@"selection.self" options:options]; + + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0, 2)]]; + [self assert:CPOffState equals:[control objectValue] message:"explicit CPMultipleValuesPlaceholderBindingOption placeholder should be 'off'"]; + + [arrayController setSelectionIndexes:[CPIndexSet indexSet]]; + [self assert:CPOnState equals:[control objectValue] message:"explicit CPNoSelectionMarker placeholder should be 'on'"]; + + // See note above on how a CPNullPlaceholder is never really triggered for a checkbox. + //[arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:2]]; + //[self assert:CPMixedState equals:[control objectValue] message:"explicit CPNullMarker placeholder should be 'mixed'"]; + + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]]; + [self assert:CPOffState equals:[control objectValue] message:"content 0 is off"]; + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:1]]; + [self assert:CPOnState equals:[control objectValue] message:"content 1 is on"]; +} + +- (void)testTransformValueBinding +{ + var control = [[CPCheckBox alloc] initWithFrame:CGRectMakeZero()]; + + content = [ + [CPDictionary dictionaryWithObject:YES forKey:@"state"], + [CPDictionary dictionaryWithObject:NO forKey:@"state"] + ]; + arrayController = [[CPArrayController alloc] initWithContent:content]; + + // First test defaults. + [control bind:CPValueBinding toObject:arrayController withKeyPath:@"selection.state" options:[CPDictionary dictionaryWithObject:@"CPNegateBoolean" forKey:CPValueTransformerNameBindingOption]]; + + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]]; + [self assert:CPOffState equals:[control objectValue] message:"content[0] is negated"] + [arrayController setSelectionIndexes:[CPIndexSet indexSetWithIndex:1]]; + [self assert:CPOnState equals:[control objectValue] message:"content[1] is negated"] + + [control performClick:nil]; + [self assert:CPOffState equals:[control objectValue] message:"value was changed"] + [self assert:YES equals:[content[1] valueForKey:@"state"] message:"content[1] was negated after change"] +} + +@end + diff --git a/Tests/AppKit/CPCollectionViewTest.j b/Tests/AppKit/CPCollectionViewTest.j index 36a7a787e..eefe2a9bc 100644 --- a/Tests/AppKit/CPCollectionViewTest.j +++ b/Tests/AppKit/CPCollectionViewTest.j @@ -46,7 +46,7 @@ reloadContentCount = [collectionView reloadContentCallCount]; [collectionView setContent:content]; - [self assert:reloadContentCount+1 equals:[collectionView reloadContentCallCount] message:@"first call to setContent should have called reloadContent once"]; + [self assert:reloadContentCount + 1 equals:[collectionView reloadContentCallCount] message:@"first call to setContent should have called reloadContent once"]; [content removeObjectAtIndex:0]; [self assertTrue:[collectionView content] === content message:@"collection view content should be as assigned"]; @@ -54,7 +54,7 @@ // make sure we call reloadContent even when the content hasn't changed for key-value binding compatibility reloadContentCount = [collectionView reloadContentCallCount]; [collectionView setContent:content]; - [self assert:[collectionView reloadContentCallCount] equals:reloadContentCount+1 message:@"subsequent calls to setContent should have called reloadContent once"]; + [self assert:[collectionView reloadContentCallCount] equals:reloadContentCount + 1 message:@"subsequent calls to setContent should have called reloadContent once"]; } - (void)testCallCollectionViewDidChangeSelectionDelegateMethod @@ -86,6 +86,14 @@ [self assert:"selection changed: 1" equals:_globalResults]; } +- (void)testSelectionIndexes +{ + [_collectionView setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]]; + [self assert:[CPIndexSet indexSetWithIndex:0] equals:[_collectionView selectionIndexes]]; + [_collectionView setSelectionIndexes:nil]; + [self assert:[CPIndexSet indexSet] equals:[_collectionView selectionIndexes]]; +} + @end @implementation _CPCollectionViewWithHooks : CPCollectionView diff --git a/Tests/AppKit/CPColorTest.j b/Tests/AppKit/CPColorTest.j index 1eb261fd5..09deb602c 100644 --- a/Tests/AppKit/CPColorTest.j +++ b/Tests/AppKit/CPColorTest.j @@ -26,7 +26,7 @@ // Based on https://gist.github.com/e06f749362cb1166439f by spakanati. var color1 = [CPColor colorWithCSSString:"rgba(127,127,127,1.0)"], color2 = [CPColor colorWithCSSString:"rgba(127, 127, 127, 1.0)"], - color3 = [CPColor colorWithRed:127.0/255.0 green:127.0/255.0 blue:127.0/255.0 alpha:1.0], + color3 = [CPColor colorWithRed:127.0 / 255.0 green:127.0 / 255.0 blue:127.0 / 255.0 alpha:1.0], color4 = [CPColor blackColor]; [self assertTrue:[color1 isEqual:color2] message:"[color1 isEqual:color2]"]; @@ -51,4 +51,20 @@ [self assertFalse:[color4 isEqual:color5] message:"![color4 isEqual:color5]"]; } +- (void)testOutOfRange +{ + var color1 = [CPColor colorWithCalibratedRed:-1.0 green:-1.0 blue:-1.0 alpha:-.05], + color2 = [CPColor colorWithCalibratedRed:1.1 green:1.2 blue:1.3 alpha:1.05]; + + [self assert:0.0 equals:[color1 redComponent] message:"color1 redComponent"]; + [self assert:0.0 equals:[color1 greenComponent] message:"color1 greenComponent"]; + [self assert:0.0 equals:[color1 blueComponent] message:"color1 blueComponent"]; + [self assert:0.0 equals:[color1 alphaComponent] message:"color1 alphaComponent"]; + + [self assert:1.0 equals:[color2 redComponent] message:"color2 redComponent"]; + [self assert:1.0 equals:[color2 greenComponent] message:"color2 greenComponent"]; + [self assert:1.0 equals:[color2 blueComponent] message:"color2 blueComponent"]; + [self assert:1.0 equals:[color2 alphaComponent] message:"color2 alphaComponent"]; +} + @end diff --git a/Tests/AppKit/CPFontTest.j b/Tests/AppKit/CPFontTest.j index aed30aec1..c1ce8c887 100644 --- a/Tests/AppKit/CPFontTest.j +++ b/Tests/AppKit/CPFontTest.j @@ -51,6 +51,39 @@ [self assert:_customFont notEqual:nil]; } +- (void)testConstructorsIsBoldIsItalic +{ + [self testConstructor:@selector(fontWithName:size:) args:["Arial", 12] isBold:NO isItalic:NO]; + [self testConstructor:@selector(boldFontWithName:size:) args:["Arial", 13] isBold:YES isItalic:NO]; + [self testConstructor:@selector(fontWithName:size:italic:) args:["Arial", 14, YES] isBold:NO isItalic:YES]; + [self testConstructor:@selector(boldFontWithName:size:italic:) args:["Arial", 15, NO] isBold:YES isItalic:NO]; +} + +- (void)testConstructor:(SEL)aSelector args:(CPArray)args isBold:(BOOL)bold isItalic:(BOOL)italic +{ + var inv = [CPInvocation invocationWithMethodSignature:nil]; + [inv setTarget:CPFont]; + [inv setSelector:aSelector]; + [args enumerateObjectsUsingBlock:function(arg, idx) + { + [inv setArgument:arg atIndex:idx + 2]; + }]; + + [inv invoke]; + var font = [inv returnValue]; + + [self assertTrue:([font isBold] == bold) message: [font description] + " should be bold: " + bold]; + [self assertTrue:([font isItalic] == italic) message: [font description] + " should be italic: " + italic]; + + // get from cache + [inv invoke]; + var cachedFont = [inv returnValue]; + [self assert:cachedFont equals:font]; + + [self assertTrue:([cachedFont isBold] == bold) message:" cached " + [cachedFont description] + " should be bold: " + bold]; + [self assertTrue:([cachedFont isItalic] == italic) message:" cached " + [cachedFont description] + " should be italic: " + italic]; +} + @end var _CPFontStripRegExp = new RegExp("(^\\s*[\"']?|[\"']?\\s*$)", "g"); diff --git a/Tests/AppKit/CPKeyEquivalentPerformance.j b/Tests/AppKit/CPKeyEquivalentPerformance.j index a6a509437..84ea9e7b1 100644 --- a/Tests/AppKit/CPKeyEquivalentPerformance.j +++ b/Tests/AppKit/CPKeyEquivalentPerformance.j @@ -34,7 +34,7 @@ [button2 setTarget:self]; [button2 setAction:@selector(clicked:)]; [button2 setKeyEquivalent:"a"]; - [button2 setKeyEquivalentModifierMask:CPAlternateKeyMask|CPCommandKeyMask]; + [button2 setKeyEquivalentModifierMask:CPAlternateKeyMask | CPCommandKeyMask]; button2.clicks = 0; [button3 setTarget:self]; @@ -45,16 +45,16 @@ var start = (new Date).getTime(); - for (var i=0; i +@import + +[CPApplication sharedApplication]; + +@implementation CPSplitViewTest : OJTestCase +{ + CPSplitView splitView; + CPView viewA; + CPView viewB; +} + +- (void)setUp +{ + splitView = [[CPSplitView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; + viewA = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 100, 50)]; + viewB = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 100, 50)]; + + [splitView addSubview:viewA]; + [splitView addSubview:viewB]; + [splitView setVertical:NO]; + + [splitView setPosition:50 ofDividerAtIndex:0]; +} + +- (void)testSplitViewResize +{ + [self assert:50 equals:[viewA frameSize].height]; + [self assert:49 equals:[viewB frameSize].height]; + + [splitView setPosition:40 ofDividerAtIndex:0]; + + [self assert:40 equals:[viewA frameSize].height]; + [self assert:59 equals:[viewB frameSize].height]; + + [splitView setFrame:CGRectMake(0, 0, 200, 200)]; + // The extra size should be distributed proportionally to the original sizes of the subviews. + [self assert:80 equals:[viewA frameSize].height]; + [self assert:119 equals:[viewB frameSize].height]; + + // It should work for shrinking as well. + [splitView setFrame:CGRectMake(0, 0, 200, 100)]; + [self assert:40 equals:[viewA frameSize].height]; + [self assert:59 equals:[viewB frameSize].height]; + + // And for multiple areas. + var viewC = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 200, 50)]; + [splitView addSubview:viewC]; + // Force an immediate adjustment of subview sizes. + [splitView viewWillDraw]; + [self assert:26 equals:[viewA frameSize].height message:"adding viewC shrinks viewA"]; + [self assert:39 equals:[viewB frameSize].height message:"adding viewC shrinks viewB"]; + [self assert:33 equals:[viewC frameSize].height message:"new viewC is fit into remaining space"]; + + // Grow with 3 areas. + [splitView setFrame:CGRectMake(0, 0, 200, 200)]; + [self assert:53 equals:[viewA frameSize].height]; + [self assert:79 equals:[viewB frameSize].height]; + [self assert:66 equals:[viewC frameSize].height]; + + // Shrink with 3 areas. + [splitView setFrame:CGRectMake(0, 0, 200, 100)]; + [self assert:26 equals:[viewA frameSize].height]; + [self assert:39 equals:[viewB frameSize].height]; + [self assert:33 equals:[viewC frameSize].height]; +} + +- (void)testSplitView_shouldAdjustSizeOfSubview_ +{ + var dividerThickness = [splitView dividerThickness], + delegate = [CPSplitViewDontResizeTopView new]; + + [splitView setDelegate:delegate]; + [splitView setFrame:CGRectMake(0, 0, 200, 200)]; + + // All the extra height should have gone to the bottom view. + [self assert:50 equals:[viewA frameSize].height]; + [self assert:(150 - dividerThickness) equals:[viewB frameSize].height]; + + // Should work just as well with three views. + var viewC = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 200, 50)]; + [splitView addSubview:viewC]; + [splitView setPosition:50 ofDividerAtIndex:0]; + [splitView setPosition:100 ofDividerAtIndex:1]; + + [self assert:50 equals:[viewA frameSize].height]; + [self assert:49 equals:[viewB frameSize].height]; + [self assert:99 equals:[viewC frameSize].height]; + + // Shrink + [splitView setFrame:CGRectMake(0, 0, 200, 100)]; + [self assert:50 equals:[viewA frameSize].height]; + [self assert:16 equals:[viewB frameSize].height]; + [self assert:32 equals:[viewC frameSize].height]; + + // Crush fixed + [splitView setFrame:CGRectMake(0, 0, 200, 40)]; + [self assert:38 equals:[viewA frameSize].height message:"fixed size area should be forced to fit"]; + [self assert:0 equals:[viewB frameSize].height]; + [self assert:0 equals:[viewC frameSize].height]; + + // Regrow + [splitView setFrame:CGRectMake(0, 0, 200, 100)]; + [self assert:38 equals:[viewA frameSize].height]; + [self assert:30 equals:[viewB frameSize].height]; + [self assert:30 equals:[viewC frameSize].height]; +} + +- (void)testAutosave +{ + // Verify that the split view does not attempt to auto save without an auto save name. + + [[CPUserDefaults standardUserDefaults] setPersistentStoreClass:CPUserDefaultsFailingStore forDomain:CPApplicationDomain reloadData:NO]; + + [splitView setPosition:50 ofDividerAtIndex:0]; + + [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode]; +} + +@end + +@implementation CPSplitViewDontResizeTopView : CPObject +{ +} + +- (BOOL)splitView:(CPSplitView)splitView shouldAdjustSizeOfSubview:(CPView)subview +{ + var subviews = [splitView subviews]; + return (subview !== [subviews firstObject]); +} + +@end +/*! + This store always fails. +*/ +@implementation CPUserDefaultsFailingStore : CPUserDefaultsStore +{ +} + +- (CPData)data +{ + return nil; +} + +- (void)setData:(CPData)aData +{ + [CPException raise:@"CPUnsupportedMethodException" reason:@"Data should not be stored in CPUserDefaultsFailingStore."]; +} + +@end diff --git a/Tests/AppKit/CPTableViewTest.j b/Tests/AppKit/CPTableViewTest.j index 7e0cfd5b9..18c776056 100644 --- a/Tests/AppKit/CPTableViewTest.j +++ b/Tests/AppKit/CPTableViewTest.j @@ -6,6 +6,7 @@ CPTableColumn tableColumn; BOOL doubleActionReceived; + int selectionIsChangingNotificationsReceived; int selectionDidChangeNotificationsReceived; } @@ -51,20 +52,28 @@ [tableView setDataSource:dataSource]; + selectionIsChangingNotificationsReceived = 0; selectionDidChangeNotificationsReceived = 0; + [[CPNotificationCenter defaultCenter] addObserver:self + selector:@selector(selectionIsChanging:) + name:CPTableViewSelectionIsChangingNotification + object:tableView]; + [[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(selectionDidChange:) name:CPTableViewSelectionDidChangeNotification object:tableView]; [tableView selectRowIndexes:[CPIndexSet indexSetWithIndex:2] byExtendingSelection:NO]; - [self assert:selectionDidChangeNotificationsReceived equals:1 message:"CPTableViewSelectionDidChangeNotification expected when selecting rows"]; + [self assert:0 equals:selectionIsChangingNotificationsReceived message:"no isChanging notifications when programmatically selecting rows"]; + [self assert:1 equals:selectionDidChangeNotificationsReceived message:"didChange notifications when selecting rows"]; // If we remove the last row, the selection should change and we should be notified. [[dataSource tableEntries] removeObjectAtIndex:2]; [tableView reloadData]; - [self assert:selectionDidChangeNotificationsReceived equals:2 message:"CPTableViewSelectionDidChangeNotification when selected rows go away"]; + [self assert:0 equals:selectionIsChangingNotificationsReceived message:"no isChanging notifications when selected rows disappear"]; + [self assert:2 equals:selectionDidChangeNotificationsReceived message:"didChange notifications when selected rows disappear"]; [tableView selectRowIndexes:[CPIndexSet indexSetWithIndex:0] byExtendingSelection:NO]; [self assert:selectionDidChangeNotificationsReceived equals:3 message:"CPTableViewSelectionDidChangeNotification expected when selecting rows"]; @@ -72,6 +81,26 @@ [tableView reloadData]; [self assert:selectionDidChangeNotificationsReceived equals:3 message:"no CPTableViewSelectionDidChangeNotification expected when removing a row which does not change the selection"]; + + // Reset everything. + [dataSource setTableEntries:["A", "B", "C"]]; + [tableView reloadData]; + [tableView deselectAll]; + selectionIsChangingNotificationsReceived = 0; + selectionDidChangeNotificationsReceived = 0; + [tableView selectRowIndexes:[CPIndexSet indexSetWithIndex:0] byExtendingSelection:NO]; + [tableView selectRowIndexes:[CPIndexSet indexSetWithIndex:2] byExtendingSelection:NO]; + [self assert:2 equals:selectionDidChangeNotificationsReceived message:"notification for select row 0, 2"]; + + selectionIsChangingNotificationsReceived = 0; + selectionDidChangeNotificationsReceived = 0; + [tableView deselectAll]; + [self assert:selectionDidChangeNotificationsReceived equals:2 message:"notification for deselect all"]; +} + +- (void)selectionIsChanging:(CPNotification)aNotification +{ + selectionIsChangingNotificationsReceived++; } - (void)selectionDidChange:(CPNotification)aNotification @@ -84,7 +113,7 @@ */ - (void)testEditCell { - var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0,0,200,150) + var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0, 0, 200, 150) styleMask:CPWindowNotSizable]; [[theWindow contentView] addSubview:tableView]; @@ -116,6 +145,78 @@ [self assert:[theWindow firstResponder] equals:tableView message:"table view should be first responder after cell edit"]; } +/*! + Verify that all data appears as expected, using the right data views etc. This is a bit of a kitchen + sink test, verifying multiple behaviours of the table view. +*/ +- (void)testLayout +{ + var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(0, 0, 100.0, 100.0)], + tableColumn1 = [[CPTableColumn alloc] initWithIdentifier:@"Bar"]; + [tableView addTableColumn:tableColumn1]; + [scrollView setDocumentView:tableView]; + + [tableColumn setWidth:50.0]; + [tableColumn1 setWidth:50.0]; + + var arrayController = [CPArrayController new], + contentArray = []; + + for (var row = 0; row < 50; row++) + { + var column = row * 2; + contentArray.push([CPDictionary dictionaryWithObjects:["R" + row + "C0", "R" + row + "C1"] forKeys:["c1", "c2"]]); + } + [arrayController setContent:contentArray]; + + [tableColumn bind:CPValueBinding toObject:arrayController withKeyPath:@"arrangedObjects.c1" options:nil]; + [tableColumn1 bind:CPValueBinding toObject:arrayController withKeyPath:@"arrangedObjects.c2" options:nil]; + + [tableColumn setDataView:[CustomTextView0 new]]; + [tableColumn1 setDataView:[CustomTextView1 new]]; + + [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode]; + + [self assert:50 equals:[tableView numberOfRows] message:"tableView numberOfRows should reflect content array length"]; + + function AssertCorrectCellsVisible(startingRow) + { + var allViews = getAllViews(tableView); + + // Sort views from left to right, top to bottom. + [allViews sortUsingFunction:keyViewComparator context:nil]; + + // We only care about the placement of data views - what else the table puts in there is up to it. + [allViews filterUsingPredicate:[CPPredicate predicateWithFormat:@"self.class.description beginswith %@", "CustomTextView"]]; + + for (var i = 0; i < [allViews count]; i++) + { + var view = allViews[i], + column = i % 2, + row = startingRow + Math.floor(i / 2); // Two columns per row. + //CPLog.error([view stringValue] + " frame: " + CPStringFromRect([tableView convertRect:[view frame] toView:nil])); + [self assert:("R" + row + "C" + column) equals:[view stringValue] message:"(" + row + ", " + column + ") string value"]; + [self assert:"CustomTextView" + column equals:[[view class] description] message:"(" + row + ", " + column + ") data view"]; + } + + return allViews; + } + + var allViews = AssertCorrectCellsVisible(0), + visibleHeight = [tableView visibleRect].size.height, + fullRowHeight = [tableView rowHeight] + [tableView intercellSpacing].height, + visibleRows = Math.ceil(visibleHeight / fullRowHeight); + [self assert:2 * visibleRows equals:[allViews count] message:"only as many data views as necessary should be present"]; + + // Now if we scroll down, new views should come in and others should go out. + var rowTwentyFiveAndAHalfY = Math.floor(25.5 * fullRowHeight); + [tableView scrollPoint:CGPointMake(0, rowTwentyFiveAndAHalfY)]; + [[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode]; + + AssertCorrectCellsVisible(25); + [self assert:2 * visibleRows equals:[allViews count] message:"only as many data views as necessary should be present (2)"]; +} + @end @implementation TestDataSource : CPObject @@ -149,4 +250,52 @@ return YES; } -@end \ No newline at end of file +@end + +@implementation CustomTextView0 : CPTextField +@end + +@implementation CustomTextView1 : CPTextField +@end + +var getAllViews = function(aView) +{ + var views = [aView], + subviews = [aView subviews]; + + for (var i = 0, count = [subviews count]; i < count; i++) + views = views.concat(getAllViews(subviews[i])); + + return views; +}; + +var keyViewComparator = function(lhs, rhs, context) +{ + var lhsBounds = [lhs convertRect:[lhs bounds] toView:nil], + rhsBounds = [rhs convertRect:[rhs bounds] toView:nil], + lhsY = CGRectGetMinY(lhsBounds), + rhsY = CGRectGetMinY(rhsBounds), + lhsX = CGRectGetMinX(lhsBounds), + rhsX = CGRectGetMinX(rhsBounds), + intersectsVertically = MIN(CGRectGetMaxY(lhsBounds), CGRectGetMaxY(rhsBounds)) - MAX(lhsY, rhsY); + + // If two views are "on the same line" (intersect vertically), then rely on the x comparison. + if (intersectsVertically > 0) + { + if (lhsX < rhsX) + return CPOrderedAscending; + + if (lhsX === rhsX) + return CPOrderedSame; + + return CPOrderedDescending; + } + + if (lhsY < rhsY) + return CPOrderedAscending; + + if (lhsY === rhsY) + return CPOrderedSame; + + return CPOrderedDescending; +}; diff --git a/Tests/Foundation/CPArrayTest.j b/Tests/Foundation/CPArrayTest.j index b485f5623..e47d73e49 100644 --- a/Tests/Foundation/CPArrayTest.j +++ b/Tests/Foundation/CPArrayTest.j @@ -1,4 +1,3 @@ - @import @@ -494,6 +493,40 @@ [self assert:[tests[index][0] componentsJoinedByString:tests[index][1]] equals:tests[index][2]]; } +- (void)testEnumateObjectsUsingBlock_ +{ + var input0 = [], + input1 = [1, 3, "b"], + output = [CPMutableDictionary dictionary], + outputFunction = function(anObject, idx) + { + [output setValue:anObject forKey:"" + idx]; + }; + + [input0 enumerateObjectsUsingBlock:outputFunction]; + [self assert:0 equals:[output count] message:@"output when enumerating empty array"]; + + [input1 enumerateObjectsUsingBlock:outputFunction]; + [self assert:3 equals:[output count] message:@"output when enumerating input1"]; + [self assert:input1[0] equals:[output valueForKey:"0"] message:@"output[0]"]; + [self assert:input1[1] equals:[output valueForKey:"1"] message:@"output[0]"]; + [self assert:input1[2] equals:[output valueForKey:"2"] message:@"output[0]"]; + + stoppingFunction = function(anObject, idx, stop) + { + [output setValue:anObject forKey:"" + idx]; + if ([output count] > 1) + stop(YES); // AT_DEREF(stop, YES) - FIXME Replace with proper @ref @deref when in ObjJ. + } + output = [CPMutableDictionary dictionary]; + + [input1 enumerateObjectsUsingBlock:stoppingFunction]; + [self assert:2 equals:[output count] message:@"output when enumerating input1 and stopping after 2"]; + [self assert:input1[0] equals:[output valueForKey:"0"] message:@"output[0]"]; + [self assert:input1[1] equals:[output valueForKey:"1"] message:@"output[0]"]; +} + + @end @implementation AlwaysEqual : CPObject diff --git a/Tests/Foundation/CPDataTest.j b/Tests/Foundation/CPDataTest.j index 7c081904c..f63baaad8 100644 --- a/Tests/Foundation/CPDataTest.j +++ b/Tests/Foundation/CPDataTest.j @@ -66,4 +66,40 @@ [self assertNull:[data plistObject]]; } +- (void)test_CPData_accessors +{ + var rawString = "cappuccino", + bytes = [99, 97, 112, 112, 117, 99, 99, 105, 110, 111], + base64 = "Y2FwcHVjY2lubw=="; + + var data = [CPData dataWithBase64:base64]; + [self assert:rawString equals:[data rawString]]; + + data = [CPData dataWithBase64:base64]; + [self assert:bytes equals:[data bytes]]; + + data = [CPData dataWithBase64:base64]; + [self assert:base64 equals:[data base64]]; + + + data = [CPData dataWithRawString:rawString]; + [self assert:rawString equals:[data rawString]]; + + data = [CPData dataWithRawString:rawString]; + [self assert:bytes equals:[data bytes]]; + + data = [CPData dataWithRawString:rawString]; + [self assert:base64 equals:[data base64]]; + + + data = [CPData dataWithBytes:bytes]; + [self assert:rawString equals:[data rawString]]; + + data = [CPData dataWithBytes:bytes]; + [self assert:bytes equals:[data bytes]]; + + data = [CPData dataWithBytes:bytes]; + [self assert:base64 equals:[data base64]]; +} + @end diff --git a/Tests/Foundation/CPIndexSetTest.j b/Tests/Foundation/CPIndexSetTest.j index b4389a7ed..654116773 100644 --- a/Tests/Foundation/CPIndexSetTest.j +++ b/Tests/Foundation/CPIndexSetTest.j @@ -3,7 +3,6 @@ function descriptionWithoutEntity(aString) { var descriptionWithEntity = [aString description]; -//print(descriptionWithEntity); return descriptionWithEntity.substr(descriptionWithEntity.indexOf('>') + 1); } @@ -239,17 +238,17 @@ function descriptionWithoutEntity(aString) - (void)testInitWithIndexSet { - var set1 = [[CPIndexSet alloc] initWithIndexesInRange:CPMakeRange(0, 7)]; - var set = [[CPIndexSet alloc] initWithIndexSet:set1]; + var set1 = [[CPIndexSet alloc] initWithIndexesInRange:CPMakeRange(0, 7)], + set = [[CPIndexSet alloc] initWithIndexSet:set1]; [self assertNotNull:set]; [self testIndexSet:set containsRange:CPMakeRange(0, 7)]; } - (void)testIsEqualToIndexSet { - var set1 = [CPIndexSet indexSetWithIndex:7]; - var set2 = [CPIndexSet indexSetWithIndex:7]; - var set3 = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(7, 2)]; + var set1 = [CPIndexSet indexSetWithIndex:7], + set2 = [CPIndexSet indexSetWithIndex:7], + set3 = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(7, 2)]; [self assertFalse:[set1 isEqualToIndexSet:nil]]; [self assertTrue:[set1 isEqualToIndexSet:set2]]; @@ -259,9 +258,9 @@ function descriptionWithoutEntity(aString) - (void)testIsEqual { - var set1 = [CPIndexSet indexSetWithIndex:7]; - var set2 = [CPIndexSet indexSetWithIndex:7]; - var set3 = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(7, 2)]; + var set1 = [CPIndexSet indexSetWithIndex:7], + set2 = [CPIndexSet indexSetWithIndex:7], + set3 = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(7, 2)]; [self assertFalse:[set1 isEqual:nil]]; [self assertFalse:[set1 isEqual:7]]; @@ -272,8 +271,8 @@ function descriptionWithoutEntity(aString) - (void)testCount { - var set = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(7, 2)]; - var set2 = [CPIndexSet indexSetWithIndex:7]; + var set = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(7, 2)], + set2 = [CPIndexSet indexSetWithIndex:7]; [self assert:[set2 count] equals:1]; [self assert:[set count] equals:2]; @@ -414,6 +413,136 @@ function descriptionWithoutEntity(aString) [self assertTrue:[_set isEqualToIndexSet:_set]]; } +- (void)testEnumerateIndexesUsingBlock_ +{ + var set0 = [CPIndexSet indexSet], + set1 = [CPMutableIndexSet indexSet], + set2 = [CPMutableIndexSet indexSet]; + + [set1 addIndexesInRange:CPMakeRange(3, 2)]; + + [set2 addIndexesInRange:CPMakeRange(3, 2)]; + [set2 addIndexesInRange:CPMakeRange(0, 1)]; + + var visitedIndexes = [], + aBlock; + + aBlock = function(idx) + { + visitedIndexes.push(idx); + }; + + [set0 enumerateIndexesUsingBlock:aBlock]; + [self assert:[] equals:visitedIndexes message:"enumerate empty set"]; + + [set1 enumerateIndexesUsingBlock:aBlock]; + [self assert:[3, 4] equals:visitedIndexes message:"enumerate " + [set1 description]]; + + visitedIndexes = []; + [set2 enumerateIndexesUsingBlock:aBlock]; + [self assert:[0, 3, 4] equals:visitedIndexes message:"enumerate " + [set2 description]]; +} + +- (void)testEnumerateIndexesWithOptions_usingBlock_ +{ + var set0 = [CPIndexSet indexSet], + set1 = [CPMutableIndexSet indexSet], + set2 = [CPMutableIndexSet indexSet]; + + [set1 addIndexesInRange:CPMakeRange(3, 2)]; + + [set2 addIndexesInRange:CPMakeRange(3, 2)]; + [set2 addIndexesInRange:CPMakeRange(0, 1)]; + + var visitedIndexes = [], + aBlock; + + aBlock = function(idx) + { + visitedIndexes.push(idx); + }; + + [set0 enumerateIndexesWithOptions:CPEnumerationNormal usingBlock:aBlock]; + [self assert:[] equals:visitedIndexes message:"enumerate empty set"]; + + [set1 enumerateIndexesWithOptions:CPEnumerationNormal usingBlock:aBlock]; + [self assert:[3, 4] equals:visitedIndexes message:"enumerate " + [set1 description]]; + + visitedIndexes = []; + [set2 enumerateIndexesWithOptions:CPEnumerationNormal usingBlock:aBlock]; + [self assert:[0, 3, 4] equals:visitedIndexes message:"enumerate " + [set2 description]]; + + visitedIndexes = []; + [set0 enumerateIndexesWithOptions:CPEnumerationReverse usingBlock:aBlock]; + [self assert:[] equals:visitedIndexes message:"reverse enumerate empty set"]; + + visitedIndexes = []; + [set1 enumerateIndexesWithOptions:CPEnumerationReverse usingBlock:aBlock]; + [self assert:[4, 3] equals:visitedIndexes message:"reverse enumerate " + [set1 description]]; + + visitedIndexes = []; + [set2 enumerateIndexesWithOptions:CPEnumerationReverse usingBlock:aBlock]; + [self assert:[4, 3, 0] equals:visitedIndexes message:"reverse enumerate " + [set2 description]]; +} + +- (void)testEnumerateIndexesInRange_options_usingBlock_ +{ + var set0 = [CPIndexSet indexSet], + set1 = [CPMutableIndexSet indexSet], + set2 = [CPMutableIndexSet indexSet]; + + [set1 addIndexesInRange:CPMakeRange(3, 2)]; + + [set2 addIndexesInRange:CPMakeRange(3, 2)]; + [set2 addIndexesInRange:CPMakeRange(0, 1)]; + + var visitedIndexes = [], + aBlock; + + aBlock = function(idx) + { + visitedIndexes.push(idx); + }; + + visitedIndexes = []; + [set0 enumerateIndexesInRange:CPMakeRange(0, 4) options:CPEnumerationReverse usingBlock:aBlock]; + [self assert:[] equals:visitedIndexes message:"reverse enumerate in range empty set"]; + + visitedIndexes = []; + [set1 enumerateIndexesInRange:CPMakeRange(0, 5) options:CPEnumerationReverse usingBlock:aBlock]; + [self assert:[4, 3] equals:visitedIndexes message:"reverse enumerate in range " + [set1 description]]; + + visitedIndexes = []; + [set1 enumerateIndexesInRange:CPMakeRange(0, 4) options:CPEnumerationReverse usingBlock:aBlock]; + [self assert:[3] equals:visitedIndexes message:"reverse enumerate in range " + [set1 description]]; + + visitedIndexes = []; + [set2 addIndexesInRange:CPMakeRange(7, 2)]; + [set2 enumerateIndexesInRange:CPMakeRange(2, 4) options:CPEnumerationReverse usingBlock:aBlock]; + [self assert:[4, 3] equals:visitedIndexes message:"reverse enumerate " + [set2 description]]; +} + +- (void)testEnumerateIndexesAndStop +{ + var set0 = [CPMutableIndexSet indexSet]; + + [set0 addIndexesInRange:CPMakeRange(3, 2)]; + [set0 addIndexesInRange:CPMakeRange(0, 1)]; + + var visitedIndexes = [], + aBlock; + + aBlock = function(idx, /* ref */ stop) + { + visitedIndexes.push(idx); + if (visitedIndexes.length >= 2) + stop(YES); // AT_DEREF(stop, YES) - FIXME Replace with proper @ref @deref when in ObjJ. + } + + [set0 enumerateIndexesUsingBlock:aBlock]; + [self assert:[0, 3] equals:visitedIndexes message:"enumeration should stop after 2 results"]; +} + - (void)tearDown { _set = nil; diff --git a/Tests/Foundation/CPKVCArrayTest.j b/Tests/Foundation/CPKVCArrayTest.j index 52f087856..6b893d9bc 100644 --- a/Tests/Foundation/CPKVCArrayTest.j +++ b/Tests/Foundation/CPKVCArrayTest.j @@ -2,8 +2,9 @@ var COUNTER; @implementation CPKVCArrayTest : OJTestCase { - TestObject _object @accessors(property=object); - ImplementedTestObject _implementedObject @accessors(property=implementedObject); + TestObject _object @accessors(property=object); + ImplementedTestObject _implementedObject @accessors(property=implementedObject); + CPArray _kvcArray @accessors(property=kvcArray); } - (void)setUp @@ -298,11 +299,45 @@ var COUNTER; message:@"replaceObjectInValuesAtIndexes:withValues: should have been called once"]; } +- (void)testKVCArrayOperators +{ + var one = [1, 1, 1, 1, 1, 1, 1, 1], + two = [1, 2, 3, 4, 8, 0]; + + [self assert:[one valueForKey:"@count"] equals:8]; + [self assert:[one valueForKeyPath:"@sum.intValue"] equals:8]; + [self assert:[two valueForKeyPath:"@avg.intValue"] equals:3]; + [self assert:[two valueForKeyPath:"@max.intValue"] equals:8]; + [self assert:[two valueForKeyPath:"@min.intValue"] equals:0]; + + var a = [A new]; + [a setValue:one forKey:"b"]; + [self assert:[a valueForKeyPath:"b.@count"] equals:8]; + [self assert:[a valueForKeyPath:"b.@sum.intValue"] equals:8]; + + var b = []; + [b addObject:[CPDictionary dictionaryWithObjects:[@"Tom", 27] forKeys:[@"name", @"age"]]]; + [b addObject:[CPDictionary dictionaryWithObjects:[@"Dick", 31] forKeys:[@"name", @"age"]]]; + [b addObject:[CPDictionary dictionaryWithObjects:[@"Harry", 47] forKeys:[@"name", @"age"]]]; + [self assert:[b valueForKeyPath:@"@sum.age"] equals:105]; + [self assert:[b valueForKeyPath:@"@avg.age"] equals:35]; + [self assert:[b valueForKeyPath:@"@min.age"] equals:27]; + [self assert:[b valueForKeyPath:@"@max.age"] equals:47]; + [self assert:[b valueForKeyPath:@"@min.name"] equals:@"Dick"]; + [self assert:[b valueForKeyPath:@"@max.name"] equals:@"Tom"]; +} + +@end + +@implementation A : CPObject +{ + id b; +} @end @implementation TestObject : CPObject { - CPArray _values @accessors(property=values); + CPArray _values @accessors(property=values); } - (id)init @@ -393,4 +428,4 @@ var COUNTER; [[self values] replaceObjectsAtIndexes:theIndexes withObjects:theObjects]; } -@end \ No newline at end of file +@end diff --git a/Tests/Foundation/CPKVOTest.j b/Tests/Foundation/CPKVOTest.j index 55cde1709..5dde8c147 100644 --- a/Tests/Foundation/CPKVOTest.j +++ b/Tests/Foundation/CPKVOTest.j @@ -382,23 +382,6 @@ [self assertTrue: _sawObservation message:"Never recieved an observation"]; } -- (void)testKVCArrayOperators -{ - var one = [1, 1, 1, 1, 1, 1, 1, 1], - two = [1, 2, 3, 4, 8, 0]; - - [self assert:[one valueForKey:"@count"] equals:8]; - [self assert:[one valueForKeyPath:"@sum.intValue"] equals:8]; - [self assert:[two valueForKeyPath:"@avg.intValue"] equals:3]; - [self assert:[two valueForKeyPath:"@max.intValue"] equals:8]; - [self assert:[two valueForKeyPath:"@min.intValue"] equals:0]; - - var a = [A new]; - [a setValue:one forKey:"b"]; - [self assert:[a valueForKeyPath:"b.@count"] equals:8]; - [self assert:[a valueForKeyPath:"b.@sum.intValue"] equals:8]; -} - - (void)testPerformance { bob = [PersonTester new]; diff --git a/Tests/Foundation/CPKeyValueCodingTest.j b/Tests/Foundation/CPKeyValueCodingTest.j index 066f6e84b..fd62a0138 100644 --- a/Tests/Foundation/CPKeyValueCodingTest.j +++ b/Tests/Foundation/CPKeyValueCodingTest.j @@ -26,18 +26,18 @@ var accessIVARS = YES; @implementation KVCTestClass : CPObject { - id _privatePropertyWithoutAccessors; - id publicPropertyWithoutAccessors; - id _isPrivateBoolPropertyWithoutAccessors; - id isPublicBoolPropertyWithoutAccessors; + id _privatePropertyWithoutAccessors; + id publicPropertyWithoutAccessors; + id _isPrivateBoolPropertyWithoutAccessors; + id isPublicBoolPropertyWithoutAccessors; //use triple underscore to avoid direct access to instance variables - id ___propertyWithPublicGetAccessor @accessors(getter=getPropertyWithPublicGetAccessor); - id ___propertyWithPublicAccessor @accessors(getter=propertyWithPublicAccessor, setter=setPropertyWithPublicAccessor:); - id ___propertyWithPublicBoolAccessor @accessors(getter=isPropertyWithPublicBoolAccessor); - id ___propertyWithPrivateGetAccessor @accessors(getter=_getPropertyWithPrivateGetAccessor); - id ___propertyWithPrivateAccessor @accessors(getter=_propertyWithPrivateAccessor, setter=_setPropertyWithPrivateAccessor:); - id ___propertyWithPrivateBoolAccessor @accessors(getter=_isPropertyWithPrivateBoolAccessor); + id ___propertyWithPublicGetAccessor @accessors(getter=getPropertyWithPublicGetAccessor); + id ___propertyWithPublicAccessor @accessors(getter=propertyWithPublicAccessor, setter=setPropertyWithPublicAccessor:); + id ___propertyWithPublicBoolAccessor @accessors(getter=isPropertyWithPublicBoolAccessor); + id ___propertyWithPrivateGetAccessor @accessors(getter=_getPropertyWithPrivateGetAccessor); + id ___propertyWithPrivateAccessor @accessors(getter=_propertyWithPrivateAccessor, setter=_setPropertyWithPrivateAccessor:); + id ___propertyWithPrivateBoolAccessor @accessors(getter=_isPropertyWithPrivateBoolAccessor); } + (BOOL)accessInstanceVariablesDirectly @@ -52,7 +52,7 @@ var accessIVARS = YES; - (id)init { - if(self = [super init]) + if (self = [super init]) { _privatePropertyWithoutAccessors = "_privatePropertyWithoutAccessors"; publicPropertyWithoutAccessors = "publicPropertyWithoutAccessors"; @@ -213,8 +213,8 @@ var accessIVARS = YES; "privateBoolPropertyWithoutAccessors","publicBoolPropertyWithoutAccessors", "propertyWithPublicGetAccessor", "propertyWithPublicAccessor","propertyWithPublicBoolAccessor", "propertyWithPrivateGetAccessor", "propertyWithPrivateAccessor", "propertyWithPrivateBoolAccessor" - ]; - var dictForKeys = [kvcTestObject dictionaryWithValuesForKeys: allKeys]; + ], + dictForKeys = [kvcTestObject dictionaryWithValuesForKeys: allKeys]; [self assert: [allKeys count] equals: [dictForKeys count]]; } @@ -226,10 +226,13 @@ var accessIVARS = YES; "privateBoolPropertyWithoutAccessors","publicBoolPropertyWithoutAccessors", "propertyWithPublicGetAccessor", "propertyWithPublicAccessor","propertyWithPublicBoolAccessor", "propertyWithPrivateGetAccessor", "propertyWithPrivateAccessor", "propertyWithPrivateBoolAccessor" - ]; - var dictForKeys = [kvcTestObject dictionaryWithValuesForKeys: allKeys]; - var key, value, keyEnumerator = [dictForKeys keyEnumerator]; - while(key = [keyEnumerator nextObject]) + ], + dictForKeys = [kvcTestObject dictionaryWithValuesForKeys: allKeys], + key, + value, + keyEnumerator = [dictForKeys keyEnumerator]; + + while ((key = [keyEnumerator nextObject]) !== nil) { value = [dictForKeys objectForKey: key]; [self assert: [kvcTestObject valueForKey: key] same: value]; @@ -343,25 +346,25 @@ var accessIVARS = YES; { [KVCTestClass setAccessInstanceVariablesDirectly: YES]; - var value = @"aValue"; - var allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", + var value = @"aValue", + allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", "privateBoolPropertyWithoutAccessors","publicBoolPropertyWithoutAccessors", "propertyWithPublicAccessor","propertyWithPrivateAccessor" - ]; - var allValues = [value,value,value,value,value,value]; - var dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; + ], + allValues = [value, value, value, value, value, value], + dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; [self assertNoThrow:function(){[kvcTestObject setValuesForKeysWithDictionary: dictForKeys];}]; } - (void)testIfSetValuesForKeysWithDictionaryDoesThrowUndefinedKeyExceptionBecauseOfProhibitedDirectInstanceVariableAccess { - var value = @"aValue"; - var allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", + var value = @"aValue", + allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", "privateBoolPropertyWithoutAccessors","publicBoolPropertyWithoutAccessors", "propertyWithPublicAccessor","propertyWithPrivateAccessor" - ]; - var allValues = [value,value,value,value,value,value]; - var dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; + ], + allValues = [value, value, value, value, value, value], + dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; [self assertThrows:function(){[kvcTestObject setValuesForKeysWithDictionary: dictForKeys];}]; } @@ -369,17 +372,20 @@ var accessIVARS = YES; { [KVCTestClass setAccessInstanceVariablesDirectly: YES]; - var value = @"aValue"; - var allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", + var value = @"aValue", + allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", "privateBoolPropertyWithoutAccessors","publicBoolPropertyWithoutAccessors", "propertyWithPublicAccessor","propertyWithPrivateAccessor" - ]; - var allValues = [value,value,value,value,value,value]; - var dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; + ], + allValues = [value, value, value, value, value, value], + dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; [kvcTestObject setValuesForKeysWithDictionary: dictForKeys]; - var key, aValue, keyEnumerator = [dictForKeys keyEnumerator]; - while(key = [keyEnumerator nextObject]) + var key, + aValue, + keyEnumerator = [dictForKeys keyEnumerator]; + + while ((key = [keyEnumerator nextObject]) !== nil) { aValue = [dictForKeys objectForKey: key]; [self assert: [kvcTestObject valueForKey: key] same: aValue]; @@ -406,10 +412,13 @@ var accessIVARS = YES; var allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", "privateBoolPropertyWithoutAccessors","publicBoolPropertyWithoutAccessors", "propertyWithPublicAccessor", "propertyWithPrivateAccessor" - ]; - var dictForKeys = [kvcTestObject dictionaryWithValuesForKeys: allKeys]; - var key, value, keyEnumerator = [dictForKeys keyEnumerator]; - while(key = [keyEnumerator nextObject]) + ], + dictForKeys = [kvcTestObject dictionaryWithValuesForKeys: allKeys], + key, + value, + keyEnumerator = [dictForKeys keyEnumerator]; + + while ((key = [keyEnumerator nextObject]) !== nil) { value = [dictForKeys objectForKey: key]; [self assert: [CPNull null] same:value ]; @@ -420,13 +429,13 @@ var accessIVARS = YES; { [KVCTestClass setAccessInstanceVariablesDirectly: YES]; - var value = [CPNull null]; - var allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", + var value = [CPNull null], + allKeys = [ "privatePropertyWithoutAccessors","publicPropertyWithoutAccessors", "privateBoolPropertyWithoutAccessors","publicBoolPropertyWithoutAccessors", "propertyWithPublicAccessor","propertyWithPrivateAccessor" - ]; - var allValues = [value,value,value,value,value,value]; - var dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; + ], + allValues = [value,value,value,value,value,value], + dictForKeys = [CPDictionary dictionaryWithObjects: allValues forKeys: allKeys]; [kvcTestObject setValuesForKeysWithDictionary: dictForKeys]; [self assertNull: [kvcTestObject valueForKey: "privatePropertyWithoutAccessors"]]; diff --git a/Tests/Foundation/CPKeyValueObservingTest.j b/Tests/Foundation/CPKeyValueObservingTest.j index 2d409618f..55c9f5f9d 100644 --- a/Tests/Foundation/CPKeyValueObservingTest.j +++ b/Tests/Foundation/CPKeyValueObservingTest.j @@ -193,11 +193,37 @@ notSame:class_getInstanceMethod([object class], removeSelector)]; } +- (void)testAutomaticallyNotifiesObserversOf +{ + var test = [ObservingTester new]; + + [test addObserver:self forKeyPath:@"cheese" options:0 context:nil]; + [test addObserver:self forKeyPath:@"astronaut" options:0 context:nil]; + + // Cheese shouldn't have been affected. + [test setCheese:@"changed cheese"]; + [self assert:@"cheese" equals:_lastKeyPath] + [self assert:test equals:_lastObject]; + + // Cheese shouldn't have been affected. + [test setAstronaut:@"Armstrong"]; + // Nothing should have been observed because we don't automatically notify + // and we didn't call will/didChange. + [self assert:@"cheese" equals:_lastKeyPath message:"no observation when automatically notifies is off"]; + [self assert:test equals:_lastObject]; +} + @end @implementation ObservingTester : CPObject { id cheese; + id astronaut @accessors; +} + ++ (BOOL)automaticallyNotifiesObserversOfAstronaut +{ + return NO; } + (id)testerWithCheese:(id)aCheese diff --git a/Tests/Foundation/CPKeyedArchiverTest.j b/Tests/Foundation/CPKeyedArchiverTest.j index ea61e832e..b9ecef51c 100644 --- a/Tests/Foundation/CPKeyedArchiverTest.j +++ b/Tests/Foundation/CPKeyedArchiverTest.j @@ -12,7 +12,7 @@ [original setAJsObject:{ 'top': 5 }]; - var decoded = [CPKeyedUnarchiver unarchiveObjectWithData:[CPKeyedArchiver archivedDataWithRootObject:original]] + var decoded = [CPKeyedUnarchiver unarchiveObjectWithData:[CPKeyedArchiver archivedDataWithRootObject:original]]; [self assert:5 equals:[decoded aJsObject].top message:"JS object encoded and decoded right"]; } diff --git a/Tests/Foundation/CPObjectTest.j b/Tests/Foundation/CPObjectTest.j index 950948c5f..8de2fe4b4 100644 --- a/Tests/Foundation/CPObjectTest.j +++ b/Tests/Foundation/CPObjectTest.j @@ -33,6 +33,23 @@ [self assert:[CPObject version] equals:newVersion]; } +- (void)testMultipleArgumentPerformSelector +{ + var receiver = [[Receiver alloc] init]; + + var value1 = "a", + value2 = "b", + value3 = "c", + value4 = "d", + selector = @selector(implements:multiple:argument:selector:); + + var returnValue = [receiver performSelector:selector withObjects:value1, value2, value3, value4]; + + var expectedReturnValue = value1 + value2 + value3 + value4; + + [self assertTrue:expectedReturnValue === returnValue]; +} + @end @implementation SuperReceiver : CPObject @@ -59,4 +76,9 @@ - (void)implementedInReceiverOnly { } + +- (id)implements:(id)a multiple:(id)b argument:(id)c selector:(id)d +{ + return a + b + c + d; +} @end diff --git a/Tests/Foundation/CPSetTest.j b/Tests/Foundation/CPSetTest.j index db4affdc7..8bd32e3f1 100644 --- a/Tests/Foundation/CPSetTest.j +++ b/Tests/Foundation/CPSetTest.j @@ -235,4 +235,30 @@ [self assertSet:set onlyHasObjects:["horizon", "surfer", "7"]]; } +- (void)testKVCSetOperators +{ + var one = [CPSet setWithArray:[@"one", @"two", @"three"]], + two = [CPSet setWithArray:[1, 2, 3, 4, 8, 0]]; + + [self assert:[one valueForKey:"@count"] equals:3]; + [self assert:[two valueForKey:"@count"] equals:6]; + [self assert:[two valueForKeyPath:"@sum.intValue"] equals:18]; + [self assert:[two valueForKeyPath:"@avg.doubleValue"] equals:3.0]; + [self assert:[one valueForKeyPath:"@max.description"] equals:@"two"]; + [self assert:[two valueForKeyPath:"@max.intValue"] equals:8]; + [self assert:[one valueForKeyPath:"@min.description"] equals:@"one"]; + [self assert:[two valueForKeyPath:"@min.intValue"] equals:0]; + + var b = [CPSet set]; + [b addObject:[CPDictionary dictionaryWithObjects:[@"Tom", 27] forKeys:[@"name", @"age"]]]; + [b addObject:[CPDictionary dictionaryWithObjects:[@"Dick", 31] forKeys:[@"name", @"age"]]]; + [b addObject:[CPDictionary dictionaryWithObjects:[@"Harry", 47] forKeys:[@"name", @"age"]]]; + [self assert:[b valueForKeyPath:@"@sum.age"] equals:105]; + [self assert:[b valueForKeyPath:@"@avg.age"] equals:35]; + [self assert:[b valueForKeyPath:@"@min.age"] equals:27]; + [self assert:[b valueForKeyPath:@"@max.age"] equals:47]; + [self assert:[b valueForKeyPath:@"@min.name"] equals:@"Dick"]; + [self assert:[b valueForKeyPath:@"@max.name"] equals:@"Tom"]; +} + @end diff --git a/Tests/Foundation/CPURLTest.j b/Tests/Foundation/CPURLTest.j index 15bd5587d..250265917 100644 --- a/Tests/Foundation/CPURLTest.j +++ b/Tests/Foundation/CPURLTest.j @@ -103,6 +103,24 @@ var exampleProtocol = "http", [self assert:[url lastPathComponent] equals:examplePathRelative]; } +- (void)testDeleteComponent +{ + var url = [CPURL URLWithString:exampleFullPath]; + + url = [url URLByDeletingLastPathComponent]; + [self assert:[url absoluteString] equals:examplePathBase.substring(0, examplePathBase.length - 1)]; + + url = [url URLByDeletingLastPathComponent]; + [self assert:[url absoluteString] equals:@"/"]; + + url = [url URLByDeletingLastPathComponent]; + [self assert:[url absoluteString] equals:@"/"]; + + url = [CPURL URLWithString:@"foo"]; + url = [url URLByDeletingLastPathComponent]; + [self assert:[url absoluteString] equals:@""]; +} + - (void)testURLToString { [self assert:String([CPURL URLWithString:exampleURL]) equals:exampleURL]; diff --git a/Tests/Manual/CPBinder-echo-bug/AppController.j b/Tests/Manual/CPBinder-echo-bug/AppController.j new file mode 100644 index 000000000..1d6682e60 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/AppController.j @@ -0,0 +1,65 @@ +/* + * AppController.j + * CPBinder-echo-bug + * + * Created by You on March 29, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ + var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], + contentView = [theWindow contentView]; + + var message = [[CPTextField alloc] initWithFrame:CGRectMake(10,10,1000,32)]; + [message setFont:[CPFont boldSystemFontOfSize:16.0]]; + [message setStringValue:@"Type some text in the text field and press enter. You should NOT see any new call to -setObjectValue: in the console"]; + [contentView addSubview:message]; + + var label = [[TextField alloc] initWithFrame:CGRectMake(0,0,400,22)]; + [label setPlaceholderString:@"Type some text and hit enter"]; + [label setBezeled:YES]; + [label setBezelStyle:CPTextFieldSquareBezel]; + [label setBordered:YES]; + [label setEditable:YES]; + + var oc = [[CPObjectController alloc] initWithContent:[CPDictionary dictionaryWithObject:@"" forKey:@"foo"]]; + [oc setAutomaticallyPreparesContent:YES]; + + [label bind:CPValueBinding toObject:oc withKeyPath:@"selection.foo" options:nil]; + [label setFont:[CPFont boldSystemFontOfSize:24.0]]; + [label setBackgroundColor:[CPColor greenColor]]; + [label sizeToFit]; + + [label setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; + [label setCenter:[contentView center]]; + + [contentView addSubview:label]; + + [theWindow orderFront:self]; + + // Uncomment the following line to turn on the standard menu bar. + //[CPMenu setMenuBarVisible:YES]; +} + +@end + +@implementation TextField : CPTextField +{ +} + +- (void)setObjectValue:(id)aValue +{ + CPLogConsole(_cmd + [super objectValue] + " > " + aValue); + [self setBackgroundColor:[CPColor redColor]]; + [super setObjectValue:aValue]; +} + +@end diff --git a/Tests/Manual/TableTest/HeaderView-CornerView/Info.plist b/Tests/Manual/CPBinder-echo-bug/Info.plist similarity index 89% rename from Tests/Manual/TableTest/HeaderView-CornerView/Info.plist rename to Tests/Manual/CPBinder-echo-bug/Info.plist index ef35fb10e..6937aee46 100644 --- a/Tests/Manual/TableTest/HeaderView-CornerView/Info.plist +++ b/Tests/Manual/CPBinder-echo-bug/Info.plist @@ -5,7 +5,7 @@ CPApplicationDelegateClass AppController CPBundleName - HeaderView-CornerView + CPBinder-echo-bug CPPrincipalClass CPApplication diff --git a/Tests/Manual/CPBinder-echo-bug/Jakefile b/Tests/Manual/CPBinder-echo-bug/Jakefile new file mode 100644 index 000000000..eb1b44f6f --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/Jakefile @@ -0,0 +1,93 @@ +/* + * Jakefile + * CPBinder-echo-bug + * + * Created by You on March 29, 2012. + * Copyright 2012, 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 ("CPBinderEchoBug", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPBinderEchoBug.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPBinder-echo-bug"); + task.setIdentifier("com.yourcompany.CPBinderEchoBug"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPBinder-echo-bug"); + task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + 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", ["CPBinderEchoBug"], 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", "CPBinderEchoBug", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPBinderEchoBug", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPBinderEchoBug")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPBinderEchoBug"), FILE.join("Build", "Deployment", "CPBinderEchoBug")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPBinderEchoBug")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPBinderEchoBug"), FILE.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPBinderEchoBug")); + print("----------------------------"); +} diff --git a/Tests/Manual/TableTest/HeaderView-CornerView/Resources/spinner.gif b/Tests/Manual/CPBinder-echo-bug/Resources/spinner.gif similarity index 100% rename from Tests/Manual/TableTest/HeaderView-CornerView/Resources/spinner.gif rename to Tests/Manual/CPBinder-echo-bug/Resources/spinner.gif diff --git a/Tests/Manual/CPBinder-echo-bug/index-debug.html b/Tests/Manual/CPBinder-echo-bug/index-debug.html new file mode 100644 index 000000000..2f3319b88 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/index-debug.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + CPBinder-echo-bug + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPBinder-echo-bug/index.html b/Tests/Manual/CPBinder-echo-bug/index.html new file mode 100644 index 000000000..2d67d3934 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + CPBinder-echo-bug + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPBinder-echo-bug/main.j b/Tests/Manual/CPBinder-echo-bug/main.j new file mode 100644 index 000000000..e91513816 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CPBinder-echo-bug + * + * Created by You on March 29, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CPBoxTest/AppController.j b/Tests/Manual/CPBoxTest/AppController.j new file mode 100644 index 000000000..170b2ddec --- /dev/null +++ b/Tests/Manual/CPBoxTest/AppController.j @@ -0,0 +1,71 @@ + /* + * AppController.j + * CPBoxTest + * + * Created by You on January 13, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib + @outlet CPBox box1; +} + +- (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)click:(id)sender +{ + [box1 setFrameFromContentFrame:CPRectMake(30, 30, 100, 100)]; +} + +- (IBAction)click2:(id)sender +{ + [box1 setFrameFromContentFrame:CPRectMake(30, 30, 300, 300)]; +} + +- (IBAction)change:(id)aSender +{ + switch ([aSender title]) + { + case @"CPAtTop": + pos = CPAtTop; + break; + case @"CPAtBottom": + pos = CPAtBottom; + break; + case @"CPAboveBottom": + pos = CPAboveBottom; + break; + case @"CPBelowBottom": + pos = CPBelowBottom; + break; + case @"CPAboveTop": + pos = CPAboveTop; + break; + case @"CPBelowTop": + pos = CPBelowTop; + break; + case @"CPNoTitle": + pos = CPNoTitle; + break; + } + [box1 setTitlePosition:pos]; +} + +@end diff --git a/Tests/Manual/CPBoxTest/Info.plist b/Tests/Manual/CPBoxTest/Info.plist new file mode 100644 index 000000000..cb81fea59 --- /dev/null +++ b/Tests/Manual/CPBoxTest/Info.plist @@ -0,0 +1,10 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + CPBox + + diff --git a/Tests/Manual/CPBoxTest/Jakefile b/Tests/Manual/CPBoxTest/Jakefile new file mode 100644 index 000000000..9b5faa62e --- /dev/null +++ b/Tests/Manual/CPBoxTest/Jakefile @@ -0,0 +1,94 @@ +/* + * Jakefile + * CPBoxTest + * + * Created by You on January 13, 2012. + * Copyright 2012, 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 ("CPBoxTest", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPBoxTest.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPBoxTest"); + task.setIdentifier("com.yourcompany.CPBoxTest"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPBoxTest"); + 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", ["CPBoxTest"], 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", "CPBoxTest", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPBoxTest", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPBoxTest")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPBoxTest"), FILE.join("Build", "Deployment", "CPBoxTest")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPBoxTest")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPBoxTest"), FILE.join("Build", "Desktop", "CPBoxTest", "CPBoxTest.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPBoxTest", "CPBoxTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPBoxTest")); + print("----------------------------"); +} diff --git a/Tests/Manual/CPBoxTest/Resources/MainMenu.cib b/Tests/Manual/CPBoxTest/Resources/MainMenu.cib new file mode 100644 index 000000000..e84b3ea9c --- /dev/null +++ b/Tests/Manual/CPBoxTest/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;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;28E;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;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;71E;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;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;83E;D;K;6;CP$UIDd;2;85E;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;137E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;3;141E;D;K;6;CP$UIDd;3;142E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;145E;D;K;6;CP$UIDd;3;146E;D;K;6;CP$UIDd;3;147E;D;K;6;CP$UIDd;3;148E;D;K;6;CP$UIDd;3;149E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;3;151E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;153E;D;K;6;CP$UIDd;3;154E;D;K;6;CP$UIDd;3;155E;D;K;6;CP$UIDd;3;156E;D;K;6;CP$UIDd;3;157E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;159E;D;K;6;CP$UIDd;3;160E;D;K;6;CP$UIDd;3;161E;D;K;6;CP$UIDd;3;162E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;3;164E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;166E;D;K;6;CP$UIDd;3;167E;D;K;6;CP$UIDd;3;168E;D;K;6;CP$UIDd;3;169E;D;K;6;CP$UIDd;3;170E;D;K;6;CP$UIDd;3;171E;D;K;6;CP$UIDd;3;172E;D;K;6;CP$UIDd;3;173E;D;K;6;CP$UIDd;3;174E;D;K;6;CP$UIDd;3;175E;D;K;6;CP$UIDd;3;176E;D;K;6;CP$UIDd;3;177E;D;K;6;CP$UIDd;3;178E;D;K;6;CP$UIDd;3;179E;D;K;6;CP$UIDd;3;180E;D;K;6;CP$UIDd;3;181E;D;K;6;CP$UIDd;3;182E;D;K;6;CP$UIDd;3;183E;D;K;6;CP$UIDd;3;184E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;187E;D;K;6;CP$UIDd;3;188E;D;K;6;CP$UIDd;3;189E;D;K;6;CP$UIDd;3;190E;D;K;6;CP$UIDd;3;191E;D;K;6;CP$UIDd;3;192E;D;K;6;CP$UIDd;3;193E;D;K;6;CP$UIDd;3;194E;D;K;6;CP$UIDd;3;195E;D;K;6;CP$UIDd;3;196E;D;K;6;CP$UIDd;3;197E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;199E;D;K;6;CP$UIDd;3;200E;D;K;6;CP$UIDd;3;201E;D;K;6;CP$UIDd;3;202E;D;K;6;CP$UIDd;3;203E;D;K;6;CP$UIDd;3;204E;D;K;6;CP$UIDd;3;205E;D;K;6;CP$UIDd;3;206E;D;K;6;CP$UIDd;3;208E;D;K;6;CP$UIDd;3;210E;D;K;6;CP$UIDd;3;212E;D;K;6;CP$UIDd;3;214E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;215E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;216E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;217E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;218E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;219E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;221E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;222E;D;K;6;CP$UIDd;3;223E;D;K;6;CP$UIDd;3;224E;D;K;6;CP$UIDd;3;225E;D;K;6;CP$UIDd;3;226E;D;K;6;CP$UIDd;3;227E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;229E;D;K;6;CP$UIDd;3;230E;D;K;6;CP$UIDd;3;231E;D;K;6;CP$UIDd;3;232E;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;85E;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;3;107E;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;121E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;128E;D;K;6;CP$UIDd;3;129E;D;K;6;CP$UIDd;3;129E;D;K;6;CP$UIDd;3;129E;D;K;6;CP$UIDd;3;129E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;3;151E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;159E;D;K;6;CP$UIDd;3;159E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;3;162E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;3;164E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;174E;D;K;6;CP$UIDd;3;175E;D;K;6;CP$UIDd;3;175E;D;K;6;CP$UIDd;3;175E;D;K;6;CP$UIDd;3;175E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;180E;D;K;6;CP$UIDd;3;181E;D;K;6;CP$UIDd;3;181E;D;K;6;CP$UIDd;3;181E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;3;197E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;3;208E;D;K;6;CP$UIDd;3;210E;D;K;6;CP$UIDd;3;212E;D;K;6;CP$UIDd;3;214E;D;K;6;CP$UIDd;3;212E;D;K;6;CP$UIDd;3;215E;D;K;6;CP$UIDd;3;212E;D;K;6;CP$UIDd;3;216E;D;K;6;CP$UIDd;3;212E;D;K;6;CP$UIDd;3;217E;D;K;6;CP$UIDd;3;210E;D;K;6;CP$UIDd;3;218E;D;K;6;CP$UIDd;3;210E;D;K;6;CP$UIDd;3;219E;D;K;6;CP$UIDd;3;210E;D;K;6;CP$UIDd;3;221E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;3;221E;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;3;233E;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;3;234E;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;3;231E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;235E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;231E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;3;212E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;236E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;231E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;3;208E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;237E;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;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;90E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;238E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;92E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;95E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;11E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;240E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;148E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;241E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;154E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;242E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;145E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;243E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;153E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;244E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;147E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;245E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;146E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;246E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;149E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;247E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;109E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;248E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;156E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;249E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;152E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;250E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;96E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;251E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;98E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;83E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;252E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;106E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;253E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;97E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;254E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;136E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;255E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;137E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;256E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;118E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;257E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;113E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;258E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;116E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;259E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;131E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;260E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;112E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;261E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;117E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;262E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;132E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;263E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;114E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;264E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;127E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;265E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;124E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;266E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;120E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;267E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;130E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;268E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;91E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;269E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;160E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;270E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;161E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;271E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;133E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;272E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;140E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;273E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;141E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;274E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;142E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;275E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;199E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;276E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;200E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;277E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;201E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;278E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;202E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;279E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;204E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;280E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;205E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;281E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;206E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;282E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;169E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;283E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;193E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;284E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;195E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;285E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;196E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;286E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;187E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;287E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;188E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;288E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;189E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;289E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;190E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;290E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;191E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;291E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;182E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;292E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;183E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;293E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;184E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;294E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;176E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;295E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;177E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;296E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;178E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;297E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;179E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;298E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;218E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;3;231E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;299E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;221E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;3;231E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;300E;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;219E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;3;231E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;301E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;233E;E;D;K;10;$classnameS;6;CPMenuK;8;$classesA;S;6;CPMenuS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;302E;K;13;CPMenuNameKeyD;K;6;CP$UIDd;3;303E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;304E;E;D;K;10;$classnameS;10;CPMenuItemK;8;$classesA;S;10;CPMenuItemS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;305E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;88E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;85E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;305E;K;13;CPMenuNameKeyD;K;6;CP$UIDd;3;308E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;309E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;88E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;313E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;88E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;314E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;88E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;315E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;88E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;316E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;317E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;94E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;85E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;317E;K;13;CPMenuNameKeyD;K;6;CP$UIDd;3;318E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;319E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;320E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;321E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;322E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;323E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;324E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;325E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;326E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;327E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;328E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;104E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;328E;K;13;CPMenuNameKeyD;K;6;CP$UIDd;3;329E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;330E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;331E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;94E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;322E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;332E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;333E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;108E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;85E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;333E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;334E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;335E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;108E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;336E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;337E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;111E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;85E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;337E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;338E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;339E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;340E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;341E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;342E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;343E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;344E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;345E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;346E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;347E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;348E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;349E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;350E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;351E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;352E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;353E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;122E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;353E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;354E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;355E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;356E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;122E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;357E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;352E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;358E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;122E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;359E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;360E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;361E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;122E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;362E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;363E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;364E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;122E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;365E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;366E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;367E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;122E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;368E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;369E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;129E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;369E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;370E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;371E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;129E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;372E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;129E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;373E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;374E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;129E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;375E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;376E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;129E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;377E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;135E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;377E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;378E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;379E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;135E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;380E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;135E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;381E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;139E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;381E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;382E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;383E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;367E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;139E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;368E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;384E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;364E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;139E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;365E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;385E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;356E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;139E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;357E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;352E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;386E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;144E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;85E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;386E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;387E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;388E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;389E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;390E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;391E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;352E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;392E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;393E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;394E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;395E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;396E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;397E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;398E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;151E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;398E;K;13;CPMenuNameKeyD;K;6;CP$UIDd;3;399E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;400E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;401E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;151E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;402E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;403E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;352E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;404E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;405E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;406E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;144E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;407E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;159E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;85E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;407E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;408E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;409E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;159E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;410E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;332E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;411E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;159E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;412E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;163E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;85E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;412E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;413E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;414E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;165E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;163E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;414E;K;13;CPMenuNameKeyD;K;6;CP$UIDd;3;415E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;416E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;417E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;410E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;418E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;364E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;419E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;420E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;367E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;421E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;422E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;423E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;424E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;356E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;425E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;426E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;427E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;428E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;429E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;175E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;429E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;430E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;431E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;175E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;432E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;175E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;433E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;175E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;434E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;175E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;435E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;181E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;435E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;436E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;431E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;181E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;432E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;181E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;437E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;181E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;438E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;186E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;438E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;439E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;431E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;186E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;440E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;186E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;441E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;186E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;442E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;186E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;443E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;186E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;444E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;445E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;446E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;349E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;332E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;447E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;165E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;347E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;332E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;448E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;306E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;198E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;163E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;448E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;449E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;450E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;451E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;452E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;453E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;454E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;455E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;456E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;457E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;458E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;349E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;459E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;460E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;198E;K;26;CPMenuItemKeyEquivalentKeyD;K;6;CP$UIDd;3;347E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;459E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;207E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;3;461E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;3;462E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;3;463E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;3;361E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;3;305E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;3;210E;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;3;209E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;465E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;465E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;466E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;467E;E;D;K;10;$classnameS;5;CPBoxK;8;$classesA;S;5;CPBoxS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;211E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;210E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;468E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;469E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;470E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;210E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;471E;K;25;CPViewAutoresizesSubviewsD;K;6;CP$UIDd;3;464E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;467E;K;12;CPBoxTypeKeyD;K;6;CP$UIDd;3;464E;K;18;CPBoxBorderTypeKeyD;K;6;CP$UIDd;3;367E;K;19;CPBoxBorderColorKeyD;K;6;CP$UIDd;3;473E;K;17;CPBoxFillColorKeyD;K;6;CP$UIDd;3;474E;K;20;CPBoxCornerRadiusKeyD;K;6;CP$UIDd;3;464E;K;19;CPBoxBorderWidthKeyD;K;6;CP$UIDd;3;367E;K;10;CPBoxTitleD;K;6;CP$UIDd;3;475E;K;18;CPBoxTitlePositionD;K;6;CP$UIDd;3;364E;K;14;CPBoxTitleViewD;K;6;CP$UIDd;1;0E;K;21;CPBoxContentMarginKeyD;K;6;CP$UIDd;3;476E;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;3;213E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;477E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;478E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;479E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;477E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;480E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;481E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;482E;K;6;$afontD;K;6;CP$UIDd;3;484E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;464E;K;11;$aalignmentD;K;6;CP$UIDd;3;364E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;464E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;427E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;485E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;312E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;3;364E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;3;464E;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;3;213E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;477E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;486E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;487E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;477E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;488E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;481E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;482E;K;6;$afontD;K;6;CP$UIDd;3;484E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;464E;K;11;$aalignmentD;K;6;CP$UIDd;3;364E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;464E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;427E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;489E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;312E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;3;364E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;3;464E;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;3;213E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;477E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;490E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;491E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;477E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;492E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;481E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;482E;K;6;$afontD;K;6;CP$UIDd;3;484E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;464E;K;11;$aalignmentD;K;6;CP$UIDd;3;364E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;464E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;427E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;493E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;312E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;3;364E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;3;464E;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;3;213E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;477E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;494E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;479E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;477E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;495E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;481E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;482E;K;6;$afontD;K;6;CP$UIDd;3;484E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;464E;K;11;$aalignmentD;K;6;CP$UIDd;3;364E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;464E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;427E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;496E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;312E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;3;364E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;3;464E;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;3;213E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;210E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;497E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;498E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;210E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;480E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;481E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;482E;K;6;$afontD;K;6;CP$UIDd;3;484E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;464E;K;11;$aalignmentD;K;6;CP$UIDd;3;364E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;464E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;427E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;499E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;312E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;3;364E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;3;464E;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;3;213E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;210E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;500E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;501E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;210E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;480E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;481E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;482E;K;6;$afontD;K;6;CP$UIDd;3;484E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;464E;K;11;$aalignmentD;K;6;CP$UIDd;3;364E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;464E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;427E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;502E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;312E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;3;364E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;3;464E;K;24;CPButtonPeriodicDelayKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonPeriodicIntervalKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;13;CPPopUpButtonK;8;$classesA;S;13;CPPopUpButtonS;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;220E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;210E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;3;232E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;503E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;504E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;210E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;480E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;505E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;482E;K;6;$afontD;K;6;CP$UIDd;3;484E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;427E;K;11;$aalignmentD;K;6;CP$UIDd;3;464E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;464E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;427E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;312E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;3;364E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;3;464E;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;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;506E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;3;367E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;508E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;307E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;509E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;510E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;511E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;512E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;310E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;311E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;312E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;513E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;3;221E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;507E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;232E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;514E;E;D;K;6;$classD;K;6;CP$UIDd;2;84E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;515E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;516E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;208E;E;E;S;8;delegateS;4;box1S;9;theWindowS;15;arrangeInFront:S;19;performMiniaturize:S;29;orderFrontStandardAboutPanel:S;13;openDocument:S;13;performClose:S;13;saveDocument:S;14;runPageLayout:S;6;print:S;15;saveDocumentAs:S;12;newDocument:S;9;showHelp:S;22;revertDocumentToSaved:S;21;clearRecentDocuments:S;5;hide:S;10;terminate:S;22;hideOtherApplications:S;22;unhideAllApplications:S;13;stopSpeaking:S;14;startSpeaking:S;5;copy:S;10;selectAll:S;4;cut:S;14;checkSpelling:S;7;delete:S;6;paste:S;15;showGuessPanel:S;5;undo:S;23;performFindPanelAction:S;29;centerSelectionInVisibleArea:S;5;redo:S;30;toggleContinuousSpellChecking:S;12;performZoom:S;19;toggleToolbarShown:S;31;runToolbarCustomizationPalette:S;22;toggleGrammarChecking:S;24;toggleSmartInsertDelete:S;33;toggleAutomaticQuoteSubstitution:S;29;toggleAutomaticLinkDetection:S;10;alignLeft:S;12;alignCenter:S;15;alignJustified:S;11;alignRight:S;12;toggleRuler:S;10;copyRuler:S;11;pasteRuler:S;10;underline:S;21;orderFrontColorPanel:S;9;copyFont:S;10;pasteFont:S;9;unscript:S;12;superscript:S;10;subscript:S;14;raiseBaseline:S;14;lowerBaseline:S;21;useStandardLigatures:S;17;turnOffLigatures:S;16;useAllLigatures:S;19;useStandardKerning:S;15;turnOffKerning:S;15;tightenKerning:S;14;loosenKerning:S;6;click:S;7;change:S;7;click2:S;9;AMainMenuS;11;_CPMainMenuD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;3;162E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;3;107E;E;E;S;6;WindowS;14;submenuAction:d;7;1048576S;14;_CPWindowsMenuD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;90E;E;E;T;S;0;F;S;18;Bring All to FrontS;4;ZoomS;8;MinimizeS;1;mS;14;NewApplicationS;18;_CPApplicationMenuD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;101E;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;3;106E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;3;105E;D;K;6;CP$UIDd;2;98E;E;E;S;20;About NewApplicationS;19;Hide NewApplicationS;1;hS;8;Show AllS;19;Quit NewApplicationS;1;qS;12;Preferences…S;1;,S;8;ServicesS;15;_CPServicesMenuD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;S;11;Hide Othersd;7;1572864S;4;HelpD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;109E;E;E;S;19;NewApplication HelpS;1;?S;4;EditD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;114E;D;K;6;CP$UIDd;3;120E;D;K;6;CP$UIDd;3;119E;D;K;6;CP$UIDd;3;116E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;3;117E;D;K;6;CP$UIDd;3;112E;D;K;6;CP$UIDd;3;113E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;121E;D;K;6;CP$UIDd;3;128E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;3;134E;E;E;S;6;DeleteS;10;Select AllS;1;aS;4;UndoS;1;zS;3;CutS;1;xS;5;PasteS;1;vS;4;CopyS;1;cS;4;RedoS;1;Zd;7;1179648S;4;FindD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;127E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;123E;D;K;6;CP$UIDd;3;125E;D;K;6;CP$UIDd;3;124E;E;E;S;13;Find Previousd;1;3S;1;GS;17;Jump to SelectionS;1;jS;22;Use Selection for Findd;1;7S;1;eS;9;Find Nextd;1;2S;1;gS;5;Find…d;1;1S;1;fS;20;Spelling and GrammarD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;132E;D;K;6;CP$UIDd;3;131E;D;K;6;CP$UIDd;3;130E;D;K;6;CP$UIDd;3;133E;E;E;S;27;Check Spelling While TypingS;14;Check SpellingS;1;;S;14;Show Spelling…S;1;:S;27;Check Grammar With SpellingS;6;SpeechD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;3;136E;E;E;S;13;Stop SpeakingS;14;Start SpeakingS;13;SubstitutionsD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;3;141E;D;K;6;CP$UIDd;3;142E;E;E;S;16;Smart Copy/PasteS;12;Smart QuotesS;11;Smart LinksS;4;FileD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;149E;D;K;6;CP$UIDd;3;148E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;3;155E;D;K;6;CP$UIDd;3;154E;D;K;6;CP$UIDd;3;145E;D;K;6;CP$UIDd;3;146E;D;K;6;CP$UIDd;3;156E;D;K;6;CP$UIDd;3;157E;D;K;6;CP$UIDd;3;153E;D;K;6;CP$UIDd;3;147E;E;E;S;4;SaveS;1;sS;8;Save As…S;1;SS;6;Print…S;1;pS;5;Open…S;1;oS;3;NewS;1;nS;11;Open RecentS;22;_CPRecentDocumentsMenuD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;152E;E;E;S;10;Clear MenuS;13;Page Setup...S;1;PS;5;CloseS;1;wS;15;Revert to SavedS;4;ViewD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;160E;D;K;6;CP$UIDd;3;161E;E;E;S;12;Show ToolbarS;1;tS;18;Customize Toolbar…S;6;FormatD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;164E;D;K;6;CP$UIDd;3;197E;E;E;S;4;FontS;11;_CPFontMenuD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;166E;D;K;6;CP$UIDd;3;167E;D;K;6;CP$UIDd;3;168E;D;K;6;CP$UIDd;3;169E;D;K;6;CP$UIDd;3;170E;D;K;6;CP$UIDd;3;171E;D;K;6;CP$UIDd;3;172E;D;K;6;CP$UIDd;3;173E;D;K;6;CP$UIDd;3;174E;D;K;6;CP$UIDd;3;180E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;192E;D;K;6;CP$UIDd;3;193E;D;K;6;CP$UIDd;3;194E;D;K;6;CP$UIDd;3;195E;D;K;6;CP$UIDd;3;196E;E;E;S;10;Show FontsS;4;BoldS;1;bS;6;ItalicS;1;iS;9;UnderlineS;1;uS;6;BiggerS;1;+S;7;Smallerd;1;4S;1;-S;4;KernD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;176E;D;K;6;CP$UIDd;3;177E;D;K;6;CP$UIDd;3;178E;D;K;6;CP$UIDd;3;179E;E;E;S;11;Use DefaultS;8;Use NoneS;7;TightenS;6;LoosenS;8;LigatureD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;182E;D;K;6;CP$UIDd;3;183E;D;K;6;CP$UIDd;3;184E;E;E;S;7;Use AllS;8;BaselineD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;187E;D;K;6;CP$UIDd;3;188E;D;K;6;CP$UIDd;3;189E;D;K;6;CP$UIDd;3;190E;D;K;6;CP$UIDd;3;191E;E;E;S;11;SuperscriptS;9;SubscriptS;5;RaiseS;5;LowerS;11;Show ColorsS;1;CS;10;Copy StyleS;11;Paste StyleS;4;TextD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;199E;D;K;6;CP$UIDd;3;200E;D;K;6;CP$UIDd;3;201E;D;K;6;CP$UIDd;3;202E;D;K;6;CP$UIDd;3;203E;D;K;6;CP$UIDd;3;204E;D;K;6;CP$UIDd;3;205E;D;K;6;CP$UIDd;3;206E;E;E;S;10;Align LeftS;1;{S;6;CenterS;1;|S;7;JustifyS;11;Align RightS;1;}S;10;Show RulerS;10;Copy Rulerd;7;1310720S;11;Paste RulerS;32;{10000000000000, 10000000000000}S;8;CPWindowS;24;{{335, 425}, {366, 213}}d;1;0S;20;{{0, 0}, {366, 213}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;212E;D;K;6;CP$UIDd;3;218E;D;K;6;CP$UIDd;3;219E;D;K;6;CP$UIDd;3;221E;E;E;S;6;normalS;22;{{17, 20}, {332, 137}}S;20;{{0, 0}, {332, 137}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;477E;E;E;d;2;18D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;472E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;517E;E;D;K;6;$classD;K;6;CP$UIDd;3;472E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;518E;E;S;5;HelloS;6;{0, 0}D;K;6;$classD;K;6;CP$UIDd;3;209E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;212E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;3;464E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;520E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;521E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;522E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;212E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;471E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;467E;E;S;21;{{16, 85}, {105, 24}}S;19;{{0, 0}, {105, 24}}d;2;12S;6;buttonS;8;borderedD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;483E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;519E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;480E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;310E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;312E;E;S;11;bottom leftS;21;{{206, 8}, {104, 24}}S;19;{{0, 0}, {104, 24}}d;2;33S;9;top rightS;22;{{206, 85}, {109, 24}}S;19;{{0, 0}, {109, 24}}d;1;9S;12;bottom rightS;20;{{16, 8}, {105, 24}}d;2;36S;8;top leftS;21;{{22, 171}, {62, 24}}S;18;{{0, 0}, {62, 24}}S;5;SmallS;21;{{90, 171}, {48, 24}}S;18;{{0, 0}, {48, 24}}S;3;BigS;23;{{193, 171}, {151, 24}}S;19;{{0, 0}, {151, 24}}S;12;popup-buttonS;7;CPAtTopS;17;_popUpItemAction:S;10;CPAtBottomS;13;CPAboveBottomS;10;CPBelowTopS;10;CPAboveTopS;13;CPBelowBottomS;9;CPNoTitleS;13;AppControllerS;10;OtherViewsD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;222E;D;K;6;CP$UIDd;3;225E;D;K;6;CP$UIDd;3;226E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;223E;D;K;6;CP$UIDd;3;227E;D;K;6;CP$UIDd;3;224E;D;K;6;CP$UIDd;3;229E;D;K;6;CP$UIDd;3;230E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;464E;D;K;6;CP$UIDd;3;464E;D;K;6;CP$UIDd;3;464E;D;K;6;CP$UIDd;3;523E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;464E;D;K;6;CP$UIDd;3;464E;D;K;6;CP$UIDd;3;464E;D;K;6;CP$UIDd;3;464E;E;E;S;17;Arial, sans-serifS;21;{{1, 15}, {330, 121}}S;20;{{0, 0}, {330, 121}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;217E;D;K;6;CP$UIDd;3;214E;D;K;6;CP$UIDd;3;215E;D;K;6;CP$UIDd;3;216E;E;E;f;4;0.42E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPBoxTest/Resources/MainMenu.xib b/Tests/Manual/CPBoxTest/Resources/MainMenu.xib new file mode 100644 index 000000000..c0658d131 --- /dev/null +++ b/Tests/Manual/CPBoxTest/Resources/MainMenu.xib @@ -0,0 +1,3587 @@ + + + + 1050 + 11C74 + 1938 + 1138.23 + 567.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + YES + NSView + NSMenu + NSWindowTemplate + NSMenuItem + NSCustomObject + NSPopUpButton + NSButtonCell + NSPopUpButtonCell + NSButton + NSBox + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + YES + + + NewApplication + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + NewApplication + + YES + + + About NewApplication + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1179648 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + YES + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + YES + + + Show Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + YES + + + Font + + 2147483647 + + + submenuAction: + + Font + + YES + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + YES + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + YES + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + NewApplication Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + 7 + 2 + {{335, 390}, {366, 213}} + 1946157056 + Window + NSWindow + + + + + 256 + + YES + + + 18 + + YES + + + 274 + + YES + + + 268 + {{12, 83}, {117, 32}} + + + + _NS:687 + YES + + 67239424 + 134217728 + top left + + LucidaGrande + 13 + 1044 + + _NS:687 + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{12, 6}, {117, 32}} + + + + _NS:687 + YES + + 67239424 + 134217728 + bottom left + + _NS:687 + + -2038284033 + 129 + + + 200 + 25 + + + + + 265 + {{202, 83}, {116, 32}} + + + + _NS:687 + YES + + 67239424 + 134217728 + top right + + _NS:687 + + -2038284033 + 129 + + + 200 + 25 + + + + + 289 + {{202, 6}, {121, 32}} + + + + _NS:687 + YES + + 67239424 + 134217728 + bottom right + + _NS:687 + + -2038284033 + 129 + + + 200 + 25 + + + + {{1, 1}, {330, 121}} + + + + _NS:21 + + + {{17, 56}, {332, 137}} + + + + _NS:18 + {0, 0} + + 67239424 + 0 + Hello + + LucidaGrande + 11 + 3100 + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 2 + NO + + + + 292 + {{18, 12}, {74, 32}} + + + + _NS:687 + YES + + 67239424 + 134217728 + Small + + _NS:687 + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{86, 12}, {60, 32}} + + + + _NS:687 + YES + + 67239424 + 134217728 + Big + + _NS:687 + + -2038284033 + 129 + + + 200 + 25 + + + + + 292 + {{192, 16}, {157, 26}} + + + + _NS:868 + YES + + -2076049856 + 2048 + + _NS:868 + + 109199615 + 129 + + + 400 + 75 + + + CPAtTop + + 2147483647 + + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + CPBelowTop + + 2147483647 + + + _popUpItemAction: + + + + + CPAboveTop + + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + CPAtBottom + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + CPBelowBottom + + 2147483647 + + + _popUpItemAction: + + + + + CPAboveBottom + + 2147483647 + + + _popUpItemAction: + + + + + YES + YES + + + 2147483647 + + + _popUpItemAction: + + + + + CPNoTitle + + 2147483647 + + + _popUpItemAction: + + + + + + 1 + YES + YES + 2 + + + + {366, 213} + + + + + {{0, 0}, {1680, 1028}} + {10000000000000, 10000000000000} + YES + + + AppController + + + + + YES + + + terminate: + + + + 449 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + delegate + + + + 451 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + showHelp: + + + + 360 + + + + saveDocument: + + + + 362 + + + + saveDocumentAs: + + + + 363 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + raiseBaseline: + + + + 426 + + + + lowerBaseline: + + + + 427 + + + + copyFont: + + + + 428 + + + + subscript: + + + + 429 + + + + superscript: + + + + 430 + + + + tightenKerning: + + + + 431 + + + + underline: + + + + 432 + + + + orderFrontColorPanel: + + + + 433 + + + + useAllLigatures: + + + + 434 + + + + loosenKerning: + + + + 435 + + + + pasteFont: + + + + 436 + + + + unscript: + + + + 437 + + + + useStandardKerning: + + + + 438 + + + + useStandardLigatures: + + + + 439 + + + + turnOffLigatures: + + + + 440 + + + + turnOffKerning: + + + + 441 + + + + alignLeft: + + + + 442 + + + + alignJustified: + + + + 443 + + + + copyRuler: + + + + 444 + + + + alignCenter: + + + + 445 + + + + toggleRuler: + + + + 446 + + + + alignRight: + + + + 447 + + + + pasteRuler: + + + + 448 + + + + theWindow + + + + 459 + + + + box1 + + + + 472 + + + + click: + + + + 475 + + + + change: + + + + 482 + + + + click2: + + + + 494 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 56 + + + YES + + + + + + 103 + + + YES + + + + 1 + + + 217 + + + YES + + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 75 + + + 3 + + + 80 + + + 8 + + + 78 + + + 6 + + + 72 + + + + + 82 + + + 9 + + + 124 + + + YES + + + + + + 77 + + + 5 + + + 73 + + + 1 + + + 79 + + + 7 + + + 112 + + + 10 + + + 74 + + + 2 + + + 125 + + + YES + + + + + + 126 + + + + + 205 + + + YES + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + YES + + + + + + 216 + + + YES + + + + + + 200 + + + YES + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + YES + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 106 + + + YES + + + + 2 + + + 111 + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + 1111 + + + 144 + + + + + 129 + + + 121 + + + 143 + + + + + 236 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + YES + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + YES + + + + + + 296 + + + YES + + + + + + + 297 + + + + + 298 + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + YES + + + + + + 349 + + + YES + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + 375 + + + YES + + + + + + 376 + + + YES + + + + + + + 377 + + + YES + + + + + + 378 + + + YES + + + + + + 379 + + + YES + + + + + + + + + + + + + 380 + + + + + 381 + + + + + 382 + + + + + 383 + + + + + 384 + + + + + 385 + + + + + 386 + + + + + 387 + + + + + 388 + + + YES + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + YES + + + + + + 398 + + + YES + + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + YES + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + YES + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + YES + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 450 + + + + + 464 + + + YES + + + + + + + + + 473 + + + YES + + + + + + 474 + + + + + 476 + + + YES + + + + + + 477 + + + YES + + + + + + 478 + + + YES + + + + + + + + + + + + + + 479 + + + + + 480 + + + + + 481 + + + + + 483 + + + YES + + + + + + 484 + + + + + 485 + + + YES + + + + + + 486 + + + + + 487 + + + + + 488 + + + + + 489 + + + + + 490 + + + + + 491 + + + YES + + + + + + 492 + + + + + 495 + + + + + 496 + + + + + 497 + + + YES + + + + + + 498 + + + YES + + + + + + 499 + + + + + 500 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 103.IBPluginDependency + 106.IBPluginDependency + 111.IBPluginDependency + 112.IBPluginDependency + 124.IBPluginDependency + 125.IBPluginDependency + 126.IBPluginDependency + 129.IBPluginDependency + 130.IBPluginDependency + 131.IBPluginDependency + 134.IBPluginDependency + 136.IBPluginDependency + 143.IBPluginDependency + 144.IBPluginDependency + 145.IBPluginDependency + 149.IBPluginDependency + 150.IBPluginDependency + 19.IBPluginDependency + 195.IBPluginDependency + 196.IBPluginDependency + 197.IBPluginDependency + 198.IBPluginDependency + 199.IBPluginDependency + 200.IBPluginDependency + 201.IBPluginDependency + 202.IBPluginDependency + 203.IBPluginDependency + 204.IBPluginDependency + 205.IBPluginDependency + 206.IBPluginDependency + 207.IBPluginDependency + 208.IBPluginDependency + 209.IBPluginDependency + 210.IBPluginDependency + 211.IBPluginDependency + 212.IBPluginDependency + 213.IBPluginDependency + 214.IBPluginDependency + 215.IBPluginDependency + 216.IBPluginDependency + 217.IBPluginDependency + 218.IBPluginDependency + 219.IBPluginDependency + 220.IBPluginDependency + 221.IBPluginDependency + 23.IBPluginDependency + 236.IBPluginDependency + 239.IBPluginDependency + 24.IBPluginDependency + 29.IBPluginDependency + 295.IBPluginDependency + 296.IBPluginDependency + 297.IBPluginDependency + 298.IBPluginDependency + 346.IBPluginDependency + 348.IBPluginDependency + 349.IBPluginDependency + 350.IBPluginDependency + 351.IBPluginDependency + 354.IBPluginDependency + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 372.IBPluginDependency + 375.IBPluginDependency + 376.IBPluginDependency + 377.IBPluginDependency + 378.IBPluginDependency + 379.IBPluginDependency + 380.IBPluginDependency + 381.IBPluginDependency + 382.IBPluginDependency + 383.IBPluginDependency + 384.IBPluginDependency + 385.IBPluginDependency + 386.IBPluginDependency + 387.IBPluginDependency + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 395.IBPluginDependency + 396.IBPluginDependency + 397.IBPluginDependency + 398.IBPluginDependency + 399.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 450.IBPluginDependency + 464.IBPluginDependency + 473.IBPluginDependency + 474.IBPluginDependency + 476.IBPluginDependency + 477.IBPluginDependency + 478.IBPluginDependency + 479.IBPluginDependency + 480.IBPluginDependency + 481.IBPluginDependency + 483.IBPluginDependency + 484.IBPluginDependency + 485.IBPluginDependency + 486.IBPluginDependency + 487.IBPluginDependency + 488.IBPluginDependency + 489.IBPluginDependency + 490.IBPluginDependency + 491.IBPluginDependency + 492.IBPluginDependency + 495.IBPluginDependency + 496.IBPluginDependency + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 5.IBPluginDependency + 500.IBPluginDependency + 56.IBPluginDependency + 57.IBPluginDependency + 58.IBPluginDependency + 72.IBPluginDependency + 73.IBPluginDependency + 74.IBPluginDependency + 75.IBPluginDependency + 77.IBPluginDependency + 78.IBPluginDependency + 79.IBPluginDependency + 80.IBPluginDependency + 81.IBPluginDependency + 82.IBPluginDependency + 83.IBPluginDependency + 92.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + 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 + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 500 + + + + YES + + AppController + NSObject + + YES + + YES + change: + click2: + click: + + + YES + id + id + id + + + + YES + + YES + change: + click2: + click: + + + YES + + change: + id + + + click2: + id + + + click: + id + + + + + box1 + NSBox + + + box1 + + box1 + NSBox + + + + IBProjectSource + ./Classes/AppController.h + + + + NSDocument + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + id + id + id + id + id + id + + + + YES + + YES + printDocument: + revertDocumentToSaved: + runPageLayout: + saveDocument: + saveDocumentAs: + saveDocumentTo: + + + YES + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + + IBProjectSource + ./Classes/NSDocument.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/Tests/Manual/CPBoxTest/Resources/spinner.gif b/Tests/Manual/CPBoxTest/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/CPBoxTest/Resources/spinner.gif differ diff --git a/Tests/Manual/CPBoxTest/index-debug.html b/Tests/Manual/CPBoxTest/index-debug.html new file mode 100644 index 000000000..4c5784ba1 --- /dev/null +++ b/Tests/Manual/CPBoxTest/index-debug.html @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + CPBoxTest + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPBoxTest/index.html b/Tests/Manual/CPBoxTest/index.html new file mode 100644 index 000000000..9ac7af0e0 --- /dev/null +++ b/Tests/Manual/CPBoxTest/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + CPBoxTest + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPBoxTest/main.j b/Tests/Manual/CPBoxTest/main.j new file mode 100644 index 000000000..0524ffe5e --- /dev/null +++ b/Tests/Manual/CPBoxTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CPBoxTest + * + * Created by You on January 13, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CPColorWellBindings/AppController.j b/Tests/Manual/CPColorWellBindings/AppController.j new file mode 100644 index 000000000..0b04e1c6b --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/AppController.j @@ -0,0 +1,44 @@ +/* + * AppController.j + * CPColorWellBindings + * + * Created by You on January 27, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib + CPArray array; +} + +- (id)init +{ + self = [super init]; + if (self) + { + array = [CPArray arrayWithObjects:[CPDictionary dictionaryWithObject:[CPColor redColor] forKey:@"color"], [CPDictionary dictionaryWithObject:[CPNull null] forKey:@"color"], [CPDictionary dictionaryWithObject:[CPColor greenColor] forKey:@"color"]]; + } + + return self; +} + +- (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]; +} + +@end diff --git a/Tests/Manual/CPColorWellBindings/Info.plist b/Tests/Manual/CPColorWellBindings/Info.plist new file mode 100644 index 000000000..e24f224f7 --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/Info.plist @@ -0,0 +1,10 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + CPColorWellBindings + + diff --git a/Tests/Manual/CPColorWellBindings/Jakefile b/Tests/Manual/CPColorWellBindings/Jakefile new file mode 100644 index 000000000..ce8c5b94b --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/Jakefile @@ -0,0 +1,94 @@ +/* + * Jakefile + * CPColorWellBindings + * + * Created by You on January 27, 2012. + * Copyright 2012, 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 ("CPColorWellBindings", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPColorWellBindings.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPColorWellBindings"); + task.setIdentifier("com.yourcompany.CPColorWellBindings"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPColorWellBindings"); + 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", ["CPColorWellBindings"], 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", "CPColorWellBindings", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPColorWellBindings", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPColorWellBindings")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPColorWellBindings"), FILE.join("Build", "Deployment", "CPColorWellBindings")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPColorWellBindings")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPColorWellBindings"), FILE.join("Build", "Desktop", "CPColorWellBindings", "CPColorWellBindings.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPColorWellBindings", "CPColorWellBindings.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPColorWellBindings")); + print("----------------------------"); +} diff --git a/Tests/Manual/CPColorWellBindings/Resources/MainMenu.cib b/Tests/Manual/CPColorWellBindings/Resources/MainMenu.cib new file mode 100644 index 000000000..bf62fb967 --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/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;18E;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;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;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;46E;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;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;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;47E;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;48E;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;44E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;49E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;44E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;50E;E;D;K;10;$classnameS;21;CPCibBindingConnectorK;8;$classesA;S;21;CPCibBindingConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;43E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;46E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;51E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;52E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;53E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;55E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;46E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;52E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;58E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;46E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;44E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;59E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;60E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;61E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;62E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;41E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;46E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;63E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;52E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;64E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;65E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;41E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;46E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;66E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;67E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;68E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;69E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;39E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;46E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;70E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;52E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;68E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;71E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;47E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;72E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;73E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;74E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;75E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;76E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;28E;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;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;78E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;78E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;79E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;E;D;K;10;$classnameS;12;CPScrollViewK;8;$classesA;S;12;CPScrollViewS;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;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;81E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;82E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;83E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;84E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;85E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;K;23;CPScrollViewContentViewD;K;6;CP$UIDd;2;87E;K;29;CPScrollViewHeaderClipViewKeyD;K;6;CP$UIDd;1;0E;K;21;CPScrollViewVScrollerD;K;6;CP$UIDd;2;37E;K;21;CPScrollViewHScrollerD;K;6;CP$UIDd;2;36E;K;23;CPScrollViewVLineScrollD;K;6;CP$UIDd;2;88E;K;23;CPScrollViewVPageScrollD;K;6;CP$UIDd;2;88E;K;23;CPScrollViewHLineScrollD;K;6;CP$UIDd;2;88E;K;23;CPScrollViewHPageScrollD;K;6;CP$UIDd;2;88E;K;24;CPScrollViewHasVScrollerD;K;6;CP$UIDd;2;89E;K;24;CPScrollViewHasHScrollerD;K;6;CP$UIDd;2;89E;K;29;CPScrollViewAutohidesScrollerD;K;6;CP$UIDd;2;89E;K;25;CPScrollViewCornerViewKeyD;K;6;CP$UIDd;1;0E;K;31;CPScrollViewBottomCornerViewKeyD;K;6;CP$UIDd;2;90E;K;25;CPScrollViewBorderTypeKeyD;K;6;CP$UIDd;2;91E;K;28;CPScrollViewScrollerStyleKeyD;K;6;CP$UIDd;1;0E;K;32;CPScrollViewScrollerKnobStyleKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;11;CPTableViewK;8;$classesA;S;11;CPTableViewS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;87E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;92E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;92E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;87E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;93E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;K;12;$agrid-colorD;K;6;CP$UIDd;2;95E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;96E;K;24;CPTableViewDataSourceKeyD;K;6;CP$UIDd;1;0E;K;22;CPTableViewDelegateKeyD;K;6;CP$UIDd;1;0E;K;23;CPTableViewRowHeightKeyD;K;6;CP$UIDd;2;97E;K;30;CPTableViewIntercellSpacingKeyD;K;6;CP$UIDd;2;98E;K;37;CPTableViewSelectionHighlightStyleKeyD;K;6;CP$UIDd;2;77E;K;37;CPTableViewColumnAutoresizingStyleKeyD;K;6;CP$UIDd;2;77E;K;31;CPTableViewMultipleSelectionKeyD;K;6;CP$UIDd;2;89E;K;28;CPTableViewEmptySelectionKeyD;K;6;CP$UIDd;2;89E;K;30;CPTableViewColumnReorderingKeyD;K;6;CP$UIDd;2;99E;K;28;CPTableViewColumnResizingKeyD;K;6;CP$UIDd;2;99E;K;29;CPTableViewColumnSelectionKeyD;K;6;CP$UIDd;2;89E;K;26;CPTableViewTableColumnsKeyD;K;6;CP$UIDd;3;100E;K;23;CPTableViewGridColorKeyD;K;6;CP$UIDd;2;95E;K;27;CPTableViewGridStyleMaskKeyD;K;6;CP$UIDd;1;0E;K;39;CPTableViewUsesAlternatingBackgroundKeyD;K;6;CP$UIDd;2;89E;K;34;CPTableViewAlternatingRowColorsKeyD;K;6;CP$UIDd;1;0E;K;24;CPTableViewCornerViewKeyD;K;6;CP$UIDd;1;0E;K;24;CPTableViewHeaderViewKeyD;K;6;CP$UIDd;1;0E;K;26;CPTableViewAutosaveNameKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;13;CPTableColumnK;8;$classesA;S;13;CPTableColumnS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;33E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;101E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;102E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;103E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;105E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;106E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;3;107E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;2;99E;K;26;CPTableColumnIsEditableKeyD;K;6;CP$UIDd;2;89E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;10;CPScrollerK;8;$classesA;S;10;CPScrollerS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;35E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;108E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;109E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;110E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;111E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;77E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;30E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;112E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;96E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;77E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;113E;K;18;CPScrollerStyleKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;35E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;114E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;115E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;110E;K;17;CPViewIsHiddenKeyD;K;6;CP$UIDd;3;116E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;111E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;117E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;77E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;30E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;118E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;96E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;77E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;119E;K;18;CPScrollerStyleKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;11;CPColorWellK;8;$classesA;S;11;CPColorWellS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;120E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;121E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;84E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;96E;K;19;CPColorWellColorKeyD;K;6;CP$UIDd;3;122E;K;22;CPColorWellBorderedKeyD;K;6;CP$UIDd;2;89E;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;40E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;124E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;84E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;125E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;K;6;$afontD;K;6;CP$UIDd;3;127E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;91E;K;11;$aalignmentD;K;6;CP$UIDd;2;96E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;89E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;128E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;129E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;99E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;99E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;99E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;91E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;96E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;10;CPCheckBoxK;8;$classesA;S;10;CPCheckBoxS;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;42E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;130E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;131E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;84E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;132E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;133E;K;16;$aimage-positionD;K;6;CP$UIDd;2;91E;K;6;$afontD;K;6;CP$UIDd;3;127E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;77E;K;11;$aalignmentD;K;6;CP$UIDd;2;77E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;134E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;96E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;135E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;2;99E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;2;91E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;77E;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;3;136E;E;D;K;10;$classnameS;17;CPArrayControllerK;8;$classesA;S;17;CPArrayControllerS;18;CPObjectControllerS;12;CPControllerS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;45E;K;28;CPObjectControllerContentKeyD;K;6;CP$UIDd;1;0E;K;36;CPObjectControllerObjectClassNameKeyD;K;6;CP$UIDd;3;137E;K;31;CPObjectControllerIsEditableKeyD;K;6;CP$UIDd;2;99E;K;49;CPObjectControllerAutomaticallyPreparesContentKeyD;K;6;CP$UIDd;2;99E;K;37;CPArrayControllerAvoidsEmptySelectionD;K;6;CP$UIDd;2;99E;K;49;CPArrayControllerClearsFilterPredicateOnInsertionD;K;6;CP$UIDd;2;99E;K;41;CPArrayControllerFilterRestrictsInsertionD;K;6;CP$UIDd;2;89E;K;35;CPArrayControllerPreservesSelectionD;K;6;CP$UIDd;2;99E;K;39;CPArrayControllerSelectsInsertedObjectsD;K;6;CP$UIDd;2;99E;K;47;CPArrayControllerAlwaysUsesMultipleValuesMarkerD;K;6;CP$UIDd;2;99E;K;47;CPArrayControllerAutomaticallyRearrangesObjectsD;K;6;CP$UIDd;2;99E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;26E;E;E;S;8;delegateS;9;theWindowS;27;value: avoidsEmptySelectionS;5;valueS;20;avoidsEmptySelectionD;K;10;$classnameS;12;CPDictionaryK;8;$classesA;S;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;54E;K;10;CP.objectsD;E;E;S;38;value: arrangedObjects.color.cssStringS;31;arrangedObjects.color.cssStringD;K;6;$classD;K;6;CP$UIDd;2;54E;K;10;CP.objectsD;E;E;S;19;contentArray: arrayS;12;contentArrayS;5;arrayD;K;6;$classD;K;6;CP$UIDd;2;54E;K;10;CP.objectsD;E;E;S;32;value: selection.color.cssStringS;25;selection.color.cssStringD;K;6;$classD;K;6;CP$UIDd;2;54E;K;10;CP.objectsD;K;17;CPNullPlaceholderD;K;6;CP$UIDd;3;138E;E;E;S;26;textColor: selection.colorS;9;textColorS;15;selection.colorD;K;6;$classD;K;6;CP$UIDd;2;54E;K;10;CP.objectsD;E;E;S;22;value: selection.colorD;K;6;$classD;K;6;CP$UIDd;2;54E;K;10;CP.objectsD;E;E;S;32;{10000000000000, 10000000000000}S;8;CPWindowS;24;{{335, 165}, {715, 473}}d;1;7S;6;Windowd;1;0S;20;{{0, 0}, {715, 473}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;43E;E;E;S;6;normalS;22;{{20, 20}, {168, 135}}S;20;{{0, 0}, {168, 135}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;90E;E;E;d;2;36S;10;scrollviewD;K;10;$classnameS;10;CPClipViewK;8;$classesA;S;10;CPClipViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;139E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;140E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;141E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;110E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;142E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;32E;E;d;2;10T;D;K;6;$classD;K;6;CP$UIDd;2;27E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;143E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;143E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;E;d;1;2S;20;{{0, 0}, {167, 133}}S;9;tableviewD;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;144E;E;d;1;4d;2;23S;6;{3, 2}F;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;34E;E;E;d;3;164d;2;40d;4;1000D;K;10;$classnameS;24;_CPTableColumnHeaderViewK;8;$classesA;S;24;_CPTableColumnHeaderViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;104E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;143E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;143E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;145E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;146E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;K;16;$atext-alignmentD;K;6;CP$UIDd;2;77E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;147E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;148E;E;D;K;6;$classD;K;6;CP$UIDd;2;40E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;143E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;143E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;125E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;149E;K;6;$afontD;K;6;CP$UIDd;3;151E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;96E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;91E;K;11;$aalignmentD;K;6;CP$UIDd;2;77E;K;15;$acontent-insetD;K;6;CP$UIDd;3;153E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;147E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;129E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;1;0E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;96E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;77E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;147E;E;d;1;3S;19;{{1, 1}, {166, 15}}S;19;{{0, 0}, {166, 15}}d;1;8S;8;scrollerS;29;_horizontalScrollerDidScroll:f;18;0.9940119760479041S;22;{{224, 16}, {15, 102}}S;19;{{0, 0}, {15, 102}}d;11;-2147483648S;17;disabled+verticalS;27;_verticalScrollerDidScroll:f;18;0.9925373134328358S;22;{{213, 20}, {103, 23}}S;19;{{0, 0}, {103, 23}}D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;154E;E;S;22;{{210, 51}, {194, 17}}S;19;{{0, 0}, {194, 17}}S;9;textfieldD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;126E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;155E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;156E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;99E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;99E;E;S;5;Labeld;4;3072S;22;{{18, 161}, {172, 18}}S;19;{{0, 0}, {172, 18}}S;9;check-boxS;8;selectedd;1;1S;21;Avoid Empty SelectionS;13;AppControllerS;19;CPMutableDictionaryS;4;NULLS;20;{{1, 1}, {166, 133}}S;20;{{0, 0}, {166, 133}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;32E;E;E;D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;157E;E;S;16;{{0, 0}, {0, 0}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;134E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;160E;E;E;S;12;columnHeaderS;0;D;K;6;$classD;K;6;CP$UIDd;3;126E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;155E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;156E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;99E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;99E;E;S;11;placeholderD;K;10;$classnameS;17;_CPThemeAttributeK;8;$classesA;S;17;_CPThemeAttributeS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;150E;K;4;nameD;K;6;CP$UIDd;3;161E;K;12;defaultValueD;K;6;CP$UIDd;3;148E;K;6;valuesD;K;6;CP$UIDd;3;162E;E;D;K;10;$classnameS;21;_CPKeyedArchiverValueK;8;$classesA;S;21;_CPKeyedArchiverValueS;7;CPValueS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;152E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;163E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;164E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;E;E;S;17;Arial, sans-serifd;2;12D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;134E;E;E;f;3;0.5D;K;10;$classnameS;19;_CPImageAndTextViewK;8;$classesA;S;19;_CPImageAndTextViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;159E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;105E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;143E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;143E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;105E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;166E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;80E;E;S;4;fontD;K;6;$classD;K;6;CP$UIDd;2;54E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;167E;K;6;normalD;K;6;CP$UIDd;3;148E;E;E;S;39;{"top":0,"right":5,"bottom":0,"left":5}f;13;0.05813049898f;13;0.05554189906d;2;18D;K;6;$classD;K;6;CP$UIDd;3;126E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;155E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;156E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;89E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;99E;E;E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPColorWellBindings/Resources/MainMenu.xib b/Tests/Manual/CPColorWellBindings/Resources/MainMenu.xib new file mode 100644 index 000000000..b716f978c --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/Resources/MainMenu.xib @@ -0,0 +1,674 @@ + + + + 1050 + 11C74 + 1938 + 1138.23 + 567.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + YES + NSScroller + NSArrayController + NSButton + NSScrollView + NSTextFieldCell + NSButtonCell + NSColorWell + NSTableView + NSCustomObject + NSView + NSWindowTemplate + NSTextField + NSTableColumn + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{335, 390}, {715, 473}} + 1946157056 + Window + NSWindow + + + + + 256 + + YES + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{213, 430}, {103, 23}} + + + + _NS:1100 + YES + YES + + 1 + MC4wNTgxMzA0OTg5OCAwLjA1NTU0MTg5OTA2IDEAA + + + + + 268 + {{210, 405}, {194, 17}} + + + + _NS:3944 + YES + + 68288064 + 272630784 + Label + + LucidaGrande + 13 + 1044 + + _NS:3944 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + + YES + + + 2304 + + YES + + + 256 + {167, 133} + + + + _NS:1828 + YES + + + -2147483392 + {{224, 0}, {16, 17}} + _NS:1833 + + + YES + + 164 + 40 + 1000 + + 75628096 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + + + + 337772096 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + + + + 3 + YES + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 513802240 + + + 0 + 15 + 0 + YES + 0 + 1 + + + {{1, 1}, {166, 133}} + + + + _NS:1826 + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + + + _NS:1845 + + _doScroller: + 0.9925373134328358 + + + + 256 + {{1, 119}, {166, 15}} + + + + _NS:1847 + YES + 1 + + _doScroller: + 0.99401197604790414 + + + {{20, 318}, {168, 135}} + + + + _NS:1824 + 133810 + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 268 + {{18, 294}, {172, 18}} + + + + _NS:771 + YES + + -2080244224 + 0 + Avoid Empty Selection + + _NS:771 + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + {715, 473} + + + + + {{0, 0}, {1680, 1028}} + {10000000000000, 10000000000000} + YES + + + AppController + + + + YES + color + + + YES + + + + + YES + + + delegate + + + + 451 + + + + theWindow + + + + 459 + + + + value: selection.color + + + + + + value: selection.color + value + selection.color + 2 + + + 523 + + + + textColor: selection.color + + + + + + textColor: selection.color + textColor + selection.color + 2 + + + 527 + + + + value: selection.color.cssString + + + + + + value: selection.color.cssString + value + selection.color.cssString + + NSNullPlaceholder + NULL + + 2 + + + 535 + + + + contentArray: array + + + + + + contentArray: array + contentArray + array + 2 + + + 519 + + + + value: arrangedObjects.color.cssString + + + + + + value: arrangedObjects.color.cssString + value + arrangedObjects.color.cssString + 2 + + + 511 + + + + value: avoidsEmptySelection + + + + + + value: avoidsEmptySelection + value + avoidsEmptySelection + 2 + + + 534 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + 450 + + + + + 460 + + + + + 490 + + + YES + + + + + + 491 + + + + + 495 + + + + + 499 + + + YES + + + + + + + + 500 + + + YES + + + + + + 501 + + + + + 503 + + + + + 504 + + + YES + + + + + + 507 + + + + + 520 + + + YES + + + + + + 521 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 372.IBPluginDependency + 450.IBPluginDependency + 460.IBPluginDependency + 490.IBPluginDependency + 491.IBPluginDependency + 495.IBPluginDependency + 499.IBPluginDependency + 500.IBPluginDependency + 501.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 507.IBPluginDependency + 520.IBPluginDependency + 521.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 + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 535 + + + + YES + + AppController + NSObject + + IBProjectSource + ./Classes/AppController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + NSSwitch + {15, 15} + + + diff --git a/Tests/Manual/CPColorWellBindings/Resources/spinner.gif b/Tests/Manual/CPColorWellBindings/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/CPColorWellBindings/Resources/spinner.gif differ diff --git a/Tests/Manual/CPColorWellBindings/index-debug.html b/Tests/Manual/CPColorWellBindings/index-debug.html new file mode 100644 index 000000000..b63f30a55 --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/index-debug.html @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + CPColorWellBindings + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPColorWellBindings/index.html b/Tests/Manual/CPColorWellBindings/index.html new file mode 100644 index 000000000..121dcd10f --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + CPColorWellBindings + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPColorWellBindings/main.j b/Tests/Manual/CPColorWellBindings/main.j new file mode 100644 index 000000000..f9bbf70d6 --- /dev/null +++ b/Tests/Manual/CPColorWellBindings/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CPColorWellBindings + * + * Created by You on January 27, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CPGraphicsTest/AppController.j b/Tests/Manual/CPGraphicsTest/AppController.j index 43936c59a..a433a6b44 100644 --- a/Tests/Manual/CPGraphicsTest/AppController.j +++ b/Tests/Manual/CPGraphicsTest/AppController.j @@ -15,14 +15,15 @@ @outlet CustomDrawView view2; @outlet CustomDrawView view3; @outlet CustomDrawView view4; + + @outlet CustomDrawView gradientView0; + @outlet CustomDrawView gradientView1; + @outlet CustomDrawView gradientView2; + @outlet CustomDrawView gradientView3; } - (void)awakeFromCib { - [view1 setDelegate:self]; - [view2 setDelegate:self]; - [view3 setDelegate:self]; - [view4 setDelegate:self]; } - (void)viewWillDraw:(CPView)aView dirtyRect:(CGRect)dirtyRect @@ -30,6 +31,12 @@ var context = [[CPGraphicsContext currentContext] graphicsPort], innerRect; + var grad0 = aView == gradientView0, + grad1 = aView == gradientView1, + grad2 = aView == gradientView2, + grad3 = aView == gradientView3, + isGradient = (grad0 || grad1 || grad2 || grad3); + if (aView === view1 || aView === view2) { var bounds = [aView bounds], @@ -65,9 +72,53 @@ innerRect = CPDrawColorTiledRects(bounds, bounds, sides, colors); } + else if (isGradient) + { + var bounds = [aView bounds], + colors, + gradient; - CGContextSetFillColor(context, [CPColor colorWithHexString:@"E1EAFF"]); - CGContextFillRect(context, innerRect); + if (grad1 || grad3) + { + // Draw a pattern for the gradient to blend with. + strokeGrid(bounds); + } + + if (grad0) + { + var locationsGrad0 = [ 0.0, 0.25, 0.50, 0.75, 1.0 ]; + colors = [CPArray arrayWithObjects:[CPColor blackColor], [CPColor redColor], [CPColor greenColor], [CPColor blueColor], [CPColor whiteColor]]; + gradient = [[CPGradient alloc] initWithColors:colors atLocations:locationsGrad0 colorSpace:[CPColorSpace sRGBColorSpace]]; + [gradient drawInRect:bounds angle:0]; + } + else if (grad1) + { + var mainColor = [CPColor orangeColor], + locationsGrad1 = [ 0.0, 0.45, 0.56, 1.0 ]; + colors = [CPArray arrayWithObjects:[mainColor colorWithAlphaComponent:0.0], mainColor, mainColor, [mainColor colorWithAlphaComponent:0.0]]; + gradient = [[CPGradient alloc] initWithColors:colors atLocations:locationsGrad1 colorSpace:[CPColorSpace sRGBColorSpace]]; + [gradient drawInRect:bounds angle:90]; + } + else if (grad2) + { + colors = [CPArray arrayWithObjects:[CPColor cyanColor], [CPColor magentaColor], [CPColor yellowColor], [CPColor blackColor]]; + gradient = [[CPGradient alloc] initWithColors:colors]; + [gradient drawInRect:bounds angle:225]; + } + else + { + + colors = [CPArray arrayWithObjects:[[CPColor cyanColor] colorWithAlphaComponent:0.5], [CPColor magentaColor], [CPColor clearColor], [CPColor whiteColor]]; + gradient = [[CPGradient alloc] initWithColors:colors]; + [gradient drawInRect:bounds angle:-20]; + } + } + + if (!isGradient) + { + CGContextSetFillColor(context, [CPColor colorWithHexString:@"E1EAFF"]); + CGContextFillRect(context, innerRect); + } } @end @@ -75,7 +126,7 @@ @implementation CustomDrawView : CPView { - id _delegate @accessors(property=delegate); + @outlet id _delegate @accessors(property=delegate); } - (void)drawRect:(CGRect)dirtyRect @@ -85,3 +136,22 @@ } @end + + +function strokeGrid(/* CGRect */ rect) +{ + [CPBezierPath setDefaultLineWidth:1]; + [[CPColor whiteColor] setFill]; + [[[CPColor blueColor] colorWithAlphaComponent:0.5] setStroke]; + + var mx = CGRectGetMaxX(rect), + my = CGRectGetMaxY(rect); + + [CPBezierPath fillRect:rect]; + + for (var x = rect.origin.x; x < mx; x += 6) + [CPBezierPath strokeLineFromPoint:CGPointMake(x + 0.5, rect.origin.y + 0.5) toPoint:CGPointMake(x + 0.5, my - 0.5)]; + + for (var y = rect.origin.y; y < my; y += 6) + [CPBezierPath strokeLineFromPoint:CGPointMake(rect.origin.x + 0.5, y + 0.5) toPoint:CGPointMake(mx - 0.5, y + 0.5)]; +} diff --git a/Tests/Manual/CPGraphicsTest/Resources/MainMenu.cib b/Tests/Manual/CPGraphicsTest/Resources/MainMenu.cib index 0c682c887..104c1a7e8 100644 --- a/Tests/Manual/CPGraphicsTest/Resources/MainMenu.cib +++ b/Tests/Manual/CPGraphicsTest/Resources/MainMenu.cib @@ -1 +1 @@ -280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;57E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;2;64E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;27E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;65E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;66E;E;D;K;10;$classnameS;11;CPTextFieldK;8;$classesA;S;11;CPTextFieldS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;67E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;68E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;72E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;73E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;74E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;75E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;76E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;76E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;73E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;65E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;77E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;68E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;72E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;73E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;78E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;75E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;76E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;76E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;73E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;16;_CPCibCustomViewK;8;$classesA;S;16;_CPCibCustomViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;79E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;81E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;82E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;81E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;83E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;84E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;85E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;86E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;87E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;36E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;88E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;89E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;72E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;73E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;90E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;75E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;76E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;76E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;73E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;91E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;92E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;93E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;94E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;95E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;75E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;76E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;76E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;94E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;96E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;97E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;81E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;98E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;99E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;93E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;94E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;100E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;75E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;76E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;76E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;94E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;101E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;89E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;6;$afontD;K;6;CP$UIDd;2;72E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;73E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;102E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;75E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;76E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;76E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;73E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;36E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;103E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;36E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;81E;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;35E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;104E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;104E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;105E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;E;S;27;Static Text (Single border)S;41;Text Field Cell (Bezel using full bounds)S;11;ApplicationS;50;Text Field Cell (Bezel clipping half horizontally)S;37;Static Text (Bezel using full bounds)S;16;Custom Draw ViewS;18;Custom Draw View-1S;24;Window (CPGraphics Test)S;46;Static Text (Bezel clipping half horizontally)S;30;Static Text (CPDrawTiledRects)S;12;File's OwnerS;39;Text Field Cell (CPDrawColorTiledRects)S;14;App ControllerS;31;Text Field Cell (Single border)S;18;Custom Draw View-2S;35;Static Text (CPDrawColorTiledRects)S;27;Static Text (Triple border)S;31;Text Field Cell (Triple border)S;18;Custom Draw View-3S;34;Text Field Cell (CPDrawTiledRects)S;12;Content ViewD;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;58E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;107E;E;D;K;6;$classD;K;6;CP$UIDd;2;58E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;108E;E;D;K;6;$classD;K;6;CP$UIDd;2;58E;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;3;109E;E;D;K;6;$classD;K;6;CP$UIDd;2;58E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;24E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;110E;E;D;K;6;$classD;K;6;CP$UIDd;2;58E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;58E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;25E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;112E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;27E;E;E;S;22;{{11, 330}, {177, 22}}S;19;{{0, 0}, {177, 22}}d;2;36S;6;normalD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;71E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;113E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;114E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;76E;E;d;1;2S;13;Single borderd;4;3072F;S;22;{{13, 149}, {177, 22}}S;23;Bezel using full boundsS;22;{{234, 49}, {163, 96}}S;19;{{0, 0}, {163, 96}}S;14;CustomDrawViewS;23;{{234, 230}, {163, 96}}S;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;23;{{408, 63}, {417, 368}}d;1;7S;15;CPGraphics TestS;23;{{225, 149}, {181, 22}}S;19;{{0, 0}, {181, 22}}S;32;Bezel clipping half horizontallyS;21;{{13, 14}, {182, 30}}S;19;{{0, 0}, {182, 30}}D;K;6;$classD;K;6;CP$UIDd;2;71E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;113E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;106E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;115E;E;d;1;4S;16;CPDrawTiledRectsS;13;AppControllerS;21;{{20, 49}, {163, 96}}S;22;{{13, 195}, {231, 30}}S;19;{{0, 0}, {231, 30}}S;21;CPDrawColorTiledRectsS;23;{{223, 330}, {181, 22}}S;13;Triple borderS;22;{{20, 230}, {163, 96}}S;20;{{0, 0}, {417, 368}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;33E;E;E;d;2;18S;8;delegateS;9;theWindowS;5;view1S;5;view2S;5;view3S;5;view4S;32;Lucida Grande, Arial, sans-serifd;2;11T;E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file +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;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;28E;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;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;33E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;1;0E;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;1;0E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;1;0E;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;1;0E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;79E;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;35E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;11E;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;80E;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;81E;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;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;82E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;61E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;83E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;62E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;84E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;71E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;85E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;72E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;86E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;35E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;87E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;88E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;44E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;42E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;79E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;45E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;43E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;44E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;42E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;45E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;61E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;62E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;71E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;72E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;79E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;80E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;34E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;93E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;94E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;95E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;96E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;97E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;37E;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;36E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;99E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;99E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;100E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;101E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;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;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;103E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;104E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;108E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;110E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;112E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;110E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;115E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;116E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;117E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;110E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;118E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;110E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;16;_CPCibCustomViewK;8;$classesA;S;16;_CPCibCustomViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;119E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;122E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;124E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;125E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;127E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;128E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;129E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;131E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;132E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;133E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;134E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;135E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;136E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;137E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;138E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;5;CPBoxK;8;$classesA;S;5;CPBoxS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;50E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;139E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;140E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;25;CPViewAutoresizesSubviewsD;K;6;CP$UIDd;2;98E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;12;CPBoxTypeKeyD;K;6;CP$UIDd;3;109E;K;18;CPBoxBorderTypeKeyD;K;6;CP$UIDd;3;141E;K;19;CPBoxBorderColorKeyD;K;6;CP$UIDd;3;143E;K;17;CPBoxFillColorKeyD;K;6;CP$UIDd;3;144E;K;20;CPBoxCornerRadiusKeyD;K;6;CP$UIDd;2;98E;K;19;CPBoxBorderWidthKeyD;K;6;CP$UIDd;3;145E;K;10;CPBoxTitleD;K;6;CP$UIDd;3;146E;K;18;CPBoxTitlePositionD;K;6;CP$UIDd;2;98E;K;14;CPBoxTitleViewD;K;6;CP$UIDd;1;0E;K;21;CPBoxContentMarginKeyD;K;6;CP$UIDd;3;147E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;148E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;149E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;150E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;110E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;151E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;110E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;152E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;153E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;128E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;154E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;155E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;132E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;156E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;157E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;135E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;158E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;159E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;138E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;11;CPImageViewK;8;$classesA;S;11;CPImageViewS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;160E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;163E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;165E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;166E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;167E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;168E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;110E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;169E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;110E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;170E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;171E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;172E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;173E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;174E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;176E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;177E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;178E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;179E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;180E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;181E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;174E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;182E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;183E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;177E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;184E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;185E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;186E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;187E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;188E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;189E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;190E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;191E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;192E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;193E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;194E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;195E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;196E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;197E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;198E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;199E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;194E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;200E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;130E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;6;$afontD;K;6;CP$UIDd;3;201E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;109E;K;11;$aalignmentD;K;6;CP$UIDd;3;109E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;3;111E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;197E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;113E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;114E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;114E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;109E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;109E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;202E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;203E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;57E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;98E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;204E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;161E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;102E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;109E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;98E;K;11;$aalignmentD;K;6;CP$UIDd;2;98E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;205E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;206E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;35E;E;E;S;8;delegateS;13;gradientView0S;13;gradientView1S;13;gradientView2S;13;gradientView3S;9;theWindowS;5;view1S;5;view2S;5;view3S;5;view4S;9;_delegateS;32;{10000000000000, 10000000000000}S;8;CPWindowS;24;{{408, 148}, {840, 673}}d;1;7S;15;CPGraphics Testd;1;0S;20;{{0, 0}, {840, 673}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;42E;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;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;58E;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;65E;D;K;6;CP$UIDd;2;68E;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;66E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;71E;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;E;E;d;2;18S;6;normalS;21;{{17, 17}, {174, 24}}S;19;{{0, 0}, {174, 24}}d;2;36S;9;textfieldD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;101E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;111E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;d;1;2d;1;4T;S;16;CPDrawTiledRectsd;4;3072F;S;22;{{17, 198}, {223, 24}}S;19;{{0, 0}, {223, 24}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;101E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;111E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;21;CPDrawColorTiledRectsS;22;{{20, 230}, {163, 96}}S;19;{{0, 0}, {163, 96}}S;14;CustomDrawViewS;21;{{20, 49}, {163, 96}}S;22;{{234, 49}, {163, 96}}S;23;{{234, 230}, {163, 96}}S;22;{{17, 153}, {169, 14}}S;19;{{0, 0}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;Bezel using full boundsS;23;{{229, 153}, {173, 14}}S;19;{{0, 0}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;32;Bezel clipping half horizontallyS;22;{{15, 334}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;13;Single borderS;23;{{227, 334}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;13;Triple borderS;21;{{418, 12}, {5, 649}}S;18;{{0, 0}, {5, 649}}d;1;3D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;142E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;209E;E;D;K;6;$classD;K;6;CP$UIDd;3;142E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;210E;E;d;1;1S;3;BoxS;6;{0, 0}S;22;{{438, 19}, {207, 24}}S;19;{{0, 0}, {207, 24}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;101E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;111E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;20;Reference RenderingsS;23;{{438, 155}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{650, 155}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{436, 336}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{648, 336}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{438, 46}, {169, 102}}S;20;{{0, 0}, {169, 102}}D;K;10;$classnameS;20;_CPCibCustomResourceK;8;$classesA;S;20;_CPCibCustomResourceS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;212E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;214E;E;S;24;{{648, 227}, {169, 102}}D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;215E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;216E;E;S;22;{{19, 377}, {108, 24}}S;19;{{0, 0}, {108, 24}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;101E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;111E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;10;CPGradientS;22;{{22, 409}, {163, 96}}S;23;{{236, 409}, {163, 96}}S;22;{{17, 513}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;5;SolidS;23;{{229, 513}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;12;TransparencyS;24;{{438, 227}, {169, 102}}D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;217E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;218E;E;S;23;{{438, 513}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{650, 513}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{648, 46}, {169, 102}}D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;219E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;220E;E;S;24;{{438, 406}, {169, 102}}D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;221E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;222E;E;S;24;{{648, 406}, {169, 102}}D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;223E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;224E;E;S;22;{{22, 535}, {163, 96}}S;23;{{236, 535}, {163, 96}}S;22;{{17, 639}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;4;225ºS;23;{{229, 639}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;4;-20ºS;23;{{438, 642}, {169, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{650, 642}, {173, 14}}D;K;6;$classD;K;6;CP$UIDd;3;107E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;207E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;208E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;114E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;114E;E;S;24;{{438, 535}, {169, 102}}D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;225E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;226E;E;S;24;{{648, 535}, {169, 102}}D;K;6;$classD;K;6;CP$UIDd;3;162E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;211E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;227E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;228E;E;S;13;AppControllerS;17;Arial, sans-serifd;2;11D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;3;229E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;98E;E;E;S;7;CPImageS;9;view1.pngD;K;10;$classnameS;12;CPDictionaryK;8;$classesA;S;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;231E;E;E;S;9;view4.pngD;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;232E;E;E;S;9;view3.pngD;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;233E;E;E;S;9;view2.pngD;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;234E;E;E;S;9;grad0.pngD;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;235E;E;E;S;9;grad1.pngD;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;236E;E;E;S;9;grad2.pngD;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;237E;E;E;S;9;grad3.pngD;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;238E;E;E;f;4;0.42D;K;10;$classnameS;21;_CPKeyedArchiverValueK;8;$classesA;S;21;_CPKeyedArchiverValueS;7;CPValueS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;D;K;6;$classD;K;6;CP$UIDd;3;230E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;239E;E;S;25;{"width":163,"height":96}E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPGraphicsTest/Resources/MainMenu.xib b/Tests/Manual/CPGraphicsTest/Resources/MainMenu.xib index e7ad42114..432befe48 100644 --- a/Tests/Manual/CPGraphicsTest/Resources/MainMenu.xib +++ b/Tests/Manual/CPGraphicsTest/Resources/MainMenu.xib @@ -1,22 +1,33 @@ - 1060 - 10F569 - 788 - 1038.29 - 461.00 + 1070 + 11D50 + 1938 + 1138.32 + 568.00 com.apple.InterfaceBuilder.CocoaPlugin - 788 + 1938 - - + + NSTextField + NSView + NSWindowTemplate + NSCustomObject + NSBox + NSCustomView + NSImageCell + NSImageView + NSTextFieldCell com.apple.InterfaceBuilder.CocoaPlugin - + + PluginDependencyRecalculationVersion + + NSApplication @@ -30,12 +41,12 @@ 7 2 - {{408, 597}, {417, 368}} + {{408, 597}, {840, 673}} 1946157056 CPGraphics Test NSWindow - {1.79769e+308, 1.79769e+308} + 274 @@ -43,8 +54,10 @@ 268 - {{17, 328}, {174, 22}} + {{17, 633}, {174, 22}} + + YES 68288064 @@ -79,22 +92,28 @@ 268 - {{20, 223}, {163, 96}} + {{20, 528}, {163, 96}} + + CustomDrawView 268 - {{234, 223}, {163, 96}} + {{234, 528}, {163, 96}} + + CustomDrawView 268 - {{17, 147}, {223, 22}} + {{17, 452}, {223, 22}} + + YES 68288064 @@ -109,22 +128,28 @@ 268 - {{20, 42}, {163, 96}} + {{20, 347}, {163, 96}} + + CustomDrawView 268 - {{234, 42}, {163, 96}} + {{234, 347}, {163, 96}} + + CustomDrawView 268 - {{17, 201}, {169, 14}} + {{17, 506}, {169, 14}} + + YES 68288064 @@ -143,8 +168,10 @@ 268 - {{229, 201}, {173, 14}} + {{229, 506}, {173, 14}} + + YES 68288064 @@ -159,8 +186,10 @@ 268 - {{15, 20}, {169, 14}} + {{15, 325}, {169, 14}} + + YES 68288064 @@ -175,8 +204,10 @@ 268 - {{227, 20}, {173, 14}} + {{227, 325}, {173, 14}} + + YES 68288064 @@ -188,12 +219,596 @@ + + + 12 + {{418, 12}, {5, 649}} + + + + _NS:2168 + {0, 0} + + 67239424 + 0 + Box + + LucidaGrande + 13 + 1044 + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + 3 + 2 + 0 + NO + + + + 268 + {{438, 631}, {207, 22}} + + + + YES + + 68288064 + 272630784 + Reference Renderings + + + + + + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{438, 525}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + view1 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + + + + 268 + {{438, 504}, {169, 14}} + + + + YES + + 68288064 + 138544128 + Bezel using full bounds + + + + + + + + + 268 + {{650, 504}, {173, 14}} + + + + YES + + 68288064 + 138544128 + Bezel clipping half horizontally + + + + + + + + + 268 + {{436, 323}, {169, 14}} + + + + YES + + 68288064 + 138544128 + Single border + + + + + + + + + 268 + {{648, 323}, {173, 14}} + + + + YES + + 68288064 + 138544128 + Triple border + + + + + + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{438, 344}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + view3 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{648, 525}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + view2 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{648, 344}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + view4 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + + + + 268 + {{19, 273}, {108, 22}} + + + + YES + + 68288064 + 272630784 + CPGradient + + + + + + + + + 268 + {{22, 168}, {163, 96}} + + + + CustomDrawView + + + + 268 + {{236, 168}, {163, 96}} + + + + CustomDrawView + + + + 268 + {{17, 146}, {169, 14}} + + + + YES + + 68288064 + 138544128 + Solid + + + + + + + + + 268 + {{229, 146}, {173, 14}} + + + + YES + + 68288064 + 138544128 + Transparency + + + + + + + + + 268 + {{438, 146}, {169, 14}} + + + + YES + + 68288064 + 138544128 + Solid + + + + + + + + + 268 + {{650, 146}, {173, 14}} + + + + YES + + 68288064 + 138544128 + Transparency + + + + + + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{438, 165}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + grad0 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{648, 165}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + grad1 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + + + + 268 + {{22, 42}, {163, 96}} + + + + CustomDrawView + + + + 268 + {{236, 42}, {163, 96}} + + + + CustomDrawView + + + + 268 + {{17, 20}, {169, 14}} + + + + YES + + 68288064 + 138544128 + 225º + + + + + + + + + 268 + {{229, 20}, {173, 14}} + + + + YES + + 68288064 + 138544128 + -20º + + + + + + + + + 268 + {{438, 17}, {169, 14}} + + + + YES + + 68288064 + 138544128 + 225º + + + + + + + + + 268 + {{650, 17}, {173, 14}} + + + + YES + + 68288064 + 138544128 + -20º + + + + + + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{438, 36}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + grad2 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + + + + 268 + + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + {{648, 36}, {169, 102}} + + + + _NS:2141 + YES + + 130560 + 33554432 + + NSImage + grad3 + + _NS:2141 + 0 + 2 + 0 + NO + + YES + - {417, 368} + {840, 673} + + - {{0, 0}, {1680, 1028}} - {1.79769e+308, 1.79769e+308} + {{0, 0}, {2560, 1418}} + {10000000000000, 10000000000000} + YES AppController @@ -249,6 +864,102 @@ 1121 + + + gradientView0 + + + + 1173 + + + + gradientView1 + + + + 1174 + + + + gradientView2 + + + + 1197 + + + + gradientView3 + + + + 1198 + + + + _delegate + + + + 1177 + + + + _delegate + + + + 1178 + + + + _delegate + + + + 1179 + + + + _delegate + + + + 1180 + + + + _delegate + + + + 1175 + + + + _delegate + + + + 1176 + + + + _delegate + + + + 1188 + + + + _delegate + + + + 1187 + @@ -298,6 +1009,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -404,9 +1142,322 @@ + + 1130 + + + + + 1131 + + + + + + + + 1137 + + + + + + + + 1138 + + + + + + + + 1139 + + + + + + + + 1140 + + + + + + + + 1141 + + + + + 1142 + + + + + 1143 + + + + + 1144 + + + + + 1146 + + + + + 1147 + + + + + + + + 1148 + + + + + 1149 + + + + + + + + 1150 + + + + + 1151 + + + + + + + + 1152 + + + + + 1153 + + + + + + + + 1154 + + + + + 1155 + + + + + + + + 1156 + + + + + 1157 + + + + + 1158 + + + + + + + + 1159 + + + + + + + + 1160 + + + + + 1161 + + + + + 1162 + + + + + 1165 + + + + + + + + 1166 + + + + + + + + 1167 + + + + + 1168 + + + + + 1169 + + + + + + + + 1170 + + + + + + + + 1171 + + + + + 1172 + + + + + 1181 + + + + + 1182 + + + + + 1183 + + + + + + + + 1184 + + + + + + + + 1185 + + + + + 1186 + + + + + 1189 + + + + + + + + 1190 + + + + + + + + 1191 + + + + + + + + 1192 + + + + + + + + 1193 + + + + + 1194 + + + + + 1195 + + + + + 1196 + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -424,78 +1475,138 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{469, 508}, {417, 368}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin {{469, 508}, {417, 368}} - {{33, 99}, {480, 360}} com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - 1129 + 1198 AppController NSObject - - id - id - - - - setFontFamily: - id - - - setFontSize: - id - - - NSWindow - NSView - NSView - NSView - NSView + CustomDrawView + CustomDrawView + CustomDrawView + CustomDrawView + CustomDrawView + CustomDrawView + CustomDrawView + CustomDrawView - - theWindow - NSWindow + + gradientView0 + CustomDrawView + + + gradientView1 + CustomDrawView + + + gradientView2 + CustomDrawView + + + gradientView3 + CustomDrawView view1 - NSView + CustomDrawView view2 - NSView + CustomDrawView view3 - NSView + CustomDrawView view4 - NSView + CustomDrawView - IBUserSource - + IBProjectSource + ./Classes/AppController.h CustomDrawView NSView + + _delegate + id + + + _delegate + + _delegate + id + + - IBUserSource - + IBProjectSource + ./Classes/CustomDrawView.h @@ -503,7 +1614,16 @@ 0 IBCocoaFramework YES - ../registration.xcodeproj 3 + + {163, 96} + {163, 96} + {163, 96} + {163, 96} + {163, 96} + {163, 96} + {163, 96} + {163, 96} + diff --git a/Tests/Manual/CPGraphicsTest/Resources/grad0.png b/Tests/Manual/CPGraphicsTest/Resources/grad0.png new file mode 100644 index 000000000..1127a7b99 Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/grad0.png differ diff --git a/Tests/Manual/CPGraphicsTest/Resources/grad1.png b/Tests/Manual/CPGraphicsTest/Resources/grad1.png new file mode 100644 index 000000000..41a9fab6b Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/grad1.png differ diff --git a/Tests/Manual/CPGraphicsTest/Resources/grad2.png b/Tests/Manual/CPGraphicsTest/Resources/grad2.png new file mode 100644 index 000000000..b8f140ab5 Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/grad2.png differ diff --git a/Tests/Manual/CPGraphicsTest/Resources/grad3.png b/Tests/Manual/CPGraphicsTest/Resources/grad3.png new file mode 100644 index 000000000..f1c5ad690 Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/grad3.png differ diff --git a/Tests/Manual/CPGraphicsTest/Resources/view1.png b/Tests/Manual/CPGraphicsTest/Resources/view1.png new file mode 100644 index 000000000..6539a91a8 Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/view1.png differ diff --git a/Tests/Manual/CPGraphicsTest/Resources/view2.png b/Tests/Manual/CPGraphicsTest/Resources/view2.png new file mode 100644 index 000000000..e8032bbd3 Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/view2.png differ diff --git a/Tests/Manual/CPGraphicsTest/Resources/view3.png b/Tests/Manual/CPGraphicsTest/Resources/view3.png new file mode 100644 index 000000000..f192d596f Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/view3.png differ diff --git a/Tests/Manual/CPGraphicsTest/Resources/view4.png b/Tests/Manual/CPGraphicsTest/Resources/view4.png new file mode 100644 index 000000000..bb20a6ac6 Binary files /dev/null and b/Tests/Manual/CPGraphicsTest/Resources/view4.png differ diff --git a/Tests/Manual/CPImageViewAlignmentScaling/AppController.j b/Tests/Manual/CPImageViewAlignmentScaling/AppController.j new file mode 100644 index 000000000..74b4df51b --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/AppController.j @@ -0,0 +1,39 @@ +/* + * AppController.j + * CPImageViewScaling + * + * Created by aparajita on April 12, 2012. + * Copyright 2012, Victory-Heart Productions All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ +} + +- (void)awakeFromCib +{ +} + +@end + + +@implementation MyImageView : CPImageView + +- (void)drawRect:(CGRect)aRect +{ + var path = [CPBezierPath bezierPathWithRect:[self bounds]]; + + [[CPColor greenColor] set]; + [path setLineWidth:1]; + [path stroke]; +} + +@end diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Info.plist b/Tests/Manual/CPImageViewAlignmentScaling/Info.plist new file mode 100644 index 000000000..5860761a8 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/Info.plist @@ -0,0 +1,10 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + CPImageViewScaling + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Jakefile b/Tests/Manual/CPImageViewAlignmentScaling/Jakefile new file mode 100644 index 000000000..e0f9f9845 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/Jakefile @@ -0,0 +1,94 @@ +/* + * Jakefile + * CPImageViewScaling + * + * Created by aparajita on April 12, 2012. + * Copyright 2012, Victory-Heart Productions 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 ("CPImageViewScaling", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPImageViewScaling.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPImageViewScaling"); + task.setIdentifier("com.aparajita.CPImageViewScaling"); + task.setVersion("1.0"); + task.setAuthor("Victory-Heart Productions"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPImageViewScaling"); + 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", ["CPImageViewScaling"], 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", "CPImageViewScaling", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPImageViewScaling", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPImageViewScaling")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPImageViewScaling"), FILE.join("Build", "Deployment", "CPImageViewScaling")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPImageViewScaling")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPImageViewScaling"), FILE.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPImageViewScaling")); + print("----------------------------"); +} diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.cib b/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.cib new file mode 100644 index 000000000..20f3b224f --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/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;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;17E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;1;0E;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;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;52E;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;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;11E;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;53E;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;54E;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;52E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;55E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;52E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;19E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;53E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;18E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;57E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;58E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;59E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;60E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;61E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;21E;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;20E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;63E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;63E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;64E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;E;D;K;10;$classnameS;18;_CPCibClassSwapperK;8;$classesA;S;18;_CPCibClassSwapperS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;66E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;69E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;75E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;76E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;77E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;78E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;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;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;79E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;85E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;88E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;89E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;90E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;91E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;92E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;72E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;93E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;94E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;95E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;96E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;97E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;98E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;99E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;100E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;3;101E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;102E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;103E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;104E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;105E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;3;106E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;107E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;108E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;109E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;110E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;3;111E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;112E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;113E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;114E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;115E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;60E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;116E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;117E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;118E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;119E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;121E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;122E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;62E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;124E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;125E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;126E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;127E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;128E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;129E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;130E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;131E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;78E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;132E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;133E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;134E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;135E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;136E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;131E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;76E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;137E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;138E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;108E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;139E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;140E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;141E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;78E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;142E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;141E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;62E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;143E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;19E;E;E;S;8;delegateS;9;theWindowS;32;{10000000000000, 10000000000000}S;8;CPWindowS;23;{{104, 62}, {742, 591}}d;1;7S;16;CPImageView Testd;1;0S;20;{{0, 0}, {742, 591}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;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;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;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;42E;D;K;6;CP$UIDd;2;44E;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;E;E;S;6;normalS;20;{{58, 60}, {70, 70}}S;18;{{0, 0}, {70, 70}}d;2;36d;1;2D;K;10;$classnameS;20;_CPCibCustomResourceK;8;$classesA;S;20;_CPCibCustomResourceS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;70E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;144E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;145E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;147E;E;d;1;4S;11;MyImageViewS;11;CPImageViewS;21;{{140, 60}, {70, 70}}d;1;1S;21;{{224, 60}, {70, 70}}d;1;3S;21;{{58, 135}, {70, 17}}S;18;{{0, 0}, {70, 17}}S;9;textfieldD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;T;S;8;top leftd;4;3072F;S;22;{{140, 135}, {70, 17}}S;3;topS;22;{{224, 135}, {70, 17}}S;9;top rightS;21;{{58, 175}, {70, 70}}S;21;{{58, 250}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;4;leftS;22;{{140, 175}, {70, 70}}S;22;{{140, 250}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;6;centerS;22;{{224, 175}, {70, 70}}d;1;8S;22;{{224, 250}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;5;rightS;21;{{58, 294}, {70, 70}}d;1;6S;21;{{58, 369}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;8;bot leftS;22;{{140, 294}, {70, 70}}d;1;5S;22;{{140, 369}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;6;bottomS;22;{{224, 294}, {70, 70}}S;22;{{224, 369}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;9;bot rightS;21;{{58, 25}, {171, 21}}S;19;{{0, 0}, {171, 21}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;150E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;84E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;9;AlignmentS;21;{{381, 60}, {70, 70}}S;22;{{381, 25}, {171, 21}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;150E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;84E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;7;ScalingS;23;{{381, 135}, {219, 17}}S;19;{{0, 0}, {219, 17}}S;30;CPImageScaleProportionallyDownS;23;{{381, 175}, {138, 70}}S;19;{{0, 0}, {138, 70}}S;23;{{381, 250}, {247, 17}}S;19;{{0, 0}, {247, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;34;CPImageScaleProportionallyUpOrDownS;23;{{381, 294}, {138, 70}}S;23;{{381, 369}, {211, 17}}S;19;{{0, 0}, {211, 17}}S;29;CPImageScaleAxesIndependentlyS;22;{{541, 175}, {76, 31}}S;18;{{0, 0}, {76, 31}}S;21;{{541, 60}, {76, 31}}S;13;AppControllerS;7;CPImageS;7;box.pngD;K;10;$classnameS;12;CPDictionaryK;8;$classesA;S;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;146E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;152E;E;E;S;17;Arial, sans-serifd;2;12d;2;16D;K;10;$classnameS;21;_CPKeyedArchiverValueK;8;$classesA;S;21;_CPKeyedArchiverValueS;7;CPValueS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;151E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;153E;E;S;24;{"width":50,"height":50}E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.xib b/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.xib new file mode 100644 index 000000000..13370dbe2 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.xib @@ -0,0 +1,1548 @@ + + + + 1050 + 11D50 + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTextField + NSView + NSWindowTemplate + NSTextFieldCell + NSImageCell + NSImageView + NSCustomObject + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{104, 525}, {742, 591}} + 1946157056 + CPImageView Test + NSWindow + + + + + 256 + + YES + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{58, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + NSImage + box.png + + _NS:9 + 2 + 2 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{140, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 1 + 2 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{224, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 3 + 2 + 2 + NO + + YES + + + + 268 + {{58, 439}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + top left + + LucidaGrande + 13 + 1044 + + _NS:1505 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{140, 439}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + top + + _NS:1505 + + + + + + + + 268 + {{224, 439}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + top right + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{381, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 0 + 2 + NO + + YES + + + + 268 + {{381, 439}, {219, 17}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + CPImageScaleProportionallyDown + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{381, 346}, {138, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 3 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{541, 385}, {76, 31}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 3 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{541, 500}, {76, 31}} + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 0 + 2 + NO + + YES + + + + 268 + {{381, 324}, {247, 17}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + CPImageScaleProportionallyUpOrDown + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{381, 227}, {138, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 1 + 2 + NO + + YES + + + + 268 + {{381, 205}, {211, 17}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + CPImageScaleAxesIndependently + + _NS:1505 + + + + + + + + 268 + {{58, 546}, {171, 19}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + Alignment + + LucidaGrande-Bold + 16 + 16 + + _NS:1505 + + + + + + + + 268 + {{381, 546}, {171, 19}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + Scaling + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{58, 346}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 4 + 2 + 2 + NO + + YES + + + + 268 + {{58, 324}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + left + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{140, 346}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 2 + 2 + NO + + YES + + + + 268 + {{140, 324}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + center + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{224, 346}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 8 + 2 + 2 + NO + + YES + + + + 268 + {{224, 324}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + right + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{58, 227}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 6 + 2 + 2 + NO + + YES + + + + 268 + {{58, 205}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + bot left + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{140, 227}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 5 + 2 + 2 + NO + + YES + + + + 268 + {{140, 205}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + bottom + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{224, 227}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 7 + 2 + 2 + NO + + YES + + + + 268 + {{224, 205}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + bot right + + _NS:1505 + + + + + + + {742, 591} + + + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + AppController + + + + + YES + + + delegate + + + + 451 + + + + theWindow + + + + 459 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 450 + + + + + 484 + + + YES + + + + + + 485 + + + + + 492 + + + YES + + + + + + 493 + + + + + 494 + + + YES + + + + + + 495 + + + + + 496 + + + YES + + + + + + 497 + + + + + 498 + + + YES + + + + + + 499 + + + + + 500 + + + YES + + + + + + 501 + + + + + 502 + + + YES + + + + + + 503 + + + YES + + + + + + 504 + + + + + 505 + + + + + 506 + + + YES + + + + + + 507 + + + YES + + + + + + 508 + + + + + 509 + + + + + 510 + + + YES + + + + + + 511 + + + YES + + + + + + 512 + + + + + 513 + + + + + 514 + + + YES + + + + + + 515 + + + YES + + + + + + 516 + + + YES + + + + + + 517 + + + YES + + + + + + 518 + + + YES + + + + + + 519 + + + YES + + + + + + 520 + + + + + 521 + + + + + 522 + + + + + 523 + + + + + 524 + + + + + 525 + + + + + 526 + + + YES + + + + + + 527 + + + YES + + + + + + 528 + + + + + 529 + + + + + 530 + + + YES + + + + + + 531 + + + + + 532 + + + YES + + + + + + 533 + + + + + 534 + + + YES + + + + + + 535 + + + YES + + + + + + 536 + + + + + 537 + + + + + 538 + + + YES + + + + + + 539 + + + YES + + + + + + 540 + + + + + 541 + + + + + 542 + + + YES + + + + + + 543 + + + + + 544 + + + YES + + + + + + 545 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 372.IBPluginDependency + 450.IBPluginDependency + 484.CustomClassName + 484.IBPluginDependency + 485.IBPluginDependency + 492.CustomClassName + 492.IBPluginDependency + 493.IBPluginDependency + 494.CustomClassName + 494.IBPluginDependency + 495.IBPluginDependency + 496.IBPluginDependency + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 500.IBPluginDependency + 501.IBPluginDependency + 502.CustomClassName + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 505.IBPluginDependency + 506.CustomClassName + 506.IBPluginDependency + 507.IBPluginDependency + 508.IBPluginDependency + 509.IBPluginDependency + 510.CustomClassName + 510.IBPluginDependency + 511.IBPluginDependency + 512.IBPluginDependency + 513.IBPluginDependency + 514.CustomClassName + 514.IBPluginDependency + 515.IBPluginDependency + 516.CustomClassName + 516.IBPluginDependency + 517.IBPluginDependency + 518.CustomClassName + 518.IBPluginDependency + 519.IBPluginDependency + 520.IBPluginDependency + 521.IBPluginDependency + 522.IBPluginDependency + 523.IBPluginDependency + 524.IBPluginDependency + 525.IBPluginDependency + 526.CustomClassName + 526.IBPluginDependency + 527.IBPluginDependency + 528.IBPluginDependency + 529.IBPluginDependency + 530.IBPluginDependency + 531.IBPluginDependency + 532.IBPluginDependency + 533.IBPluginDependency + 534.CustomClassName + 534.IBPluginDependency + 535.IBPluginDependency + 536.IBPluginDependency + 537.IBPluginDependency + 538.CustomClassName + 538.IBPluginDependency + 539.IBPluginDependency + 540.IBPluginDependency + 541.IBPluginDependency + 542.CustomClassName + 542.IBPluginDependency + 543.IBPluginDependency + 544.CustomClassName + 544.IBPluginDependency + 545.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 + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 545 + + + + YES + + AppController + NSObject + + IBProjectSource + ./Classes/AppController.h + + + + MyImageView + NSImageView + + IBProjectSource + ./Classes/MyImageView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + box.png + {128, 128} + + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/box.png b/Tests/Manual/CPImageViewAlignmentScaling/Resources/box.png new file mode 100644 index 000000000..d6d1141be Binary files /dev/null and b/Tests/Manual/CPImageViewAlignmentScaling/Resources/box.png differ diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/spinner.gif b/Tests/Manual/CPImageViewAlignmentScaling/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/CPImageViewAlignmentScaling/Resources/spinner.gif differ diff --git a/Tests/Manual/CPImageViewAlignmentScaling/index-debug.html b/Tests/Manual/CPImageViewAlignmentScaling/index-debug.html new file mode 100644 index 000000000..5ef913cb9 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/index-debug.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + CPImageViewScaling + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/index.html b/Tests/Manual/CPImageViewAlignmentScaling/index.html new file mode 100644 index 000000000..583b7fdd9 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + CPImageViewScaling + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/main.j b/Tests/Manual/CPImageViewAlignmentScaling/main.j new file mode 100644 index 000000000..9d75ced79 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CPImageViewScaling + * + * Created by aparajita on April 12, 2012. + * Copyright 2012, Victory-Heart Productions All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CPImageViewTest/AppController.j b/Tests/Manual/CPImageViewTest/AppController.j new file mode 100644 index 000000000..5e62e5fdf --- /dev/null +++ b/Tests/Manual/CPImageViewTest/AppController.j @@ -0,0 +1,51 @@ +/* + * AppController.j + * CPImageViewTest + * + * Created by Alexander Ljungberg on March 9, 2012. + * Copyright 2012, SlevenBits Ltd All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ + var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], + contentView = [theWindow contentView]; + + var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; + + [label setStringValue:@"The second image should be the left image with a shadow."]; + + [label sizeToFit]; + + [label setFrameOrigin:CGPointMake(20.0, 20.0)]; + + [contentView addSubview:label]; + + var imageView = [[CPImageView alloc] initWithFrame:CGRectMake(20.0, 50.0, 290.0, 250.0)], + image = CPImageInBundle("280px-1730_Homann_Map_of_Scandinavia,_Norway,_Sweden,_Denmark,_Finland_and_the_Baltics_-_Geographicus_-_Scandinavia-homann-1730.jpg", CGSizeMake(280, 240)), + imageViewShadow = [[CPImageView alloc] initWithFrame:CGRectMake(320.0, 50.0, 290.0, 250.0)]; + + [imageView setImageScaling:CPImageScaleNone]; + [imageViewShadow setImageScaling:CPImageScaleNone]; + + [imageView setImage:image]; + [imageViewShadow setImage:image]; + [imageViewShadow setHasShadow:YES]; + + [contentView addSubview:imageView]; + [contentView addSubview:imageViewShadow]; + + [theWindow orderFront:self]; + + // Uncomment the following line to turn on the standard menu bar. + //[CPMenu setMenuBarVisible:YES]; +} + +@end diff --git a/Tests/Manual/CPImageViewTest/Info.plist b/Tests/Manual/CPImageViewTest/Info.plist new file mode 100644 index 000000000..39700e843 --- /dev/null +++ b/Tests/Manual/CPImageViewTest/Info.plist @@ -0,0 +1,12 @@ + + + + + CPApplicationDelegateClass + AppController + CPBundleName + CPImageViewTest + CPPrincipalClass + CPApplication + + diff --git a/Tests/Manual/CPImageViewTest/Jakefile b/Tests/Manual/CPImageViewTest/Jakefile new file mode 100644 index 000000000..e129b8934 --- /dev/null +++ b/Tests/Manual/CPImageViewTest/Jakefile @@ -0,0 +1,93 @@ +/* + * Jakefile + * CPImageViewTest + * + * Created by Alexander Ljungberg on March 9, 2012. + * Copyright 2012, SlevenBits Ltd 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 ("CPImageViewTest", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPImageViewTest.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPImageViewTest"); + task.setIdentifier("com.yourcompany.CPImageViewTest"); + task.setVersion("1.0"); + task.setAuthor("SlevenBits Ltd"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPImageViewTest"); + task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + 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", ["CPImageViewTest"], 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", "CPImageViewTest", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPImageViewTest", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPImageViewTest")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPImageViewTest"), FILE.join("Build", "Deployment", "CPImageViewTest")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPImageViewTest")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPImageViewTest"), FILE.join("Build", "Desktop", "CPImageViewTest", "CPImageViewTest.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPImageViewTest", "CPImageViewTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPImageViewTest")); + print("----------------------------"); +} diff --git a/Tests/Manual/CPImageViewTest/Resources/280px-1730_Homann_Map_of_Scandinavia,_Norway,_Sweden,_Denmark,_Finland_and_the_Baltics_-_Geographicus_-_Scandinavia-homann-1730.jpg b/Tests/Manual/CPImageViewTest/Resources/280px-1730_Homann_Map_of_Scandinavia,_Norway,_Sweden,_Denmark,_Finland_and_the_Baltics_-_Geographicus_-_Scandinavia-homann-1730.jpg new file mode 100644 index 000000000..1a7cc6a4b Binary files /dev/null and b/Tests/Manual/CPImageViewTest/Resources/280px-1730_Homann_Map_of_Scandinavia,_Norway,_Sweden,_Denmark,_Finland_and_the_Baltics_-_Geographicus_-_Scandinavia-homann-1730.jpg differ diff --git a/Tests/Manual/CPImageViewTest/Resources/spinner.gif b/Tests/Manual/CPImageViewTest/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/CPImageViewTest/Resources/spinner.gif differ diff --git a/Tests/Manual/TableTest/HeaderView-CornerView/index-debug.html b/Tests/Manual/CPImageViewTest/index-debug.html similarity index 95% rename from Tests/Manual/TableTest/HeaderView-CornerView/index-debug.html rename to Tests/Manual/CPImageViewTest/index-debug.html index 613eeb492..a1d7c32a9 100644 --- a/Tests/Manual/TableTest/HeaderView-CornerView/index-debug.html +++ b/Tests/Manual/CPImageViewTest/index-debug.html @@ -4,10 +4,10 @@ @@ -20,7 +20,7 @@ - HeaderView-CornerView + CPImageViewTest