From 088a5c7166e5c0c3a919996e30e63aa2f126fe82 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Wed, 11 Aug 2010 10:34:33 -0400 Subject: [PATCH 01/24] Remove extra call to _init in -initWithCoder: --- AppKit/CPSearchField.j | 2 -- 1 file changed, 2 deletions(-) diff --git a/AppKit/CPSearchField.j b/AppKit/CPSearchField.j index 66260ecf7..1035110b9 100644 --- a/AppKit/CPSearchField.j +++ b/AppKit/CPSearchField.j @@ -798,8 +798,6 @@ var CPRecentsAutosaveNameKey = @"CPRecentsAutosaveNameKey", { if (self = [super initWithCoder:coder]) { - [self _init]; - _recentsAutosaveName = [coder decodeObjectForKey:CPRecentsAutosaveNameKey]; _sendsWholeSearchString = [coder decodeBoolForKey:CPSendsWholeSearchStringKey]; _sendsSearchStringImmediately = [coder decodeBoolForKey:CPSendsSearchStringImmediatelyKey]; From 1e490f17966dfaa60344c1b496d1068c27328d9d Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Wed, 11 Aug 2010 15:59:04 -0500 Subject: [PATCH 02/24] Fix for column reordering with hidden columns. Closes #637 --- AppKit/CPTableHeaderView.j | 10 +++++----- AppKit/CPTableView.j | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/AppKit/CPTableHeaderView.j b/AppKit/CPTableHeaderView.j index 0fc8806e1..c8a316a7a 100644 --- a/AppKit/CPTableHeaderView.j +++ b/AppKit/CPTableHeaderView.j @@ -427,16 +427,16 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal [_tableView moveColumn:aFromIndex toColumn:aToIndex]; _activeColumn = aToIndex; _pressedColumn = _activeColumn; - - [_tableView _setDraggedColumn:_activeColumn]; } - (void)draggedView:(CPView)aView beganAt:(CGPoint)aPoint { _isDragging = YES; - [[[[_tableView tableColumns] objectAtIndex:_activeColumn] headerView] setHidden:YES]; - [_tableView _setDraggedColumn:_activeColumn]; + var column = [[_tableView tableColumns] objectAtIndex:_activeColumn]; + + [[column headerView] setHidden:YES]; + [_tableView _setDraggedColumn:column]; [self setNeedsDisplay:YES]; } @@ -480,7 +480,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal _isDragging = NO; _isTrackingColumn = NO; // We need to do this explicitly because the mouse up section of trackMouse is never reached - [_tableView _setDraggedColumn:-1]; + [_tableView _setDraggedColumn:nil]; [[[[_tableView tableColumns] objectAtIndex:_activeColumn] headerView] setHidden:NO]; [self stopTrackingTableColumn:_activeColumn at:aLocation]; diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 6a0388374..56e314374 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -214,7 +214,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; BOOL _disableAutomaticResizing @accessors(property=disableAutomaticResizing); BOOL _lastColumnShouldSnap; - int _draggedColumnIndex; + CPTableColumn _draggedColumn; CPArray _differedColumnDataToRemove; } @@ -329,7 +329,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; if (!_cornerView) _cornerView = [[_CPCornerView alloc] initWithFrame:CGRectMake(0, 0, [CPScroller scrollerWidth], CGRectGetHeight([_headerView frame]))]; - _draggedColumnIndex = -1; + _draggedColumn = nil; /* //gradients for the source list when CPTableView is NOT first responder or the window is NOT key // FIX ME: we need to actually implement this. @@ -750,14 +750,14 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; [self setNeedsLayout]; } -- (void)_setDraggedColumn:(int)aColumnIndex +- (void)_setDraggedColumn:(CPTableColumn)aColumn { - if (_draggedColumnIndex === aColumnIndex) + if (_draggedColumn === aColumn) return; - _draggedColumnIndex = aColumnIndex; + _draggedColumn = aColumn; - [self reloadDataForRowIndexes:_exposedRows columnIndexes:[CPIndexSet indexSetWithIndex:aColumnIndex]]; + [self reloadDataForRowIndexes:_exposedRows columnIndexes:[CPIndexSet indexSetWithIndex:[_tableColumns indexOfObject:aColumn]]]; } /*! @@ -2219,6 +2219,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; [self _unloadDataViewsInRows:previouslyExposedRows columns:obscuredColumns]; [self _unloadDataViewsInRows:obscuredRows columns:previouslyExposedColumns]; [self _unloadDataViewsInRows:obscuredRows columns:obscuredColumns]; + [self _unloadDataViewsInRows:newlyExposedRows columns:newlyExposedColumns]; [self _loadDataViewsInRows:previouslyExposedRows columns:newlyExposedColumns]; [self _loadDataViewsInRows:newlyExposedRows columns:previouslyExposedColumns]; @@ -2284,9 +2285,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; for (; rowIndex < rowsCount; ++rowIndex) { var row = rowArray[rowIndex], - dataView = _dataViewsForTableColumns[tableColumnUID][row]; + dataView = [_dataViewsForTableColumns[tableColumnUID] objectAtIndex:row]; - _dataViewsForTableColumns[tableColumnUID][row] = nil; + [_dataViewsForTableColumns[tableColumnUID] replaceObjectAtIndex:row withObject:nil]; [self _enqueueReusableDataView:dataView]; } @@ -2315,7 +2316,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; var column = columnArray[columnIndex], tableColumn = _tableColumns[column]; - if ([tableColumn isHidden] || columnIndex === _draggedColumnIndex) + if ([tableColumn isHidden] || tableColumn === _draggedColumn) continue; var tableColumnUID = [tableColumn UID]; From c8f6e1258611b51c211c1f853139b924d8058521 Mon Sep 17 00:00:00 2001 From: cacaodev Date: Wed, 11 Aug 2010 16:32:01 -0500 Subject: [PATCH 03/24] CPTableView: Implement -drawRow:clipRect: . The method is called only when a tableview subclass implements it for performance reasons. DrawRowTest demonstrating the feature. Conflicts: AppKit/CPTableView.j --- AppKit/CPTableView.j | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 56e314374..7f5f20c0c 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -337,6 +337,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; _sourceListInactiveTopLineColor = [CPColor colorWithCalibratedRed:(173.0/255.0) green:(187.0/255.0) blue:(209.0/255.0) alpha:1.0]; _sourceListInactiveBottomLineColor = [CPColor colorWithCalibratedRed:(150.0/255.0) green:(161.0/255.0) blue:(183.0/255.0) alpha:1.0];*/ _differedColumnDataToRemove = [ ]; + _implementsCustomDrawRow = [self implementsSelector:@selector(drawRow:clipRect:)]; } /*! @@ -2751,6 +2752,22 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; CGContextStrokePath(context); } +- (void)_drawRows:(CPIndexSet)rowsIndexes clipRect:(CGRect)clipRect +{ + var row = [rowsIndexes firstIndex]; + + while (row !== CPNotFound) + { + [self drawRow:row clipRect:CGRectIntersection(clipRect, [self rectOfRow:row])]; + row = [rowsIndexes indexGreaterThanIndex:row]; + } +} + +- (void)drawRow:(CPInteger)row clipRect:(CGRect)rect +{ + // This method does currently nothing in cappuccino. Can be overriden by subclasses. +} + - (void)layoutSubviews { [self load]; From 15356b617b531e30edd88530150544d7fd4721e5 Mon Sep 17 00:00:00 2001 From: cacaodev Date: Wed, 11 Aug 2010 14:55:14 +0200 Subject: [PATCH 04/24] DrawRowTest that was announced in the previous commit --- .../TableTest/DrawRowTest/AppController.j | 108 ++++++++++++++++++ Tests/Manual/TableTest/DrawRowTest/Info.plist | 12 ++ Tests/Manual/TableTest/DrawRowTest/Jakefile | 93 +++++++++++++++ .../DrawRowTest/Resources/spinner.gif | Bin 0 -> 1849 bytes .../TableTest/DrawRowTest/index-debug.html | 104 +++++++++++++++++ Tests/Manual/TableTest/DrawRowTest/index.html | 79 +++++++++++++ Tests/Manual/TableTest/DrawRowTest/main.j | 18 +++ 7 files changed, 414 insertions(+) create mode 100644 Tests/Manual/TableTest/DrawRowTest/AppController.j create mode 100644 Tests/Manual/TableTest/DrawRowTest/Info.plist create mode 100644 Tests/Manual/TableTest/DrawRowTest/Jakefile create mode 100644 Tests/Manual/TableTest/DrawRowTest/Resources/spinner.gif create mode 100644 Tests/Manual/TableTest/DrawRowTest/index-debug.html create mode 100644 Tests/Manual/TableTest/DrawRowTest/index.html create mode 100644 Tests/Manual/TableTest/DrawRowTest/main.j diff --git a/Tests/Manual/TableTest/DrawRowTest/AppController.j b/Tests/Manual/TableTest/DrawRowTest/AppController.j new file mode 100644 index 000000000..dc020ba72 --- /dev/null +++ b/Tests/Manual/TableTest/DrawRowTest/AppController.j @@ -0,0 +1,108 @@ +/* + * AppController.j + * TestTemplate + * + * Created by You on August 10, 2010. + * Copyright 2010, Your Company All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + CPTableView table; + CPTableColumn columnA; + CPTableColumn columnB; + CPTableColumn columnC; + CPTableColumn columnD; + +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ + var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], + contentView = [theWindow contentView]; + + var scroll = [[CPScrollView alloc] initWithFrame:CGRectMake(100,100,700,400)]; + + table = [[TableViewDrawRow alloc] initWithFrame:CGRectMakeZero()]; + [table setDataSource:self]; + + columnA = [[CPTableColumn alloc] initWithIdentifier:"A"]; + [table addTableColumn:columnA]; + [[columnA headerView] setStringValue:"A"]; + [columnA setWidth:175]; + + columnB = [[CPTableColumn alloc] initWithIdentifier:"B"]; + [table addTableColumn:columnB]; + [[columnB headerView] setStringValue:"B"]; + [columnB setWidth:175] + + columnC = [[CPTableColumn alloc] initWithIdentifier:"C"]; + [table addTableColumn:columnC]; + [[columnC headerView] setStringValue:"C"]; + [columnC setWidth:175]; + + columnD = [[CPTableColumn alloc] initWithIdentifier:"D"]; + [table addTableColumn:columnD]; + [[columnD headerView] setStringValue:"D"]; + [columnD setWidth:175]; + + columnE = [[CPTableColumn alloc] initWithIdentifier:"E"]; + [table addTableColumn:columnE]; + [[columnE headerView] setStringValue:"E"]; + [columnE setWidth:175]; + + [scroll setDocumentView:table]; + + [contentView addSubview:scroll]; + + [theWindow orderFront:self]; + +} + +- (int)numberOfRowsInTableView:(id)tableView +{ + return 10000; +} + +- (id)tableView:(id)tableView objectValueForTableColumn:(CPTableColumn)aColumn row:(int)aRow +{ + return "Column " + [aColumn identifier] + " Row " + aRow; +} + +@end + +var BADGE_HEIGHT = 15.0, + ROW_RIGHT_MARGIN = 10.0; +var randomColors = {}; + +@implementation TableViewDrawRow : CPTableView + ++ (CPColor)colorForRow:(CPInteger)aRow +{ + var rowStr = String(aRow); + if (randomColors[rowStr] == nil) + randomColors[rowStr] = [CPColor randomColor]; + + return randomColors[rowStr]; +} + +- (void)drawRow:(CPInteger)aRow clipRect:(CGRect)clipRect +{ + var viewRect = [self frameOfDataViewAtColumn:[self columnWithIdentifier:@"A"] row:aRow], + badgeWidth = CGRectGetWidth(viewRect)/5, + badgePath = [CPBezierPath bezierPath]; + + var badgeFrame = CGRectMake(CGRectGetMaxX(viewRect) - badgeWidth - ROW_RIGHT_MARGIN, + CGRectGetMidY(viewRect) - BADGE_HEIGHT / 2.0, + badgeWidth, + BADGE_HEIGHT); + + [badgePath appendBezierPathWithRoundedRect:badgeFrame xRadius:(BADGE_HEIGHT/2.0) yRadius:(BADGE_HEIGHT/2.0)]; + [[TableViewDrawRow colorForRow:aRow] setFill]; + [badgePath fill]; +} + +@end diff --git a/Tests/Manual/TableTest/DrawRowTest/Info.plist b/Tests/Manual/TableTest/DrawRowTest/Info.plist new file mode 100644 index 000000000..b66b60433 --- /dev/null +++ b/Tests/Manual/TableTest/DrawRowTest/Info.plist @@ -0,0 +1,12 @@ + + + + + CPApplicationDelegateClass + AppController + CPBundleName + DrawRowTest + CPPrincipalClass + CPApplication + + diff --git a/Tests/Manual/TableTest/DrawRowTest/Jakefile b/Tests/Manual/TableTest/DrawRowTest/Jakefile new file mode 100644 index 000000000..a1ef79223 --- /dev/null +++ b/Tests/Manual/TableTest/DrawRowTest/Jakefile @@ -0,0 +1,93 @@ +/* + * Jakefile + * DrawRowTest + * + * Created by You on August 11, 2010. + * Copyright 2010, 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 ("DrawRowTest", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "DrawRowTest.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("DrawRowTest"); + task.setIdentifier("com.yourcompany.DrawRowTest"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("DrawRowTest"); + 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", ["DrawRowTest"], 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", "DrawRowTest", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "DrawRowTest", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "DrawRowTest")); + OS.system(["press", "-f", FILE.join("Build", "Release", "DrawRowTest"), FILE.join("Build", "Deployment", "DrawRowTest")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "DrawRowTest")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "DrawRowTest"), FILE.join("Build", "Desktop", "DrawRowTest", "DrawRowTest.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "DrawRowTest", "DrawRowTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "DrawRowTest")); + print("----------------------------"); +} diff --git a/Tests/Manual/TableTest/DrawRowTest/Resources/spinner.gif b/Tests/Manual/TableTest/DrawRowTest/Resources/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..06dbc2bc21dddcf0e09b566d5b211aee89570f52 GIT binary patch literal 1849 zcma*odr(tX9tZHtz31lM+(&Y`A`Ou`NeG&R#DrIfV%?hng21vs6v>ooRQQFbk7E_K!V( z{?5!fpZWgIZ%*d6t%i*j24bL}AZUJm9)h6R*;%L4IWse3G#VWaN1#$zSSXcBhlYlH zJ|D}n{r&w2f+Qp)SS*&n?*G4}{}!h?td_mjU6Kad-rW*QwWYCUk7d^e+sjpZAn6kT z5rM;`{~_}-wm+L@%+E;JphLm}C3WzQAQD0wBoY|rOTQX{(@pp-WAA8Iw0HKl|15j) zhGh(SFWu#5zUCw^T!}C~eC}~?{xG-r7ugQC>taC+|L^xr&a%{#cgUOZXIM&v?)k^2 z1i5%0!U00wq)r4vlAwXBA_m5J5WNeuBm-XJQ5pG4GD%vc|K){+TJ{AkHqN@SJKczX zU}QRd9n*_bf^h94)6Ctv{CUfz_;qs#RDuQ$DR%y1&5G-a6rhf*4Y zl+UOD1*GE{GQ7vv;c-tTIMkz0ovO>9j%b5hpa@a*CBJ#W!0@ndSwF|%hMkdFtXiU) z`BEp+yhkt8ZY>tg&uyH@%^%K4jDrbA;et&vnnzZ3z22@e6<27z2Vk13kb7OtISyxv z(XoO-LNQCZe3lfzc%*pNqU<9T+p~teThOEB+~e&U0mC|zS{Q)dJZ)!^1f7L(zg*L> z*vSW%?dR~@@0(}x6-V^A`~ImD;)NaBUnP8;RH=bS2@pk`wp>>8r&jGjmGPy%1BW}v zoPo}ca$~bze@efc3kapuEVW1!%teOZT3j2Tw5=hjiAf02d}7dL0oFC%@=RXp5Ow#% z@a>+AM|YWt$n&e`>sB-32gBcuTi>R>*|8@lp`y6thc7ydyqDsuUn~YzZf|{-R@-3y zL#wx{Ii}xxL_csiW*LBn0-A$>zp4WOmkf6=ilrjlW?-l9+bCd7|i?*b5NTmy<<6NZ0T8$SN@mwdC2f z6jqK=N@bS@!=YSj%>h0}*4p+%0HbTIrE$w7UMT6+AZZ&DAo*qZAAi(OtNbIfl#Dw^ zJWeiCp~zi#&t6x}m9)O^eR4HiLV3QA<<0>HZ8%$^lrSE94Wb}=+MM^!b>n#5&-JQR zkr-CEu9C;_F*7DqDisulV6Pmg$nFL0TPn%~*m^-`Z3^BgU(sNpnx%nW(!eV9A&FvI zHL3X3lw8Wji^6=8KbQDE-e%b?svdFxxdh$8r97@7$ojeI`6AL8Ob6QC$qh&>ZWVDX1F{0vJnT%%mE;GveKWR%C} zM&4d;Jf3s9|HAA)yVUPo`Aq;0do#)uHSXi5*QF*)x@MVVHr+cN)uMZ__F|&Ta#p8d z53TOKtce!PJUuie8UWol-S(`c2nH?UGqJP{!4RR4u$LCfn)q-hj0^f=h(VYy)T6eN zhRO!ja-aDBTcgeyP(8Ua4IdiOog^*CQa?R(cP#9AgL9`j>EX-6Yf1lzX(!~``M1XC zNmM<4<6d~wWZ$Xrk0K}UteTrq@LBBk#MsjkK;pbuVhe)NI7(7Pf(l?lxC7=1Z7Pzl zMbS;nV4NI5_N{1$P)&XC)huOGQ+h^zpYUZfb*1n6>!`#*b3y52LGmi+<4sY5jyD#- zw&$d}DTguLAfnRtjrM*JfqtHqUu6rQoU=g%1E9xk%;)TDm^2<8n-0IhTsQFaek)MY}>PK4;nBk=ow4pF>vzkO& gna%Org-kgQCf=+BeMi^RbuY;YE~rTjend;_cdi8t>i_@% literal 0 HcmV?d00001 diff --git a/Tests/Manual/TableTest/DrawRowTest/index-debug.html b/Tests/Manual/TableTest/DrawRowTest/index-debug.html new file mode 100644 index 000000000..434bd3ad3 --- /dev/null +++ b/Tests/Manual/TableTest/DrawRowTest/index-debug.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + DrawRowTest + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/TableTest/DrawRowTest/index.html b/Tests/Manual/TableTest/DrawRowTest/index.html new file mode 100644 index 000000000..1db8fa36b --- /dev/null +++ b/Tests/Manual/TableTest/DrawRowTest/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + DrawRowTest + + + + + + + + + + + + +
+
+ + + +
+
+ + + + diff --git a/Tests/Manual/TableTest/DrawRowTest/main.j b/Tests/Manual/TableTest/DrawRowTest/main.j new file mode 100644 index 000000000..48abc83d4 --- /dev/null +++ b/Tests/Manual/TableTest/DrawRowTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * DrawRowTest + * + * Created by You on August 11, 2010. + * Copyright 2010, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} From 4fc894e430c3b06737d2ece65c44d14ff8de6493 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Wed, 11 Aug 2010 15:29:28 -0400 Subject: [PATCH 05/24] Fix for issue #820 (horizontal grid drawn incorrectly with no rows) --- AppKit/CPTableView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 7f5f20c0c..a343975db 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -2568,7 +2568,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; var exposedRows = [self rowsInRect:aRect]; row = exposedRows.location, lastRow = CPMaxRange(exposedRows) - 1, - rowY = 0.0, + rowY = -0.5, minX = _CGRectGetMinX(aRect), maxX = _CGRectGetMaxX(aRect); From 5b1ca8a7f9f11444595fa1985d2c9110d24c0de9 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 2 Aug 2010 12:06:06 -0400 Subject: [PATCH 06/24] Fix for issue #807 (NSTextField sets text color unconditionally, which causes theme lookup failure later) --- Tools/nib2cib/NSTextField.j | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tools/nib2cib/NSTextField.j b/Tools/nib2cib/NSTextField.j index d9d935085..1368ea40e 100644 --- a/Tools/nib2cib/NSTextField.j +++ b/Tools/nib2cib/NSTextField.j @@ -54,7 +54,12 @@ [self setPlaceholderString:[cell placeholderString]]; - [self setTextColor:[cell textColor]]; + var textColor = [cell textColor], + defaultColor = [self currentValueForThemeAttribute:@"text-color"]; + + // Don't change the text color if it is not the default, that messes up the theme lookups later + if (![textColor isEqual:defaultColor]) + [self setTextColor:[cell textColor]]; var frame = [self frame]; From 66f84ede6ede2d7b032d295353e6f1b51ea7e523 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Thu, 29 Jul 2010 13:23:52 -0400 Subject: [PATCH 07/24] Fix for issue #799 (NSFont replaces LucidaGrande-Bold 13 with the theme font) --- Tools/nib2cib/NSFont.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/nib2cib/NSFont.j b/Tools/nib2cib/NSFont.j index 41643eb22..a08990d11 100644 --- a/Tools/nib2cib/NSFont.j +++ b/Tools/nib2cib/NSFont.j @@ -31,7 +31,7 @@ fontName = [aCoder decodeObjectForKey:@"NSName"], size = [aCoder decodeDoubleForKey:@"NSSize"]; - if ((fontName === "LucidaGrande" || fontName === "LucidaGrande-Bold") && size === 13) + if (fontName === "LucidaGrande" && size === 13) { CPLog.debug("Removing default IB font: <"+fontName+", "+size+"> for theme default font."); return nil; From 567f54c9f95c73267d822600d3897d3219cb60ed Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Wed, 11 Aug 2010 17:32:50 -0500 Subject: [PATCH 08/24] Fix global from error in previous mergre. --- AppKit/CPTableView.j | 1 + 1 file changed, 1 insertion(+) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index a343975db..779ceedf0 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -213,6 +213,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; BOOL _disableAutomaticResizing @accessors(property=disableAutomaticResizing); BOOL _lastColumnShouldSnap; + BOOL _implementsCustomDrawRow; CPTableColumn _draggedColumn; CPArray _differedColumnDataToRemove; From a0bcae2404d3e4f0c07f3090dd69c40696ca036e Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Wed, 11 Aug 2010 18:52:21 -0400 Subject: [PATCH 09/24] The Cocoa default is always to draw column lines, this wasn't being set in CPTableColumnView. --- Tools/nib2cib/NSTableHeaderView.j | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tools/nib2cib/NSTableHeaderView.j b/Tools/nib2cib/NSTableHeaderView.j index ab68dc1cd..d86d39629 100644 --- a/Tools/nib2cib/NSTableHeaderView.j +++ b/Tools/nib2cib/NSTableHeaderView.j @@ -36,6 +36,8 @@ _bounds.size.height = 23; _frame.size.height = 23; } + + _drawsColumnLines = YES; } return self; From 952bb4bb7c8ca5df2d2628f84005d942a53d5a5b Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Fri, 18 Jun 2010 11:39:30 -0400 Subject: [PATCH 10/24] added CPShadow shadowViewEnclosingView --- AppKit/CPShadowView.j | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/AppKit/CPShadowView.j b/AppKit/CPShadowView.j index 36cfabdad..72fb69620 100644 --- a/AppKit/CPShadowView.j +++ b/AppKit/CPShadowView.j @@ -93,6 +93,31 @@ var LIGHT_LEFT_INSET = 3.0, ]]]; } ++ (id)shadowViewEnclosingView:(CPView)aView +{ + return [self shadowViewEnclosingView:aView withWeight:CPLightShadow]; +} + ++ (id)shadowViewEnclosingView:(CPView)aView withWeight:(CPShadowWeight)aWeight +{ + var shadowView = [[CPShadowView alloc] initWithFrame:[aView frame]]; + [shadowView setWeight:aWeight]; + + 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; +} + - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; From 6b8e10cb2ed28e0ebbdf6a220cdf2405b593cd5c Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Wed, 11 Aug 2010 19:20:10 -0400 Subject: [PATCH 11/24] Whitespace cleanup of CPShadowView. --- AppKit/CPShadowView.j | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/AppKit/CPShadowView.j b/AppKit/CPShadowView.j index 72fb69620..c1aaac6f5 100644 --- a/AppKit/CPShadowView.j +++ b/AppKit/CPShadowView.j @@ -35,12 +35,12 @@ CPHeavyShadow = 1; var CPShadowViewLightBackgroundColor = nil, CPShadowViewHeavyBackgroundColor = nil; - + var LIGHT_LEFT_INSET = 3.0, LIGHT_RIGHT_INSET = 3.0, LIGHT_TOP_INSET = 3.0, LIGHT_BOTTOM_INSET = 5.0, - + HEAVY_LEFT_INSET = 7.0, HEAVY_RIGHT_INSET = 7.0, HEAVY_TOP_INSET = 5.0, @@ -61,32 +61,32 @@ var LIGHT_LEFT_INSET = 3.0, return; 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)], - + [[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)], - + [[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)] ]]]; - + 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)], - + [[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)], - + [[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)] @@ -102,35 +102,35 @@ var LIGHT_LEFT_INSET = 3.0, { var shadowView = [[CPShadowView alloc] initWithFrame:[aView frame]]; [shadowView setWeight:aWeight]; - + 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; } - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; - + if (self) { _weight = CPLightShadow; - + [self setBackgroundColor:CPShadowViewLightBackgroundColor]; - + [self setHitTests:NO]; } - + return self; } @@ -138,9 +138,9 @@ var LIGHT_LEFT_INSET = 3.0, { if (_weight == aWeight) return; - + _weight = aWeight; - + if (_weight == CPLightShadow) [self setBackgroundColor:CPShadowViewLightBackgroundColor]; @@ -172,7 +172,7 @@ var LIGHT_LEFT_INSET = 3.0, { if (_weight == CPLightShadow) return LIGHT_LEFT_INSET + LIGHT_RIGHT_INSET; - + return HEAVY_LEFT_INSET + HEAVY_RIGHT_INSET; } @@ -180,7 +180,7 @@ var LIGHT_LEFT_INSET = 3.0, { if (_weight == CPLightShadow) return LIGHT_TOP_INSET + LIGHT_BOTTOM_INSET; - + return HEAVY_TOP_INSET + HEAVY_BOTTOM_INSET; } From 4b8cc3e6d110a0e370805d32bf7d6e2800940f49 Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Wed, 11 Aug 2010 18:39:16 -0500 Subject: [PATCH 12/24] Table column drag view should draw lines the same color as the parent tableview. --- AppKit/CPTableView.j | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 779ceedf0..66f5bf125 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -2019,9 +2019,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; */ - (CPView)_dragViewForColumn:(int)theColumnIndex event:(CPEvent)theDragEvent offset:(CPPointPointer)theDragViewOffset { - var dragView = [[_CPColumnDragView alloc] initWithFrame:CPRectMakeZero()]; + var dragView = [[_CPColumnDragView alloc] initWithLineColor:[self gridColor]]; tableColumn = [[self tableColumns] objectAtIndex:theColumnIndex], - bounds = CPRectMake(0.0, 0.0, [tableColumn width], CPRectGetHeight([self _exposedRect]) + 23.0), + bounds = CPRectMake(0.0, 0.0, [tableColumn width], _CGRectGetHeight([self _exposedRect]) + 23.0), columnRect = [self rectOfColumn:theColumnIndex], headerView = [tableColumn headerView], row = [_exposedRows firstIndex]; @@ -2035,7 +2035,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; dataViewFrame.origin.x = 0.0; // Offset by table header height - scroll position - dataViewFrame.origin.y = ( CPRectGetMinY(dataViewFrame) - CPRectGetMinY([self _exposedRect]) ) + 23.0; + dataViewFrame.origin.y = ( _CGRectGetMinY(dataViewFrame) - _CGRectGetMinY([self _exposedRect]) ) + 23.0; [dataView setFrame:dataViewFrame]; [dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]]; @@ -2046,7 +2046,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; // Add the column header view var headerFrame = [headerView frame]; - headerFrame.origin = CPPointMakeZero(); + headerFrame.origin = _CGPointMakeZero(); var columnHeaderView = [[_CPTableColumnHeaderView alloc] initWithFrame:headerFrame]; [columnHeaderView setStringValue:[headerView stringValue]]; @@ -3721,11 +3721,25 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", @end @implementation _CPColumnDragView : CPView +{ + CPColor _lineColor; +} + +- (id)initWithLineColor:(CPColor)aColor +{ + self = [super initWithFrame:_CGRectMakeZero()]; + + if (self) + _lineColor = aColor; + + return self; +} + - (void)drawRect:(CGRect)aRect { var context = [[CPGraphicsContext currentContext] graphicsPort]; - CGContextSetStrokeColor(context, [CPColor grayColor]); + CGContextSetStrokeColor(context, _lineColor); var points = [ _CGPointMake(0.5, 0), From ed52b44f8bb1c9660a4bf93a171122a2b1572cd3 Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Wed, 11 Aug 2010 19:07:13 -0500 Subject: [PATCH 13/24] Removed redundent methods in the tableview. Closes #822 --- AppKit/CPTableView.j | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 66f5bf125..27884902d 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -2021,7 +2021,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; { var dragView = [[_CPColumnDragView alloc] initWithLineColor:[self gridColor]]; tableColumn = [[self tableColumns] objectAtIndex:theColumnIndex], - bounds = CPRectMake(0.0, 0.0, [tableColumn width], _CGRectGetHeight([self _exposedRect]) + 23.0), + bounds = CPRectMake(0.0, 0.0, [tableColumn width], _CGRectGetHeight([self visibleRect]) + 23.0), columnRect = [self rectOfColumn:theColumnIndex], headerView = [tableColumn headerView], row = [_exposedRows firstIndex]; @@ -2035,7 +2035,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; dataViewFrame.origin.x = 0.0; // Offset by table header height - scroll position - dataViewFrame.origin.y = ( _CGRectGetMinY(dataViewFrame) - _CGRectGetMinY([self _exposedRect]) ) + 23.0; + dataViewFrame.origin.y = ( _CGRectGetMinY(dataViewFrame) - _CGRectGetMinY([self visibleRect]) ) + 23.0; [dataView setFrame:dataViewFrame]; [dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]]; @@ -2175,16 +2175,6 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; return objectValue; } -- (CGRect)_exposedRect -{ - var superview = [self superview]; - - if (![superview isKindOfClass:[CPClipView class]]) - return [self bounds]; - - return [self convertRect:CGRectIntersection([superview bounds], [self frame]) fromView:superview]; -} - - (void)load { if (_reloadAllRows) @@ -2197,7 +2187,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; _reloadAllRows = NO; } - var exposedRect = [self _exposedRect], + var exposedRect = [self visibleRect], exposedRows = [CPIndexSet indexSetWithIndexesInRange:[self rowsInRect:exposedRect]], exposedColumns = [self columnIndexesInRect:exposedRect], obscuredRows = [_exposedRows copy], @@ -2459,16 +2449,6 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; [_headerView setFrameSize:_CGSizeMake(_CGRectGetWidth([self frame]), _CGRectGetHeight([_headerView frame]))]; } -- (CGRect)exposedClipRect -{ - var superview = [self superview]; - - if (![superview isKindOfClass:[CPClipView class]]) - return [self bounds]; - - return [self convertRect:CGRectIntersection([superview bounds], [self frame]) fromView:superview]; -} - - (void)setNeedsDisplay:(BOOL)aFlag { [super setNeedsDisplay:aFlag]; @@ -2480,7 +2460,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; // FIX ME: All three of these methods will likely need to be rewritten for 1.0 // We've got grid drawing in highlightSelection and crap everywhere. - var exposedRect = [self _exposedRect]; + var exposedRect = [self visibleRect]; [self drawBackgroundInClipRect:exposedRect]; [self drawGridInClipRect:exposedRect]; @@ -3165,7 +3145,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; var row = [self _proposedRowAtPoint:location], dragOperation = [self _validateDrop:sender proposedRow:row proposedDropOperation:dropOperation]; - exposedClipRect = [self exposedClipRect]; + exposedClipRect = [self visibleRect]; if(_retargetedDropRow !== nil) row = _retargetedDropRow; @@ -3174,7 +3154,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; if (dropOperation === CPTableViewDropOn && row >= [self numberOfRows]) row = [self numberOfRows] - 1; - var rect = CPRectMakeZero(); + var rect = _CGRectMakeZero(); if (row === -1) rect = exposedClipRect; From ad33d1648ce36c382a171cee8898b54ad60a859f Mon Sep 17 00:00:00 2001 From: David Hess Date: Wed, 7 Jul 2010 00:05:40 -0500 Subject: [PATCH 14/24] Patch to CPSlider to invert its value in vertical mode so that max value is represented at the top of the track instead of the bottom. --- AppKit/CPSlider.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppKit/CPSlider.j b/AppKit/CPSlider.j index b448becd0..36f951f5c 100644 --- a/AppKit/CPSlider.j +++ b/AppKit/CPSlider.j @@ -198,7 +198,7 @@ CPCircularSlider = 1; else if ([self isVertical]) { knobRect.origin.x = _CGRectGetMidX(trackRect) - knobSize.width / 2.0; - knobRect.origin.y = (([self doubleValue] - _minValue) / (_maxValue - _minValue)) * (_CGRectGetHeight(trackRect) - knobSize.height); + knobRect.origin.y = ((_maxValue - [self doubleValue]) / (_maxValue - _minValue)) * (_CGRectGetHeight(trackRect) - knobSize.height); } else { @@ -320,7 +320,7 @@ CPCircularSlider = 1; var minValue = [self minValue]; - return MAX(0.0, MIN(1.0, (aPoint.y - _CGRectGetMinY(trackRect)) / _CGRectGetHeight(trackRect))) * ([self maxValue] - minValue) + minValue; + return MAX(0.0, MIN(1.0, (_CGRectGetMaxY(trackRect) - aPoint.y) / _CGRectGetHeight(trackRect))) * ([self maxValue] - minValue) + minValue; } else { From fd9a753170f660ad61584f6586cf8f0d6390fa20 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sat, 24 Jul 2010 09:49:50 -0400 Subject: [PATCH 15/24] Port of NSGraphics --- AppKit/CPGraphics.j | 122 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 AppKit/CPGraphics.j diff --git a/AppKit/CPGraphics.j b/AppKit/CPGraphics.j new file mode 100644 index 000000000..3044acf7e --- /dev/null +++ b/AppKit/CPGraphics.j @@ -0,0 +1,122 @@ +/* + * CPGraphics.j + * AppKit + * + * Created by Francisco Tolmasky. + * Copyright 2010, 280 North, Inc. + * + * 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 "CPColor.j" +@import "CPGraphicsContext.j" + +#include "CoreGraphics/CGGeometry.h" + + +function CPDrawGrayBezel(aRect) +{ + var context = [[CPGraphicsContext currentContext] graphicsPort]; + + CGContextBeginPath(context); + CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]); + + var y = _CGRectGetMinY(aRect) + 0.5; + + CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y); + CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 1.0, y); + CGContextStrokePath(context); + + CGContextBeginPath(context); + CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]); + CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 1.0, y); + CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); + CGContextStrokePath(context); + + CGContextBeginPath(context); + CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]); + CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); + CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y); + CGContextStrokePath(context); + + CGContextBeginPath(context); + CGContextSetStrokeColor(context, [CPColor colorWithWhite:190.0/255.0 alpha:1.0]); + + var x = _CGRectGetMaxX(aRect) - 0.5; + + CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 1.0); + CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect)); + + CGContextMoveToPoint(context, x - 0.5, _CGRectGetMaxY(aRect) - 0.5); + CGContextAddLineToPoint(context, _CGRectGetMinX(aRect), _CGRectGetMaxY(aRect) - 0.5); + + x = _CGRectGetMinX(aRect) + 0.5; + + CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect)); + CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect) + 1.0); + + CGContextStrokePath(context); +} + +function CPDrawGroove(aRect, drawTopBorder) +{ + var context = [[CPGraphicsContext currentContext] graphicsPort]; + + CGContextBeginPath(context); + CGContextSetStrokeColor(context, [CPColor colorWithWhite:159.0/255.0 alpha:1.0]); + + var y = _CGRectGetMinY(aRect) + 0.5; + + CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y); + CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y); + + var x = _CGRectGetMaxX(aRect) - 1.5; + + CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 2.0); + CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect) - 1.0); + + y = _CGRectGetMaxY(aRect) - 1.5; + + CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); + CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 2.0, y); + + x = _CGRectGetMinX(aRect) + 0.5; + + CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect)); + CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect)); + + CGContextStrokePath(context); + + CGContextBeginPath(context); + CGContextSetStrokeColor(context, [CPColor whiteColor]); + + var rect = _CGRectOffset(aRect, 1.0, 1.0); + + rect.size.width -= 1.0; + rect.size.height -= 1.0; + CGContextStrokeRect(context, _CGRectInset(rect, 0.5, 0.5)); + + if (drawTopBorder) + { + CGContextBeginPath(context); + CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]); + + y = _CGRectGetMinY(aRect) + 2.5; + + CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 2.0, y); + CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 2.0, y); + CGContextStrokePath(context); + } +} From fcf9c0bc8438ec956937053accf52743445c9397 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Tue, 27 Jul 2010 16:42:50 -0400 Subject: [PATCH 16/24] Full support for all NSScrollView border types, beginnings of a new tableview tester that shows dynamic changing of border type. --- AppKit/CPScrollView.j | 197 +++- Tests/Manual/NewTableTest/AppController.j | 60 ++ Tests/Manual/NewTableTest/Info.plist | 12 + .../NewTableTest/Resources/MainMenu.cib | 1 + .../NewTableTest/Resources/MainMenu.xib | 845 ++++++++++++++++++ .../Manual/NewTableTest/Resources/spinner.gif | Bin 0 -> 1849 bytes Tests/Manual/NewTableTest/index-debug.html | 94 ++ Tests/Manual/NewTableTest/index.html | 68 ++ Tests/Manual/NewTableTest/main.j | 18 + Tools/nib2cib/NSScrollView.j | 2 + 10 files changed, 1263 insertions(+), 34 deletions(-) create mode 100644 Tests/Manual/NewTableTest/AppController.j create mode 100644 Tests/Manual/NewTableTest/Info.plist create mode 100644 Tests/Manual/NewTableTest/Resources/MainMenu.cib create mode 100644 Tests/Manual/NewTableTest/Resources/MainMenu.xib create mode 100644 Tests/Manual/NewTableTest/Resources/spinner.gif create mode 100644 Tests/Manual/NewTableTest/index-debug.html create mode 100644 Tests/Manual/NewTableTest/index.html create mode 100755 Tests/Manual/NewTableTest/main.j diff --git a/AppKit/CPScrollView.j b/AppKit/CPScrollView.j index 051195b66..b0d89c1f7 100644 --- a/AppKit/CPScrollView.j +++ b/AppKit/CPScrollView.j @@ -37,23 +37,25 @@ */ @implementation CPScrollView : CPView { - CPClipView _contentView; - CPClipView _headerClipView; - CPView _cornerView; - - BOOL _hasVerticalScroller; - BOOL _hasHorizontalScroller; - BOOL _autohidesScrollers; - - CPScroller _verticalScroller; - CPScroller _horizontalScroller; - - int _recursionCount; - - float _verticalLineScroll; - float _verticalPageScroll; - float _horizontalLineScroll; - float _horizontalPageScroll; + CPClipView _contentView; + CPClipView _headerClipView; + CPView _cornerView; + + BOOL _hasVerticalScroller; + BOOL _hasHorizontalScroller; + BOOL _autohidesScrollers; + + CPScroller _verticalScroller; + CPScroller _horizontalScroller; + + int _recursionCount; + + float _verticalLineScroll; + float _verticalPageScroll; + float _horizontalLineScroll; + float _horizontalPageScroll; + + CPBorderType _borderType; } - (id)initWithFrame:(CGRect)aFrame @@ -67,8 +69,10 @@ _horizontalLineScroll = 10.0; _horizontalPageScroll = 10.0; + + _borderType = CPNoBorder; - _contentView = [[CPClipView alloc] initWithFrame:[self bounds]]; + _contentView = [[CPClipView alloc] initWithFrame:[self _insetBounds]]; [self addSubview:_contentView]; @@ -83,6 +87,65 @@ return self; } +// Calculating Layout + ++ (CGSize)contentSizeForFrameSize:(CGSize)frameSize hasHorizontalScroller:(BOOL)hFlag hasVerticalScroller:(BOOL)vFlag borderType:(CPBorderType)borderType +{ + var bounds = [self _insetBounds:_CGRectMake(0.0, 0.0, frameSize.width, frameSize.height) borderType:borderType], + scrollerWidth = [CPScroller scrollerWidth]; + + if (hFlag) + bounds.size.height -= scrollerWidth; + + if (vFlag) + bounds.size.width -= scrollerWidth; + + return bounds.size; +} + ++ (CGSize)frameSizeForContentSize:(CGSize)contentSize hasHorizontalScroller:(BOOL)hFlag hasVerticalScroller:(BOOL)vFlag borderType:(CPBorderType)borderType +{ + var bounds = [self _insetBounds:_CGRectMake(0.0, 0.0, contentSize.width, contentSize.height) borderType:borderType], + widthInset = contentSize.width - bounds.size.width, + heightInset = contentSize.height - bounds.size.height, + frameSize = _CGSizeMake(contentSize.width + widthInset, contentSize.height + heightInset), + scrollerWidth = [CPScroller scrollerWidth]; + + if (hFlag) + frameSize.height -= scrollerWidth; + + if (vFlag) + frameSize.width -= scrollerWidth; + + return frameSize; +} + ++ (CGRect)_insetBounds:(CGRect)bounds borderType:(CPBorderType)borderType +{ + switch (borderType) + { + case CPLineBorder: + case CPBezelBorder: + return _CGRectInset(bounds, 1.0, 1.0); + + case CPGrooveBorder: + bounds = _CGRectInset(bounds, 2.0, 2.0); + ++bounds.origin.y; + --bounds.size.height; + + return bounds; + + case CPNoBorder: + default: + return bounds; + } +} + +- (CGRect)_insetBounds +{ + return [[self class] _insetBounds:[self bounds] borderType:_borderType]; +} + // Determining component sizes /*! Returns the size of the scroll view's content view. @@ -176,7 +239,7 @@ // [_horizontalScroller setEnabled:NO]; } - [_contentView setFrame:[self bounds]]; + [_contentView setFrame:[self _insetBounds]]; [_headerClipView setFrame:_CGRectMakeZero()]; --_recursionCount; @@ -185,7 +248,7 @@ } var documentFrame = [documentView frame], // the size of the whole document - contentFrame = [self bounds], // assume it takes up the entire size of the scrollview (no scrollers) + contentFrame = [self _insetBounds], // assume it takes up the entire size of the scrollview (no scrollers) headerClipViewFrame = [self _headerClipViewFrame], headerClipViewHeight = _CGRectGetHeight(headerClipViewFrame); @@ -235,11 +298,8 @@ if (shouldShowVerticalScroller) { - var verticalScrollerY = MAX(_CGRectGetHeight([self _cornerViewFrame]), headerClipViewHeight), - verticalScrollerHeight = _CGRectGetHeight([self bounds]) - verticalScrollerY; - - if (shouldShowHorizontalScroller) - verticalScrollerHeight -= horizontalScrollerHeight; + var verticalScrollerY = MAX(_CGRectGetMaxY([self _cornerViewFrame]), headerClipViewHeight), + verticalScrollerHeight = _CGRectGetMaxY(contentFrame) - verticalScrollerY; [_verticalScroller setFloatValue:(difference.height <= 0.0) ? 0.0 : scrollPoint.y / difference.height]; [_verticalScroller setKnobProportion:_CGRectGetHeight(contentFrame) / _CGRectGetHeight(documentFrame)]; @@ -255,7 +315,7 @@ { [_horizontalScroller setFloatValue:(difference.width <= 0.0) ? 0.0 : scrollPoint.x / difference.width]; [_horizontalScroller setKnobProportion:_CGRectGetWidth(contentFrame) / _CGRectGetWidth(documentFrame)]; - [_horizontalScroller setFrame:_CGRectMake(0.0, _CGRectGetMaxY(contentFrame), _CGRectGetWidth(contentFrame), horizontalScrollerHeight)]; + [_horizontalScroller setFrame:_CGRectMake(_CGRectGetMinX(contentFrame), _CGRectGetMaxY(contentFrame), _CGRectGetWidth(contentFrame), horizontalScrollerHeight)]; } else if (wasShowingHorizontalScroller) { @@ -270,6 +330,30 @@ --_recursionCount; } +// Managing Graphics Attributes + +/*! + Sets the type of border to be drawn around the view. +*/ +- (void)setBorderType:(CPBorderType)borderType +{ + if (_borderType == borderType) + return; + + _borderType = borderType; + + [self reflectScrolledClipView:_contentView]; + [self setNeedsDisplay:YES]; +} + +/*! + Returns the border type drawn around the view. +*/ +- (CPBorderType)borderType +{ + return _borderType; +} + // Managing Scrollers /*! Sets the scroll view's horizontal scroller. @@ -316,8 +400,10 @@ if (_hasHorizontalScroller && !_horizontalScroller) { - [self setHorizontalScroller:[[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, MAX(_CGRectGetWidth([self bounds]), [CPScroller scrollerWidth]+1), [CPScroller scrollerWidth])]]; - [[self horizontalScroller] setFrameSize:CGSizeMake(_CGRectGetWidth([self bounds]), [CPScroller scrollerWidth])]; + var bounds = [self _insetBounds]; + + [self setHorizontalScroller:[[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, MAX(_CGRectGetWidth(bounds), [CPScroller scrollerWidth]+1), [CPScroller scrollerWidth])]]; + [[self horizontalScroller] setFrameSize:CGSizeMake(_CGRectGetWidth(bounds), [CPScroller scrollerWidth])]; } [self reflectScrolledClipView:_contentView]; @@ -377,8 +463,10 @@ if (_hasVerticalScroller && !_verticalScroller) { - [self setVerticalScroller:[[CPScroller alloc] initWithFrame:_CGRectMake(0.0, 0.0, [CPScroller scrollerWidth], MAX(_CGRectGetHeight([self bounds]), [CPScroller scrollerWidth]+1))]]; - [[self verticalScroller] setFrameSize:CGSizeMake([CPScroller scrollerWidth], _CGRectGetHeight([self bounds]))]; + var bounds = [self _insetBounds]; + + [self setVerticalScroller:[[CPScroller alloc] initWithFrame:_CGRectMake(0.0, 0.0, [CPScroller scrollerWidth], MAX(_CGRectGetHeight(bounds), [CPScroller scrollerWidth]+1))]]; + [[self verticalScroller] setFrameSize:CGSizeMake([CPScroller scrollerWidth], _CGRectGetHeight(bounds))]; } [self reflectScrolledClipView:_contentView]; @@ -453,11 +541,11 @@ if (!_cornerView) return _CGRectMakeZero(); - var bounds = [self bounds], + var bounds = [self _insetBounds], frame = [_cornerView frame]; frame.origin.x = _CGRectGetMaxX(bounds) - _CGRectGetWidth(frame); - frame.origin.y = 0; + frame.origin.y = _CGRectGetMinY(bounds); return frame; } @@ -469,7 +557,7 @@ if (!headerView) return _CGRectMakeZero(); - var frame = [self bounds]; + var frame = [self _insetBounds]; frame.size.height = _CGRectGetHeight([headerView frame]); frame.size.width -= _CGRectGetWidth([self _cornerViewFrame]); @@ -662,6 +750,42 @@ return _verticalPageScroll; } +// CPView Overrides + +- (void)drawRect:(CPRect)aRect +{ + [super drawRect:aRect]; + + var strokeRect = [self bounds], + context = [[CPGraphicsContext currentContext] graphicsPort]; + + if (_borderType == CPNoBorder) + return; + + CGContextSetLineWidth(context, 1); + + switch (_borderType) + { + case CPLineBorder: + CGContextSetStrokeColor(context, [CPColor blackColor]); + CGContextStrokeRect(context, _CGRectInset(strokeRect, 0.5, 0.5)); + break; + + case CPBezelBorder: + CPDrawGrayBezel(strokeRect); + break; + + case CPGrooveBorder: + CPDrawGroove(strokeRect, YES); + break; + + default: + break; + } +} + +// CPResponder Overrides + /*! Handles a scroll wheel event from the user. @param anEvent the scroll wheel event @@ -758,7 +882,8 @@ var CPScrollViewContentViewKey = "CPScrollViewContentView", CPScrollViewVScrollerKey = "CPScrollViewVScroller", CPScrollViewHScrollerKey = "CPScrollViewHScroller", CPScrollViewAutohidesScrollerKey = "CPScrollViewAutohidesScroller", - CPScrollViewCornerViewKey = "CPScrollViewCornerViewKey"; + CPScrollViewCornerViewKey = "CPScrollViewCornerViewKey", + CPScrollViewBorderTypeKey = "CPScrollViewBorderTypeKey"; @implementation CPScrollView (CPCoding) @@ -788,6 +913,8 @@ var CPScrollViewContentViewKey = "CPScrollViewContentView", _hasHorizontalScroller = [aCoder decodeBoolForKey:CPScrollViewHasHScrollerKey]; _autohidesScrollers = [aCoder decodeBoolForKey:CPScrollViewAutohidesScrollerKey]; + _borderType = [aCoder decodeIntForKey:CPScrollViewBorderTypeKey]; + _cornerView = [aCoder decodeObjectForKey:CPScrollViewCornerViewKey]; // Do 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. @@ -817,6 +944,8 @@ var CPScrollViewContentViewKey = "CPScrollViewContentView", [aCoder encodeBool:_autohidesScrollers forKey:CPScrollViewAutohidesScrollerKey]; [aCoder encodeObject:_cornerView forKey:CPScrollViewCornerViewKey]; + + [aCoder encodeInt:_borderType forKey:CPScrollViewBorderTypeKey]; } @end diff --git a/Tests/Manual/NewTableTest/AppController.j b/Tests/Manual/NewTableTest/AppController.j new file mode 100644 index 000000000..103fceb50 --- /dev/null +++ b/Tests/Manual/NewTableTest/AppController.j @@ -0,0 +1,60 @@ +/* + * AppController.j + * TableCibTest + * + * Created by Francisco Tolmasky on July 5, 2009. + * Copyright 2009, 280 North, Inc. All rights reserved. + */ + +@import + +CPLogRegister(CPLogConsole); + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib + CPScrollView theScrollView; + CPTableView theTableView; + CPPopupButton theBorderTypePopup; +} + +- (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]; + + [theWindow setBackgroundColor:[CPColor colorWithHexString:@"f3f4f5"]]; + + [theBorderTypePopup selectItemWithTag:[theScrollView borderType]]; +} + +- (int)numberOfRowsInTableView:(CPTableView)tableView +{ + return 10; +} + +- (id)tableView:(CPTableView)tableView objectValueForTableColumn:(CPTableColumn)tableColumn row:(int)row +{ + return String((row + 1) * [[tableColumn identifier] intValue]); +} + +// Actions + +- (void)setBorder:(id)sender +{ + var type = [[sender selectedItem] tag]; + console.log('type=%d', type); + + [theScrollView setBorderType:type]; +} + +@end \ No newline at end of file diff --git a/Tests/Manual/NewTableTest/Info.plist b/Tests/Manual/NewTableTest/Info.plist new file mode 100644 index 000000000..f2ebe529d --- /dev/null +++ b/Tests/Manual/NewTableTest/Info.plist @@ -0,0 +1,12 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + TableCibTest + CPPrincipalClass + CPApplication + + diff --git a/Tests/Manual/NewTableTest/Resources/MainMenu.cib b/Tests/Manual/NewTableTest/Resources/MainMenu.cib new file mode 100644 index 000000000..5cf64541f --- /dev/null +++ b/Tests/Manual/NewTableTest/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;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;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;41E;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;2;45E;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;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;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;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;78E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;85E;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;2;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;22E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;29E;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;86E;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;87E;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;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;47E;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;47E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;90E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;91E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;92E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;47E;K;18;CPControlActionKeyD;K;6;CP$UIDd;2;93E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;94E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;92E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;2;95E;E;D;K;10;$classnameS;6;CPMenuK;8;$classesA;S;6;CPMenuS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;2;96E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;2;97E;E;D;K;10;$classnameS;13;CPTableColumnK;8;$classesA;S;13;CPTableColumnS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;2;98E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;2;99E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;100E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;101E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;103E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;104E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;3;105E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;10;CPMenuItemK;8;$classesA;S;10;CPMenuItemS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;106E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;2;29E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;107E;K;21;CPMenuItemIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;108E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;22E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;109E;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;110E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;2;29E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;107E;K;21;CPMenuItemIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;3;108E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;22E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;109E;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;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;33E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;111E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;112E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;33E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;113E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;114E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;94E;K;11;$aalignmentD;K;6;CP$UIDd;2;92E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;94E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;1;0E;K;20;CPPopUpButtonMenuKeyD;K;6;CP$UIDd;2;22E;K;29;CPPopUpButtonSelectedIndexKeyD;K;6;CP$UIDd;2;92E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;3;115E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;116E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;117E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;118E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;119E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;120E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;3;105E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;121E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;2;29E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;107E;K;21;CPMenuItemIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;105E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;22E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;109E;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;32E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;122E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;122E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;123E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;125E;E;D;K;10;$classnameS;17;CPTableHeaderViewK;8;$classesA;S;17;CPTableHeaderViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;35E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;126E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;127E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;127E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;126E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;29;CPTableHeaderViewTableViewKeyD;K;6;CP$UIDd;2;41E;E;D;K;6;$classD;K;6;CP$UIDd;2;25E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;128E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;2;29E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;107E;K;21;CPMenuItemIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;3;129E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;22E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;3;130E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;3;131E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;3;132E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;3;133E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;3;134E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;33E;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;40E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;135E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;136E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;136E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;135E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;12;$agrid-colorD;K;6;CP$UIDd;3;138E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;94E;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;3;139E;K;30;CPTableViewIntercellSpacingKeyD;K;6;CP$UIDd;3;140E;K;31;CPTableViewMultipleSelectionKeyD;K;6;CP$UIDd;3;141E;K;28;CPTableViewEmptySelectionKeyD;K;6;CP$UIDd;3;141E;K;30;CPTableViewColumnReorderingKeyD;K;6;CP$UIDd;3;141E;K;28;CPTableViewColumnResizingKeyD;K;6;CP$UIDd;3;141E;K;29;CPTableViewColumnSelectionKeyD;K;6;CP$UIDd;3;141E;K;26;CPTableViewTableColumnsKeyD;K;6;CP$UIDd;3;142E;K;23;CPTableViewGridColorKeyD;K;6;CP$UIDd;3;138E;K;27;CPTableViewGridStyleMaskKeyD;K;6;CP$UIDd;1;0E;K;39;CPTableViewUsesAlternatingBackgroundKeyD;K;6;CP$UIDd;3;141E;K;34;CPTableViewAlternatingRowColorsKeyD;K;6;CP$UIDd;1;0E;K;24;CPTableViewCornerViewKeyD;K;6;CP$UIDd;3;144E;K;24;CPTableViewHeaderViewKeyD;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;47E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;145E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;146E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;47E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;90E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;147E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;92E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;47E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;148E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;94E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;92E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;149E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;86E;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;44E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;33E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;150E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;151E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;33E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;113E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;12;$atext-colorD;K;6;CP$UIDd;3;152E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;105E;K;11;$aalignmentD;K;6;CP$UIDd;2;94E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;153E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;154E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;141E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;141E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;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;46E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;33E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;155E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;156E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;157E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;33E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;158E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;23;CPScrollViewContentViewD;K;6;CP$UIDd;3;135E;K;29;CPScrollViewHeaderClipViewKeyD;K;6;CP$UIDd;3;126E;K;21;CPScrollViewVScrollerD;K;6;CP$UIDd;2;20E;K;21;CPScrollViewHScrollerD;K;6;CP$UIDd;2;42E;K;23;CPScrollViewVLineScrollD;K;6;CP$UIDd;3;117E;K;23;CPScrollViewVPageScrollD;K;6;CP$UIDd;3;117E;K;23;CPScrollViewHLineScrollD;K;6;CP$UIDd;3;117E;K;23;CPScrollViewHPageScrollD;K;6;CP$UIDd;3;117E;K;24;CPScrollViewHasVScrollerD;K;6;CP$UIDd;3;160E;K;24;CPScrollViewHasHScrollerD;K;6;CP$UIDd;3;160E;K;29;CPScrollViewAutohidesScrollerD;K;6;CP$UIDd;3;160E;K;25;CPScrollViewCornerViewKeyD;K;6;CP$UIDd;3;144E;K;25;CPScrollViewBorderTypeKeyD;K;6;CP$UIDd;3;105E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;3;161E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;162E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;100E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;101E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;163E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;164E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;3;105E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;44E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;33E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;165E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;166E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;33E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;113E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;12;$atext-colorD;K;6;CP$UIDd;3;152E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;105E;K;11;$aalignmentD;K;6;CP$UIDd;2;92E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;167E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;154E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;141E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;141E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;S;17;Vertical ScrollerS;13;Menu (Border)S;16;Table Column (2)S;16;Menu Item (Line)S;12;File's OwnerS;25;Text Field Cell (Border:)S;16;Menu Item (None)S;13;Pop Up ButtonS;16;Table Column (3)S;17;Menu Item (Bezel)S;12;Content ViewS;14;App ControllerS;17;Table Header ViewS;18;Menu Item (Groove)S;25;Pop Up Button Cell (None)S;15;Window (Window)S;29;Table View (Column 1, Two, 3)S;19;Horizontal ScrollerS;35;Text Field Cell (Visual Attributes)S;11;ApplicationS;31;Static Text (Visual Attributes)S;33;Bordered Scroll View (Table View)S;16;Table Column (1)S;21;Static Text (Border:)S;27;Text Field Cell (Text Cell)S;29;Text Field Cell (Text Cell)-1S;29;Text Field Cell (Text Cell)-2D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;77E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;168E;E;D;K;6;$classD;K;6;CP$UIDd;2;77E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;29E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;169E;E;D;K;6;$classD;K;6;CP$UIDd;2;77E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;47E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;170E;E;D;K;6;$classD;K;6;CP$UIDd;2;77E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;41E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;171E;E;D;K;6;$classD;K;6;CP$UIDd;2;77E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;39E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;172E;E;D;K;6;$classD;K;6;CP$UIDd;2;77E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;41E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;173E;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;84E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;29E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;174E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;39E;E;E;S;22;{{885, 16}, {15, 215}}S;19;{{0, 0}, {15, 215}}d;1;8S;17;disabled+verticald;1;0S;27;_verticalScrollerDidScroll:d;1;4f;18;0.9956896551724138S;6;BorderD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;37E;E;E;S;1;2d;3;154d;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;102E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;176E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;177E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;179E;E;D;K;6;$classD;K;6;CP$UIDd;2;44E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;180E;K;6;$afontD;K;6;CP$UIDd;3;182E;K;12;$atext-colorD;K;6;CP$UIDd;3;183E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;94E;K;20;$avertical-alignmentD;K;6;CP$UIDd;3;105E;K;11;$aalignmentD;K;6;CP$UIDd;2;92E;K;15;$acontent-insetD;K;6;CP$UIDd;3;185E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;186E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;154E;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;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;186E;E;d;1;2S;4;LineS;17;_popUpItemAction:d;1;1d;7;1048576S;4;NoneS;23;{{104, 309}, {147, 24}}S;19;{{0, 0}, {147, 24}}d;2;12S;8;borderedS;1;3d;3;188d;2;10d;22;3.4028234663852886e+38D;K;6;$classD;K;6;CP$UIDd;3;102E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;187E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;115E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;179E;E;D;K;6;$classD;K;6;CP$UIDd;2;44E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;180E;K;6;$afontD;K;6;CP$UIDd;3;188E;K;12;$atext-colorD;K;6;CP$UIDd;3;189E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;94E;K;20;$avertical-alignmentD;K;6;CP$UIDd;3;105E;K;11;$aalignmentD;K;6;CP$UIDd;2;92E;K;15;$acontent-insetD;K;6;CP$UIDd;3;190E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;186E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;154E;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;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;186E;E;S;5;BezelS;20;{{0, 0}, {941, 593}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;49E;E;E;S;6;normalS;13;AppControllerD;K;6;$classD;K;6;CP$UIDd;3;159E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;47E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;198E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;199E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;200E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;47E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;90E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;197E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;36E;E;S;19;{{0, 0}, {899, 23}}S;6;Grooved;1;3S;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;24;{{335, 128}, {941, 593}}d;1;7S;6;WindowD;K;6;$classD;K;6;CP$UIDd;3;159E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;47E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;195E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;136E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;196E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;47E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;90E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;197E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;41E;E;S;20;{{0, 0}, {899, 231}}D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;137E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;191E;E;d;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;48E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;30E;E;E;D;K;10;$classnameS;13;_CPCornerViewK;8;$classesA;S;13;_CPCornerViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;143E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;47E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;192E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;193E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;47E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;90E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;E;S;19;{{1, 1}, {884, 15}}S;19;{{0, 0}, {884, 15}}S;8;disabledS;29;_horizontalScrollerDidScroll:f;18;0.9988888888888889S;22;{{21, 284}, {117, 25}}S;19;{{0, 0}, {117, 25}}D;K;6;$classD;K;6;CP$UIDd;3;137E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;194E;E;S;17;Visual Attributesd;4;3072S;22;{{20, 20}, {901, 249}}S;20;{{0, 0}, {901, 249}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;144E;E;E;d;2;18D;K;10;$classnameS;10;CPClipViewK;8;$classesA;S;10;CPClipViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;T;S;1;1d;3;101D;K;6;$classD;K;6;CP$UIDd;3;102E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;201E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;202E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;179E;E;D;K;6;$classD;K;6;CP$UIDd;2;44E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;180E;K;6;$afontD;K;6;CP$UIDd;3;203E;K;12;$atext-colorD;K;6;CP$UIDd;3;204E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;94E;K;20;$avertical-alignmentD;K;6;CP$UIDd;3;105E;K;11;$aalignmentD;K;6;CP$UIDd;2;92E;K;15;$acontent-insetD;K;6;CP$UIDd;3;205E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;186E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;154E;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;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;186E;E;S;21;{{41, 312}, {65, 25}}S;18;{{0, 0}, {65, 25}}S;7;Border:S;8;delegateS;18;theBorderTypePopupS;13;theScrollViewS;12;theTableViewS;9;theWindowS;10;dataSourceS;10;setBorder: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;207E;E;E;S;3;TwoD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;178E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;208E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;113E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;141E;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;181E;K;4;nameD;K;6;CP$UIDd;3;209E;K;5;stateD;K;6;CP$UIDd;3;210E;K;5;valueD;K;6;CP$UIDd;3;211E;E;D;K;6;$classD;K;6;CP$UIDd;3;181E;K;4;nameD;K;6;CP$UIDd;3;212E;K;6;valuesD;K;6;CP$UIDd;3;214E;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;184E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;215E;E;S;0;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;216E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;181E;K;4;nameD;K;6;CP$UIDd;3;209E;K;5;stateD;K;6;CP$UIDd;3;210E;K;5;valueD;K;6;CP$UIDd;3;211E;E;D;K;6;$classD;K;6;CP$UIDd;3;181E;K;4;nameD;K;6;CP$UIDd;3;212E;K;6;valuesD;K;6;CP$UIDd;3;217E;E;D;K;6;$classD;K;6;CP$UIDd;3;184E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;215E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;218E;D;K;6;CP$UIDd;3;218E;D;K;6;CP$UIDd;3;218E;D;K;6;CP$UIDd;3;108E;E;E;S;22;{{885, 225}, {16, 23}}S;18;{{0, 0}, {16, 23}}D;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;92E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;3;108E;E;E;S;20;{{1, 1}, {899, 231}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;41E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;137E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;219E;E;S;21;{{1, 232}, {899, 17}}S;19;{{0, 0}, {899, 17}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;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;3;220E;E;E;S;8;Column 1D;K;6;$classD;K;6;CP$UIDd;3;181E;K;4;nameD;K;6;CP$UIDd;3;209E;K;5;stateD;K;6;CP$UIDd;3;210E;K;5;valueD;K;6;CP$UIDd;3;211E;E;D;K;6;$classD;K;6;CP$UIDd;3;181E;K;4;nameD;K;6;CP$UIDd;3;212E;K;6;valuesD;K;6;CP$UIDd;3;221E;E;D;K;6;$classD;K;6;CP$UIDd;3;184E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;215E;E;D;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;206E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;103E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;103E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;158E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;E;S;32;Lucida Grande, Arial, sans-serifS;4;fontS;21;selectedTableDataViewD;K;6;$classD;K;6;CP$UIDd;3;178E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;208E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;113E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;160E;E;S;10;text-colorD;K;10;$classnameS;19;CPMutableDictionaryK;8;$classesA;S;19;CPMutableDictionaryS;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;197E;K;6;normalD;K;6;CP$UIDd;3;222E;E;E;S;39;{"top":0,"right":0,"bottom":0,"left":5}D;K;6;$classD;K;6;CP$UIDd;3;206E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;119E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;119E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;158E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;E;D;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;197E;K;6;normalD;K;6;CP$UIDd;3;223E;E;E;f;18;0.8980392156862745D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;3;108E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;206E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;163E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;175E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;163E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;158E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;124E;E;D;K;6;$classD;K;6;CP$UIDd;3;213E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;197E;K;6;normalD;K;6;CP$UIDd;3;224E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;137E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;225E;E;D;K;6;$classD;K;6;CP$UIDd;3;137E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;226E;E;D;K;6;$classD;K;6;CP$UIDd;3;137E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;227E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;108E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;108E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;108E;E;E;f;3;0.2E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/NewTableTest/Resources/MainMenu.xib b/Tests/Manual/NewTableTest/Resources/MainMenu.xib new file mode 100644 index 000000000..a6706fa49 --- /dev/null +++ b/Tests/Manual/NewTableTest/Resources/MainMenu.xib @@ -0,0 +1,845 @@ + + + + 1050 + 10F569 + 762 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 762 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{335, 157}, {941, 593}} + 1946157056 + Window + NSWindow + + {1.79769e+308, 1.79769e+308} + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {899, 231} + + + YES + + + 256 + {899, 17} + + + + + + + -2147483392 + {{885, 1}, {16, 17}} + + + + + YES + + 1 + 101 + 40 + 1000 + + 75628096 + 2048 + Column 1 + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + Text Cell + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + 2 + 154 + 40 + 1000 + + 75628096 + 2048 + Two + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 3 + 188 + 10 + 3.4028234663852886e+38 + + 75628096 + 2048 + 3 + + + 6 + System + headerColor + + 3 + MQA + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 23 + 35651584 + + + 4 + 15 + 0 + YES + 0 + + + {{1, 17}, {899, 231}} + + + + + + 4 + + + + -2147483392 + {{885, 18}, {15, 215}} + + + + _doScroller: + 0.99568965517241381 + + + + -2147483392 + {{1, 233}, {884, 15}} + + + 1 + + _doScroller: + 0.99888888888888894 + + + + 2304 + + YES + + + {{1, 0}, {899, 17}} + + + + + + 4 + + + + {{20, 324}, {901, 249}} + + + + 562 + + + + + + QSAAAEEgAABByAAAQcgAAA + + + + 292 + {{25, 288}, {109, 17}} + + + YES + + 68288064 + 272630784 + Visual Attributes + + + + 6 + System + controlColor + + + + + + + + 292 + {{104, 256}, {147, 26}} + + + YES + + -2076049856 + 2048 + + + 109199615 + 129 + + + 400 + 75 + + + None + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + Border + + YES + + + + Line + + 1048576 + 2147483647 + + + _popUpItemAction: + 1 + + + + + Bezel + + 1048576 + 2147483647 + + + _popUpItemAction: + 2 + + + + + Groove + + 2147483647 + + + _popUpItemAction: + 3 + + + + + + 1 + YES + YES + 2 + + + + + 292 + {{45, 260}, {57, 17}} + + + YES + + 68288064 + 4195328 + Border: + + + + + + + + {941, 593} + + + + {{0, 0}, {1440, 878}} + {1.79769e+308, 1.79769e+308} + + + AppController + + + + + YES + + + delegate + + + + 451 + + + + theWindow + + + + 459 + + + + dataSource + + + + 500 + + + + setBorder: + + + + 518 + + + + theTableView + + + + 519 + + + + theScrollView + + + + 520 + + + + theBorderTypePopup + + + + 521 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + 450 + + + + + 489 + + + YES + + + + + + + + + 490 + + + + + 491 + + + + + 492 + + + YES + + + + + + + + 494 + + + YES + + + + + + 495 + + + YES + + + + + + 496 + + + + + 497 + + + + + 501 + + + YES + + + + + + 502 + + + + + 504 + + + + + 512 + + + YES + + + + + + 513 + + + + + 505 + + + YES + + + + + + 506 + + + YES + + + + + + 507 + + + YES + + + + + + + + + 516 + + + + + 508 + + + + + 509 + + + + + 510 + + + + + 514 + + + YES + + + + + + 515 + + + + + + + YES + + YES + -3.IBPluginDependency + 371.IBEditorWindowLastContentRect + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 371.editorWindowContentRectSynchronizationRect + 371.windowTemplate.maxSize + 372.IBPluginDependency + 489.IBPluginDependency + 490.IBPluginDependency + 491.IBPluginDependency + 492.IBPluginDependency + 494.IBPluginDependency + 495.IBPluginDependency + 496.IBPluginDependency + 497.IBPluginDependency + 505.IBPluginDependency + 506.IBPluginDependency + 507.IBEditorWindowLastContentRect + 507.IBPluginDependency + 508.IBPluginDependency + 509.IBPluginDependency + 510.IBPluginDependency + 512.IBPluginDependency + 513.IBPluginDependency + 514.IBPluginDependency + 515.IBPluginDependency + 516.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + {{387, 319}, {941, 593}} + com.apple.InterfaceBuilder.CocoaPlugin + {{387, 319}, {941, 593}} + + {{33, 99}, {480, 360}} + {3.40282e+38, 3.40282e+38} + 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 + {{465, 510}, {147, 83}} + 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 + + + + + YES + + + YES + + + + 521 + + + + YES + + AppController + NSObject + + setBorder: + id + + + YES + + YES + theBorderTypePopup + theScrollView + theTableView + theWindow + + + YES + NSPopUpButton + NSScrollView + NSTableView + NSWindow + + + + IBUserSource + + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../adsfsdf.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/Tests/Manual/NewTableTest/Resources/spinner.gif b/Tests/Manual/NewTableTest/Resources/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..06dbc2bc21dddcf0e09b566d5b211aee89570f52 GIT binary patch literal 1849 zcma*odr(tX9tZHtz31lM+(&Y`A`Ou`NeG&R#DrIfV%?hng21vs6v>ooRQQFbk7E_K!V( z{?5!fpZWgIZ%*d6t%i*j24bL}AZUJm9)h6R*;%L4IWse3G#VWaN1#$zSSXcBhlYlH zJ|D}n{r&w2f+Qp)SS*&n?*G4}{}!h?td_mjU6Kad-rW*QwWYCUk7d^e+sjpZAn6kT z5rM;`{~_}-wm+L@%+E;JphLm}C3WzQAQD0wBoY|rOTQX{(@pp-WAA8Iw0HKl|15j) zhGh(SFWu#5zUCw^T!}C~eC}~?{xG-r7ugQC>taC+|L^xr&a%{#cgUOZXIM&v?)k^2 z1i5%0!U00wq)r4vlAwXBA_m5J5WNeuBm-XJQ5pG4GD%vc|K){+TJ{AkHqN@SJKczX zU}QRd9n*_bf^h94)6Ctv{CUfz_;qs#RDuQ$DR%y1&5G-a6rhf*4Y zl+UOD1*GE{GQ7vv;c-tTIMkz0ovO>9j%b5hpa@a*CBJ#W!0@ndSwF|%hMkdFtXiU) z`BEp+yhkt8ZY>tg&uyH@%^%K4jDrbA;et&vnnzZ3z22@e6<27z2Vk13kb7OtISyxv z(XoO-LNQCZe3lfzc%*pNqU<9T+p~teThOEB+~e&U0mC|zS{Q)dJZ)!^1f7L(zg*L> z*vSW%?dR~@@0(}x6-V^A`~ImD;)NaBUnP8;RH=bS2@pk`wp>>8r&jGjmGPy%1BW}v zoPo}ca$~bze@efc3kapuEVW1!%teOZT3j2Tw5=hjiAf02d}7dL0oFC%@=RXp5Ow#% z@a>+AM|YWt$n&e`>sB-32gBcuTi>R>*|8@lp`y6thc7ydyqDsuUn~YzZf|{-R@-3y zL#wx{Ii}xxL_csiW*LBn0-A$>zp4WOmkf6=ilrjlW?-l9+bCd7|i?*b5NTmy<<6NZ0T8$SN@mwdC2f z6jqK=N@bS@!=YSj%>h0}*4p+%0HbTIrE$w7UMT6+AZZ&DAo*qZAAi(OtNbIfl#Dw^ zJWeiCp~zi#&t6x}m9)O^eR4HiLV3QA<<0>HZ8%$^lrSE94Wb}=+MM^!b>n#5&-JQR zkr-CEu9C;_F*7DqDisulV6Pmg$nFL0TPn%~*m^-`Z3^BgU(sNpnx%nW(!eV9A&FvI zHL3X3lw8Wji^6=8KbQDE-e%b?svdFxxdh$8r97@7$ojeI`6AL8Ob6QC$qh&>ZWVDX1F{0vJnT%%mE;GveKWR%C} zM&4d;Jf3s9|HAA)yVUPo`Aq;0do#)uHSXi5*QF*)x@MVVHr+cN)uMZ__F|&Ta#p8d z53TOKtce!PJUuie8UWol-S(`c2nH?UGqJP{!4RR4u$LCfn)q-hj0^f=h(VYy)T6eN zhRO!ja-aDBTcgeyP(8Ua4IdiOog^*CQa?R(cP#9AgL9`j>EX-6Yf1lzX(!~``M1XC zNmM<4<6d~wWZ$Xrk0K}UteTrq@LBBk#MsjkK;pbuVhe)NI7(7Pf(l?lxC7=1Z7Pzl zMbS;nV4NI5_N{1$P)&XC)huOGQ+h^zpYUZfb*1n6>!`#*b3y52LGmi+<4sY5jyD#- zw&$d}DTguLAfnRtjrM*JfqtHqUu6rQoU=g%1E9xk%;)TDm^2<8n-0IhTsQFaek)MY}>PK4;nBk=ow4pF>vzkO& gna%Org-kgQCf=+BeMi^RbuY;YE~rTjend;_cdi8t>i_@% literal 0 HcmV?d00001 diff --git a/Tests/Manual/NewTableTest/index-debug.html b/Tests/Manual/NewTableTest/index-debug.html new file mode 100644 index 000000000..9c13f1632 --- /dev/null +++ b/Tests/Manual/NewTableTest/index-debug.html @@ -0,0 +1,94 @@ + + + + + + + + NewTableTest + + + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/NewTableTest/index.html b/Tests/Manual/NewTableTest/index.html new file mode 100644 index 000000000..e3cc20955 --- /dev/null +++ b/Tests/Manual/NewTableTest/index.html @@ -0,0 +1,68 @@ + + + + + + + + NewTableTest + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/NewTableTest/main.j b/Tests/Manual/NewTableTest/main.j new file mode 100755 index 000000000..af6279da3 --- /dev/null +++ b/Tests/Manual/NewTableTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * TableCibTest + * + * Created by Francisco Tolmasky on July 5, 2009. + * Copyright 2009, 280 North, Inc. All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tools/nib2cib/NSScrollView.j b/Tools/nib2cib/NSScrollView.j index f14c87f41..a39fdbf4d 100644 --- a/Tools/nib2cib/NSScrollView.j +++ b/Tools/nib2cib/NSScrollView.j @@ -41,6 +41,8 @@ _hasVerticalScroller = !!(flags & (1 << 4)); _hasHorizontalScroller = !!(flags & (1 << 5)); _autohidesScrollers = !!(flags & (1 << 9)); + + _borderType = flags & 0x03; //[aCoder decodeBytesForKey:"NSScrollAmts"]; _verticalLineScroll = 10.0; From 1fed798120087e0f22c36e5019ccb7f55da6c26a Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Wed, 11 Aug 2010 23:07:05 -0400 Subject: [PATCH 17/24] Fixed: CPGraphics.j was not imported anywhere so the CPScrollView borders changes didn't work. Also minor code cleanup. --- AppKit/AppKit.j | 9 +++---- AppKit/CPGraphics.j | 50 +++++++++++++++++++------------------- AppKit/CPScrollView.j | 56 +++++++++++++++++++++---------------------- 3 files changed, 58 insertions(+), 57 deletions(-) diff --git a/AppKit/AppKit.j b/AppKit/AppKit.j index 95bbe6201..9241c6398 100644 --- a/AppKit/AppKit.j +++ b/AppKit/AppKit.j @@ -36,8 +36,8 @@ @import "CPCibLoading.j" @import "CPCibOutletConnector.j" @import "CPClipView.j" -@import "CPCollectionViewItem.j" @import "CPCollectionView.j" +@import "CPCollectionViewItem.j" @import "CPColor.j" @import "CPColorPanel.j" @import "CPColorWell.j" @@ -53,6 +53,7 @@ @import "CPFont.j" @import "CPFontManager.j" @import "CPGeometry.j" +@import "CPGraphics.j" @import "CPImage.j" @import "CPImageView.j" @import "CPKeyBinding.j" @@ -66,17 +67,17 @@ @import "CPProgressIndicator.j" @import "CPRadio.j" @import "CPResponder.j" -@import "CPSearchField.j" -@import "CPScrollView.j" @import "CPScroller.j" +@import "CPScrollView.j" +@import "CPSearchField.j" @import "CPSecureTextField.j" @import "CPSegmentedControl.j" @import "CPShadow.j" @import "CPSlider.j" @import "CPSplitView.j" -@import "CPTabView.j" @import "CPTableColumn.j" @import "CPTableView.j" +@import "CPTabView.j" @import "CPText.j" @import "CPTextField.j" @import "CPToolbar.j" diff --git a/AppKit/CPGraphics.j b/AppKit/CPGraphics.j index 3044acf7e..baf1379e3 100644 --- a/AppKit/CPGraphics.j +++ b/AppKit/CPGraphics.j @@ -29,44 +29,44 @@ function CPDrawGrayBezel(aRect) { var context = [[CPGraphicsContext currentContext] graphicsPort]; - + CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]); - + var y = _CGRectGetMinY(aRect) + 0.5; - + CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y); CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 1.0, y); CGContextStrokePath(context); - + CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor colorWithWhite:192.0/255.0 alpha:1.0]); CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 1.0, y); CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); CGContextStrokePath(context); - + CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor colorWithWhite:142.0/255.0 alpha:1.0]); CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y); CGContextStrokePath(context); - + CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor colorWithWhite:190.0/255.0 alpha:1.0]); - + var x = _CGRectGetMaxX(aRect) - 0.5; - + CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 1.0); CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect)); - + CGContextMoveToPoint(context, x - 0.5, _CGRectGetMaxY(aRect) - 0.5); CGContextAddLineToPoint(context, _CGRectGetMinX(aRect), _CGRectGetMaxY(aRect) - 0.5); - + x = _CGRectGetMinX(aRect) + 0.5; - + CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect)); CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect) + 1.0); - + CGContextStrokePath(context); } @@ -76,38 +76,38 @@ function CPDrawGroove(aRect, drawTopBorder) CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor colorWithWhite:159.0/255.0 alpha:1.0]); - + var y = _CGRectGetMinY(aRect) + 0.5; - + CGContextMoveToPoint(context, _CGRectGetMinX(aRect), y); CGContextAddLineToPoint(context, _CGRectGetMaxX(aRect), y); - + var x = _CGRectGetMaxX(aRect) - 1.5; - + CGContextMoveToPoint(context, x, _CGRectGetMinY(aRect) + 2.0); CGContextAddLineToPoint(context, x, _CGRectGetMaxY(aRect) - 1.0); - + y = _CGRectGetMaxY(aRect) - 1.5; - + CGContextMoveToPoint(context, _CGRectGetMaxX(aRect) - 1.0, y); CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 2.0, y); - + x = _CGRectGetMinX(aRect) + 0.5; - + CGContextMoveToPoint(context, x, _CGRectGetMaxY(aRect)); CGContextAddLineToPoint(context, x, _CGRectGetMinY(aRect)); - + CGContextStrokePath(context); - + CGContextBeginPath(context); CGContextSetStrokeColor(context, [CPColor whiteColor]); - + var rect = _CGRectOffset(aRect, 1.0, 1.0); - + rect.size.width -= 1.0; rect.size.height -= 1.0; CGContextStrokeRect(context, _CGRectInset(rect, 0.5, 0.5)); - + if (drawTopBorder) { CGContextBeginPath(context); diff --git a/AppKit/CPScrollView.j b/AppKit/CPScrollView.j index b0d89c1f7..41dc25c94 100644 --- a/AppKit/CPScrollView.j +++ b/AppKit/CPScrollView.j @@ -40,21 +40,21 @@ CPClipView _contentView; CPClipView _headerClipView; CPView _cornerView; - + BOOL _hasVerticalScroller; BOOL _hasHorizontalScroller; BOOL _autohidesScrollers; - + CPScroller _verticalScroller; CPScroller _horizontalScroller; - + int _recursionCount; - + float _verticalLineScroll; float _verticalPageScroll; float _horizontalLineScroll; float _horizontalPageScroll; - + CPBorderType _borderType; } @@ -69,7 +69,7 @@ _horizontalLineScroll = 10.0; _horizontalPageScroll = 10.0; - + _borderType = CPNoBorder; _contentView = [[CPClipView alloc] initWithFrame:[self _insetBounds]]; @@ -93,13 +93,13 @@ { var bounds = [self _insetBounds:_CGRectMake(0.0, 0.0, frameSize.width, frameSize.height) borderType:borderType], scrollerWidth = [CPScroller scrollerWidth]; - + if (hFlag) bounds.size.height -= scrollerWidth; - + if (vFlag) bounds.size.width -= scrollerWidth; - + return bounds.size; } @@ -110,13 +110,13 @@ heightInset = contentSize.height - bounds.size.height, frameSize = _CGSizeMake(contentSize.width + widthInset, contentSize.height + heightInset), scrollerWidth = [CPScroller scrollerWidth]; - + if (hFlag) frameSize.height -= scrollerWidth; - + if (vFlag) frameSize.width -= scrollerWidth; - + return frameSize; } @@ -127,14 +127,14 @@ case CPLineBorder: case CPBezelBorder: return _CGRectInset(bounds, 1.0, 1.0); - + case CPGrooveBorder: bounds = _CGRectInset(bounds, 2.0, 2.0); ++bounds.origin.y; --bounds.size.height; - + return bounds; - + case CPNoBorder: default: return bounds; @@ -339,9 +339,9 @@ { if (_borderType == borderType) return; - + _borderType = borderType; - + [self reflectScrolledClipView:_contentView]; [self setNeedsDisplay:YES]; } @@ -401,8 +401,8 @@ if (_hasHorizontalScroller && !_horizontalScroller) { var bounds = [self _insetBounds]; - - [self setHorizontalScroller:[[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, MAX(_CGRectGetWidth(bounds), [CPScroller scrollerWidth]+1), [CPScroller scrollerWidth])]]; + + [self setHorizontalScroller:[[CPScroller alloc] initWithFrame:CGRectMake(0.0, 0.0, MAX(_CGRectGetWidth(bounds), [CPScroller scrollerWidth] + 1), [CPScroller scrollerWidth])]]; [[self horizontalScroller] setFrameSize:CGSizeMake(_CGRectGetWidth(bounds), [CPScroller scrollerWidth])]; } @@ -464,8 +464,8 @@ if (_hasVerticalScroller && !_verticalScroller) { var bounds = [self _insetBounds]; - - [self setVerticalScroller:[[CPScroller alloc] initWithFrame:_CGRectMake(0.0, 0.0, [CPScroller scrollerWidth], MAX(_CGRectGetHeight(bounds), [CPScroller scrollerWidth]+1))]]; + + [self setVerticalScroller:[[CPScroller alloc] initWithFrame:_CGRectMake(0.0, 0.0, [CPScroller scrollerWidth], MAX(_CGRectGetHeight(bounds), [CPScroller scrollerWidth] + 1))]]; [[self verticalScroller] setFrameSize:CGSizeMake([CPScroller scrollerWidth], _CGRectGetHeight(bounds))]; } @@ -755,13 +755,13 @@ - (void)drawRect:(CPRect)aRect { [super drawRect:aRect]; - - var strokeRect = [self bounds], - context = [[CPGraphicsContext currentContext] graphicsPort]; - + if (_borderType == CPNoBorder) return; - + + var strokeRect = [self bounds], + context = [[CPGraphicsContext currentContext] graphicsPort]; + CGContextSetLineWidth(context, 1); switch (_borderType) @@ -774,7 +774,7 @@ case CPBezelBorder: CPDrawGrayBezel(strokeRect); break; - + case CPGrooveBorder: CPDrawGroove(strokeRect, YES); break; @@ -944,7 +944,7 @@ var CPScrollViewContentViewKey = "CPScrollViewContentView", [aCoder encodeBool:_autohidesScrollers forKey:CPScrollViewAutohidesScrollerKey]; [aCoder encodeObject:_cornerView forKey:CPScrollViewCornerViewKey]; - + [aCoder encodeInt:_borderType forKey:CPScrollViewBorderTypeKey]; } From dd9c085ae359506d7cedb31d7036aa4604f8b08c Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Wed, 11 Aug 2010 22:33:14 -0500 Subject: [PATCH 18/24] Fix for new sort being unstable with a huge thanks to Shon Frazier. Reviewed by Me and Alexander Ljungberg. --- Foundation/CPArray.j | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Foundation/CPArray.j b/Foundation/CPArray.j index cb19f0edb..14931c0bc 100755 --- a/Foundation/CPArray.j +++ b/Foundation/CPArray.j @@ -1326,7 +1326,7 @@ CPEnumerationReverse = 1 << 1; */ - (void)sortUsingFunction:(Function)aFunction context:(id)aContext { - var h, i, j, k, l, m, n = [self count]; + var h, i, j, k, l, m, n = [self count], o; var A, B = []; for (h = 1; h < n; h += h) @@ -1343,7 +1343,8 @@ CPEnumerationReverse = 1 << 1; for (i = 0, k = l; k < j && j <= m + h; k++) { A = self[j]; - if (aFunction(A, B[i], aContext) == CPOrderedDescending) + o = aFunction(A, B[i], aContext); + if (o == CPOrderedDescending || o == CPOrderedSame) self[k] = B[i++]; else { From 233df3bdabd86995ef3d6a3d1744a868b0366e3f Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Wed, 11 Aug 2010 23:28:06 -0400 Subject: [PATCH 19/24] Fixed: the "fix for column reordering with hidden columns" sometimes caused the table view to try to remove nonexistent data views and crash. The fix is to consider a nonexistent data view already removed and just move on. --- AppKit/CPTableView.j | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 27884902d..929f4a139 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -2277,9 +2277,14 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; for (; rowIndex < rowsCount; ++rowIndex) { var row = rowArray[rowIndex], - dataView = [_dataViewsForTableColumns[tableColumnUID] objectAtIndex:row]; + dataViews = _dataViewsForTableColumns[tableColumnUID]; - [_dataViewsForTableColumns[tableColumnUID] replaceObjectAtIndex:row withObject:nil]; + if (!dataViews || row >= dataViews.length) + continue; + + var dataView = [dataViews objectAtIndex:row]; + + [dataViews replaceObjectAtIndex:row withObject:nil]; [self _enqueueReusableDataView:dataView]; } @@ -3722,14 +3727,14 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", CGContextSetStrokeColor(context, _lineColor); var points = [ - _CGPointMake(0.5, 0), + _CGPointMake(0.5, 0), _CGPointMake(0.5, aRect.size.height) ]; CGContextStrokeLineSegments(context, points, 2); - + points = [ - _CGPointMake(aRect.size.width - 0.5, 0), + _CGPointMake(aRect.size.width - 0.5, 0), _CGPointMake(aRect.size.width - 0.5, aRect.size.height) ]; From 0b1b1bbe0b6f208251291ad109bc495782850d28 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 Aug 2010 10:15:30 -0400 Subject: [PATCH 20/24] Fix for issue #817 (Support for alignment and line break mode in NSTextField/CPTextField) --- AppKit/CPTextField.j | 7 +++++++ Tools/nib2cib/NSCell.j | 12 +----------- Tools/nib2cib/NSTextField.j | 3 ++- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index 489312f12..84037104f 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -1165,6 +1165,7 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey", CPTextFieldBezelStyleKey = "CPTextFieldBezelStyleKey", CPTextFieldDrawsBackgroundKey = "CPTextFieldDrawsBackgroundKey", CPTextFieldLineBreakModeKey = "CPTextFieldLineBreakModeKey", + CPTextFieldAlignmentKey = "CPTextFieldAlignmentKey", CPTextFieldBackgroundColorKey = "CPTextFieldBackgroundColorKey", CPTextFieldPlaceholderStringKey = "CPTextFieldPlaceholderStringKey"; @@ -1188,6 +1189,9 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey", [self setTextFieldBackgroundColor:[aCoder decodeObjectForKey:CPTextFieldBackgroundColorKey]]; + [self setLineBreakMode:[aCoder decodeIntForKey:CPTextFieldLineBreakModeKey]]; + [self setAlignment:[aCoder decodeIntForKey:CPTextFieldAlignmentKey]]; + [self setPlaceholderString:[aCoder decodeObjectForKey:CPTextFieldPlaceholderStringKey]]; } @@ -1209,6 +1213,9 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey", [aCoder encodeObject:_textFieldBackgroundColor forKey:CPTextFieldBackgroundColorKey]; + [aCoder encodeInt:[self lineBreakMode] forKey:CPTextFieldLineBreakModeKey]; + [aCoder encodeInt:[self alignment] forKey:CPTextFieldAlignmentKey]; + [aCoder encodeObject:_placeholderString forKey:CPTextFieldPlaceholderStringKey]; } diff --git a/Tools/nib2cib/NSCell.j b/Tools/nib2cib/NSCell.j index f34f754af..9d3dedb73 100644 --- a/Tools/nib2cib/NSCell.j +++ b/Tools/nib2cib/NSCell.j @@ -67,19 +67,9 @@ _isContinuous = (flags & 0x00080100) ? YES : NO; _wraps = (flags & 0x00100000) ? NO : YES; _alignment = (flags2 & 0x1c000000) >> 26; + _lineBreakMode = (flags2 & 0x0E00) >> 9; _controlSize = (flags2 & 0xE0000) >> 17; - switch ((flags2 & 0x00000F00) >> 8) - { - case 0: _lineBreakMode = CPLineBreakByWordWrapping; break; - case 2: _lineBreakMode = CPLineBreakByCharWrapping; break; - case 6: _lineBreakMode = CPLineBreakByTruncatingHead; break; - case 8: _lineBreakMode = CPLineBreakByTruncatingTail; break; - case 10: _lineBreakMode = CPLineBreakByTruncatingMiddle; break; - case 4: - default: _lineBreakMode = CPLineBreakByClipping; break; - } - _objectValue = [aCoder decodeObjectForKey:@"NSContents"]; _font = [aCoder decodeObjectForKey:@"NSSupport"]; } diff --git a/Tools/nib2cib/NSTextField.j b/Tools/nib2cib/NSTextField.j index 1368ea40e..746879170 100644 --- a/Tools/nib2cib/NSTextField.j +++ b/Tools/nib2cib/NSTextField.j @@ -49,7 +49,8 @@ [self setBezelStyle:[cell bezelStyle]]; [self setDrawsBackground:[cell drawsBackground]]; - //[self setLineBreakMode:???]; + [self setLineBreakMode:[cell lineBreakMode]]; + [self setAlignment:[cell alignment]]; [self setTextFieldBackgroundColor:[cell backgroundColor]]; [self setPlaceholderString:[cell placeholderString]]; From ab5e2dd77473dfc781efedbd571e3a091a78b308 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 Aug 2010 09:55:51 -0400 Subject: [PATCH 21/24] Fix for issue #816 (NSTableView/CPTableView do not read selection highlight style and column resizing style) --- AppKit/CPTableView.j | 8 +++++++- Tools/nib2cib/NSTableView.j | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 929f4a139..3aace2d55 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -3490,11 +3490,13 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", CPTableViewTableColumnsKey = @"CPTableViewTableColumnsKey", CPTableViewRowHeightKey = @"CPTableViewRowHeightKey", CPTableViewIntercellSpacingKey = @"CPTableViewIntercellSpacingKey", + CPTableViewSelectionHighlightStyleKey = @"CPTableViewSelectionHighlightStyleKey", CPTableViewMultipleSelectionKey = @"CPTableViewMultipleSelectionKey", CPTableViewEmptySelectionKey = @"CPTableViewEmptySelectionKey", CPTableViewColumnReorderingKey = @"CPTableViewColumnReorderingKey", CPTableViewColumnResizingKey = @"CPTableViewColumnResizingKey", CPTableViewColumnSelectionKey = @"CPTableViewColumnSelectionKey", + CPTableViewColumnAutoresizingStyleKey = @"CPTableViewColumnAutoresizingStyleKey", CPTableViewGridColorKey = @"CPTableViewGridColorKey", CPTableViewGridStyleMaskKey = @"CPTableViewGridStyleMaskKey", CPTableViewUsesAlternatingBackgroundKey = @"CPTableViewUsesAlternatingBackgroundKey", @@ -3518,7 +3520,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", _allowsColumnSelection = [aCoder decodeBoolForKey:CPTableViewColumnSelectionKey]; //Setting Display Attributes - _selectionHighlightStyle = CPTableViewSelectionHighlightStyleRegular; + _selectionHighlightStyle = [aCoder decodeIntForKey:CPTableViewSelectionHighlightStyleKey]; + _columnAutoResizingStyle = [aCoder decodeIntForKey:CPTableViewColumnAutoresizingStyleKey]; _tableColumns = [aCoder decodeObjectForKey:CPTableViewTableColumnsKey] || []; [_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self]; @@ -3560,6 +3563,9 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", [aCoder encodeFloat:_rowHeight forKey:CPTableViewRowHeightKey]; [aCoder encodeSize:_intercellSpacing forKey:CPTableViewIntercellSpacingKey]; + [aCoder encodeInt:_selectionHighlightStyle forKey:CPTableViewSelectionHighlightStyleKey]; + [aCoder encodeInt:_columnAutoResizingStyle forKey:CPTableViewColumnAutoresizingStyleKey]; + [aCoder encodeBool:_allowsMultipleSelection forKey:CPTableViewMultipleSelectionKey]; [aCoder encodeBool:_allowsEmptySelection forKey:CPTableViewEmptySelectionKey]; [aCoder encodeBool:_allowsColumnReordering forKey:CPTableViewColumnReorderingKey]; diff --git a/Tools/nib2cib/NSTableView.j b/Tools/nib2cib/NSTableView.j index 49540479e..1b734fa5d 100644 --- a/Tools/nib2cib/NSTableView.j +++ b/Tools/nib2cib/NSTableView.j @@ -61,6 +61,9 @@ _usesAlternatingRowBackgroundColors = (flags & 0x00800000) ? YES : NO; _alternatingRowBackgroundColors =[[CPColor whiteColor], [CPColor colorWithHexString:@"e4e7ff"]]; + _selectionHighlightStyle = [aCoder decodeIntForKey:@"NSTableViewSelectionHighlightStyle"] || CPTableViewSelectionHighlightStyleRegular; + _columnAutoResizingStyle = [aCoder decodeIntForKey:@"NSColumnAutoresizingStyle"]; + _allowsMultipleSelection = (flags & 0x08000000) ? YES : NO; _allowsEmptySelection = (flags & 0x10000000) ? YES : NO; _allowsColumnSelection = (flags & 0x04000000) ? YES : NO; From ba33bb56d0a776d689478ae07ad76a2a8cc5c742 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Thu, 12 Aug 2010 00:08:43 -0400 Subject: [PATCH 22/24] Moved the visual table test for borders into the TableTest folder. --- .../BorderTableTest}/AppController.j | 0 .../BorderTableTest}/Info.plist | 0 .../BorderTableTest}/Resources/MainMenu.cib | 0 .../BorderTableTest}/Resources/MainMenu.xib | 0 .../BorderTableTest}/Resources/spinner.gif | Bin .../BorderTableTest}/index-debug.html | 0 .../BorderTableTest}/index.html | 0 .../BorderTableTest}/main.j | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/AppController.j (100%) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/Info.plist (100%) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/Resources/MainMenu.cib (100%) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/Resources/MainMenu.xib (100%) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/Resources/spinner.gif (100%) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/index-debug.html (100%) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/index.html (100%) rename Tests/Manual/{NewTableTest => TableTest/BorderTableTest}/main.j (100%) diff --git a/Tests/Manual/NewTableTest/AppController.j b/Tests/Manual/TableTest/BorderTableTest/AppController.j similarity index 100% rename from Tests/Manual/NewTableTest/AppController.j rename to Tests/Manual/TableTest/BorderTableTest/AppController.j diff --git a/Tests/Manual/NewTableTest/Info.plist b/Tests/Manual/TableTest/BorderTableTest/Info.plist similarity index 100% rename from Tests/Manual/NewTableTest/Info.plist rename to Tests/Manual/TableTest/BorderTableTest/Info.plist diff --git a/Tests/Manual/NewTableTest/Resources/MainMenu.cib b/Tests/Manual/TableTest/BorderTableTest/Resources/MainMenu.cib similarity index 100% rename from Tests/Manual/NewTableTest/Resources/MainMenu.cib rename to Tests/Manual/TableTest/BorderTableTest/Resources/MainMenu.cib diff --git a/Tests/Manual/NewTableTest/Resources/MainMenu.xib b/Tests/Manual/TableTest/BorderTableTest/Resources/MainMenu.xib similarity index 100% rename from Tests/Manual/NewTableTest/Resources/MainMenu.xib rename to Tests/Manual/TableTest/BorderTableTest/Resources/MainMenu.xib diff --git a/Tests/Manual/NewTableTest/Resources/spinner.gif b/Tests/Manual/TableTest/BorderTableTest/Resources/spinner.gif similarity index 100% rename from Tests/Manual/NewTableTest/Resources/spinner.gif rename to Tests/Manual/TableTest/BorderTableTest/Resources/spinner.gif diff --git a/Tests/Manual/NewTableTest/index-debug.html b/Tests/Manual/TableTest/BorderTableTest/index-debug.html similarity index 100% rename from Tests/Manual/NewTableTest/index-debug.html rename to Tests/Manual/TableTest/BorderTableTest/index-debug.html diff --git a/Tests/Manual/NewTableTest/index.html b/Tests/Manual/TableTest/BorderTableTest/index.html similarity index 100% rename from Tests/Manual/NewTableTest/index.html rename to Tests/Manual/TableTest/BorderTableTest/index.html diff --git a/Tests/Manual/NewTableTest/main.j b/Tests/Manual/TableTest/BorderTableTest/main.j similarity index 100% rename from Tests/Manual/NewTableTest/main.j rename to Tests/Manual/TableTest/BorderTableTest/main.j From 1e6f6879fff9b50e4908dee9b6f76a59b40aad4e Mon Sep 17 00:00:00 2001 From: Randall Luecke Date: Wed, 11 Aug 2010 23:17:38 -0500 Subject: [PATCH 23/24] Run CPArrayPerformanceTest with jake test. --- .../{CPArrayPerformance.j => CPArrayPerformanceTest.j} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename Tests/Foundation/{CPArrayPerformance.j => CPArrayPerformanceTest.j} (96%) diff --git a/Tests/Foundation/CPArrayPerformance.j b/Tests/Foundation/CPArrayPerformanceTest.j similarity index 96% rename from Tests/Foundation/CPArrayPerformance.j rename to Tests/Foundation/CPArrayPerformanceTest.j index a41c16dce..f350e7ff5 100644 --- a/Tests/Foundation/CPArrayPerformance.j +++ b/Tests/Foundation/CPArrayPerformanceTest.j @@ -3,7 +3,7 @@ @import @import -@implementation CPArrayPerformance : OJTestCase +@implementation CPArrayPerformanceTest : OJTestCase - (void)testSortUsingDescriptorsSpeed { From 44fb4a9b83742b1625d40be7bd007081ee1c0b83 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Wed, 11 Aug 2010 22:39:57 -0400 Subject: [PATCH 24/24] -setIntercellSpacing should update the header as well as the table, per Cocoa (and common sense) --- AppKit/CPTableView.j | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 3aace2d55..1b35d6c75 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -539,6 +539,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; [self _recalculateTableColumnRanges]; [self setNeedsLayout]; + [_headerView setNeedsDisplay:YES]; + [_headerView setNeedsLayout]; } - (void)setThemeState:(int)astae