diff --git a/AppKit/CPTableColumn.j b/AppKit/CPTableColumn.j index 6d37c1de9..ed3372bfc 100644 --- a/AppKit/CPTableColumn.j +++ b/AppKit/CPTableColumn.j @@ -1,31 +1,11 @@ -/* - * CPTableColumn.j - * AppKit - * - * Created by Francisco Tolmasky. - * Copyright 2008, 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 +@import +@import +@import +@import +@import "CPTableHeaderView.j" -/* -@ignore -*/ /* @global @@ -43,389 +23,290 @@ CPTableColumnAutoresizingMask = 1; */ CPTableColumnUserResizingMask = 2; -#define PurgableInfoMake(aView, aRow) { view:(aView), row:(aRow) } -#define PurgableInfoView(anInfo) ((anInfo).view) -#define PurgableInfoRow(anInfo) ((anInfo).row) - -/*! - @ingroup appkit - @class CPTableColumn - - An CPTableColumn object mainly keeps information about the width of the column, its minimum and maximum width; whether the column can be edited or resized; and the cells used to draw the column header and the data in the column. You can change all these attributes of the column by calling the appropriate methods. Please note that the table column does not hold nor has access to the data to be displayed in the column; this data is maintained in the table view's data source.

- -

Each CPTableColumn object is identified by a CPString, called the column identifier. The reason is that, after a column has been added to a table view, the user might move the columns around, so there is a need to identify the columns regardless of its position in the table. - - @ignore -*/ @implementation CPTableColumn : CPObject { - CPString _identifier; - CPView _headerView; - - CPTableView _tableView; - - float _width; - float _minWidth; - float _maxWidth; - - unsigned _resizingMask; + CPTableView _tableView; + CPView _headerView; + CPView _dataView; + Object _dataViewData; - CPView _dataView; // default data view for this column + float _width; + float _minWidth; + float _maxWidth; - Object _dataViewData; // cache of data view archives (key=data view UID, value=data view archive) - Object _dataViewForView; // mapping from view instances back to their data view prototype (key=view instance UID, value=data view) - Object _purgableInfosForDataView; // (key=data view UID, value=) + id _identifier; + BOOL _isEditable; + CPSortDescriptor _sortDescriptorPrototype; + BOOL _isHidden; + CPString _headerToolTip; } -/*! - Initializes the table column with the specified identifier. - @param anIdentifier the identifier - @return the initialized table column -*/ -- (id)initWithIdentifier:(CPString)anIdentifier +- (id)initWithIdentifier:(id)anIdentifier { self = [super init]; - + if (self) { - [self _init]; - - _identifier = anIdentifier; - - _width = 40.0; - _minWidth = 8.0; - _maxWidth = 1000.0; - - var dataView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()]; - [dataView setValue:[CPColor whiteColor] forThemeAttribute:"text-color" inState:CPThemeStateHighlighted]; - - [self setDataView:dataView]; - - _headerView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()]; - [_headerView setBackgroundColor:[CPColor greenColor]]; + _dataViewData = { }; + + _width = 100.0; + _minWidth = 10.0; + _maxWidth = 1000000.0; + + [self setIdentifier:anIdentifier]; + [self setHeaderView:[CPTextField new]]; + [self setDataView:[CPTextField new]]; } - + return self; } -- (void)_init -{ - _dataViewData = {}; - _dataViewForView = {}; - _purgableInfosForDataView = {}; -} - -/*! - Sets the table column's identifier - @param anIdentifier the new identifier -*/ -- (void)setIdentifier:(CPString)anIdentifier -{ - _identifier = anIdentifier; -} - -/*! - Returns the table column's identifier -*/ -- (CPString)identifier -{ - return _identifier; -} - -// Setting the CPTableView -/*! - Sets the table's view. This is called automatically by Cappuccino. - @param aTableView the new table view -*/ - (void)setTableView:(CPTableView)aTableView { _tableView = aTableView; } -/*! - Returns the column's table view. -*/ - (CPTableView)tableView { return _tableView; } -// Controlling size -/*! - Sets the column's width. - @param aWidth the new column width -*/ - (void)setWidth:(float)aWidth { - _width = aWidth; + aWidth = +aWidth; + + if (_width === aWidth) + return; + + var newWidth = MIN(MAX(aWidth, [self minWidth]), [self maxWidth]); + + if (_width === newWidth) + return; + + var oldWidth = _width; + + _width = newWidth; + + var tableView = [self tableView]; + + if (tableView) + [[CPNotificationCenter defaultCenter] + postNotificationName:CPTableViewColumnDidResizeNotification + object:tableView + userInfo:[CPDictionary dictionaryWithObjects:[self, oldWidth] forKeys:[@"CPTableColumn", "CPOldWidth"]]]; } -/*! - Returns the column's width -*/ - (float)width { return _width; } -/*! - Sets column's minimum width. - @param aWidth the new minimum column width -*/ -- (void)setMinWidth:(float)aWidth +- (void)setMinWidth:(float)aMinWidth { - if (_width < (_minWidth = aWidth)) - [self setWidth:_minWidth]; + aMinWidth = +aMinWidth; + + if (_minWidth === aMinWidth) + return; + + _minWidth = aMinWidth; + + var width = [self width], + newWidth = MAX(width, [self minWidth]); + + if (width !== newWidth) + [self setWidth:newWidth]; } -/*! - The column's minimum width -*/ - (float)minWidth { return _minWidth; } -/*! - Sets the column's maximum width. - @param aWidth the new maximum width -*/ -- (void)setMaxWidth:(float)aWidth +- (void)setMaxWidth:(float)aMaxWidth { - if (_width > (_maxmimumWidth = aWidth)) - [self setWidth:_maxWidth]; + aMaxWidth = +aMaxWidth; + + if (_maxWidth === aMaxWidth) + return; + + _maxWidth = aMaxWidth; + + var width = [self width], + newWidth = MAX(width, [self maxWidth]); + + if (width !== newWidth) + [self setWidth:newWidth]; } -/*! - Sets the resizing mask. The mask is one of: -

-CPTableColumnNoResizing;
-CPTableColumnAutoresizingMask;
-CPTableColumnUserResizingMask;
-
- @param aMask the new resizing mask -*/ -- (void)setResizingMask:(unsigned)aMask +- (float)maxWidth { - _resizingMask = aMask; + return _maxWidth; } -/*! - Returns the column's resizing mask. One of: -
-CPTableColumnNoResizing;
-CPTableColumnAutoresizingMask;
-CPTableColumnUserResizingMask;
-
-*/ -- (unsigned)resizingMask +- (void)setResizingMask:(unsigned)aResizingMask +{ + _resizingMask = aResizingMask; +} + +- (float)resizingMask { return _resizingMask; } -/*! - Resizes the column according to the min, max and set width. -*/ - (void)sizeToFit { - var width = CPRectGetWidth([_headerView frame]); - - if (width < _minWidth) + var width = _CGRectGetWidth([_headerView frame]); + + if (width < [self minWidth]) [self setMinWidth:width]; - else if (width > _maxWidth) + else if (width > [self maxWidth]) [self setMaxWidth:width] - if (_width != width) + if (_width !== width) [self setWidth:width]; } -/*! - Sets whether the column in this data is editable. - @param aFlag YES means the column data is editable -*/ -- (void)setEditable:(BOOL)aFlag +//Setting Component Cells +- (void)setHeaderView:(CPView)aView { - _isEditable = aFlag; + if (!aView) + [CPException raise:CPInvalidArgumentException reason:@"Attempt to set nil header view on " + [self description]]; + + _headerView = aView; } -/*! - Returns YES if the column data is editable. +- (CPView)headerView +{ + return _headerView; +} + +- (void)setDataView:(CPView)aView +{ + if (_dataView === aView) + return; + + if (_dataView) + _dataViewData[[_dataView UID]] = nil; + + _dataView = aView; + _dataViewData[[aView UID]] = [CPKeyedArchiver archivedDataWithRootObject:aView]; +} + +- (CPView)dataView +{ + return _dataView; +} + +/* + Returns the CPView object used by the CPTableView to draw values for the receiver. + + By default, this method just calls dataView. Subclassers can override if they need to + potentially use different cells for different rows. Subclasses should expect this method + to be invoked with row equal to -1 in cases where no actual row is involved but the table + view needs to get some generic cell info. +*/ +- (id)dataViewForRow:(int)aRowIndex +{ + return [self dataView]; +} + +- (id)_newDataViewForRow:(int)aRowIndex +{ + var dataView = [self dataViewForRow:aRowIndex], + dataViewUID = [dataView UID]; + +var x = [self tableView]._cachedDataViews[dataViewUID]; +if (x && x.length) +return x.pop(); + + // if we haven't cached an archive of the data view, do it now + if (!_dataViewData[dataViewUID]) + _dataViewData[dataViewUID] = [CPKeyedArchiver archivedDataWithRootObject:dataView]; + + // unarchive the data view cache + var newDataView = [CPKeyedUnarchiver unarchiveObjectWithData:_dataViewData[dataViewUID]]; +newDataView.identifier = dataViewUID; + return newDataView; +} + +//Setting the Identifier + +/* + Sets the receiver identifier to anIdentifier. +*/ +- (void)setIdentifier:(id)anIdentifier +{ + _identifier = anIdentifier; +} + +/* + Returns the object used by the data source to identify the attribute corresponding to the receiver. +*/ +- (id)identifier +{ + return _identifier; +} + +//Controlling Editability + +/* + Controls whether the user can edit cells in the receiver by double-clicking them. +*/ +- (void)setEditable:(BOOL)shouldBeEditable +{ + _isEditable = shouldBeEditable; +} + +/* + Returns YES if the user can edit cells associated with the receiver by double-clicking the + column in the NSTableView, NO otherwise. */ - (BOOL)isEditable { return _isEditable; } -//Setting the column header view - -/*! - Sets the view that draws the column's header. - @param aHeaderView the view that will draws the column header -*/ - -- (void)setHeaderView:(CPView)aView +//Sorting +- (void)setSortDescriptorPrototype:(CPSortDescriptor)aSortDescriptor { - _headerView = aView; + _sortDescriptorPrototype = aSortDescriptor; } -/*! - Return the view that draws the column's header -*/ -- (CPView)headerView +- (CPSortDescriptor)sortDescriptorPrototype { - return _headerView; + return _sortDescriptorPrototype; } -/*! - Sets the data cell that draws rows in this column. -*/ -- (void)setDataCell:(CPView )aView +//Setting Column Visibility + +- (void)setHidden:(BOOL)shouldBeHidden { - [self setDataView:aView]; + _isHidden = shouldBeHidden; } +- (BOOL)isHidden +{ + return _isHidden; +} + +//Setting Tool Tips + /* - Sets the data view that draws rows in this column. + Sets the tooltip string that is displayed when the cursor pauses over the + header cell of the receiver. */ -- (void)setDataView:(CPView )aView +- (void)setHeaderToolTip:(CPString)aToolTip { - if (_dataView) - _dataViewData[[_dataView UID]] = nil; - - _dataView = aView; - _dataViewData[[aView UID]] = [CPKeyedArchiver archivedDataWithRootObject:aView]; + _headerToolTip = aToolTip; } -/*! - Returns the data cell that draws rows in this column -*/ -- (CPCell)dataCell +- (CPString)headerToolTip { - return _dataView; -} - -/* - Returns the data view that draws rows in this column -*/ -- (CPView)dataView -{ - return [self dataCell]; -} - -/*! - By default returns the value from dataCell. This can - be overridden by a subclass to return different cells for different - rows. - @param aRowIndex the index of the row to obtain the cell for -*/ -- (CPCell)dataCellForRow:(int)aRowIndex -{ - return [self dataView]; -} - -- (CPView)dataViewForRow:(int)aRowIndex -{ - return [self dataCellForRow:aRowIndex]; -} -/* -- (void)_markViewAsPurgable:(CPView)aView -{ - var viewUID = [aView UID], - dataViewUID = [_dataViewForView[viewUID] UID]; - - if (!_purgableInfosForDataView[dataViewUID]) - _purgableInfosForDataView[dataViewUID] = [CPDictionary dictionary]; - - [_purgableInfosForDataView[dataViewUID] setObject:aView forKey:viewUID]; -} -*/ -- (void)_markView:(CPView)aView inRow:(unsigned)aRow asPurgable:(BOOL)isPurgable -{ - var viewUID = [aView UID], - dataViewUID = [_dataViewForView[viewUID] UID]; - - if (!_purgableInfosForDataView[dataViewUID]) - { - if (!isPurgable) - return; - - _purgableInfosForDataView[dataViewUID] = {}; - } - - if (!isPurgable) { - if (_purgableInfosForDataView[dataViewUID][viewUID]) - CPLog.warn("removing unpurgable " + _purgableInfosForDataView[dataViewUID][viewUID]); - delete _purgableInfosForDataView[dataViewUID][viewUID]; - } - else - _purgableInfosForDataView[dataViewUID][viewUID] = PurgableInfoMake(aView, aRow); -} - -- (CPView)_newDataViewForRow:(int)aRowIndex avoidingRows:(CPRange)rows -{ - var view = [self dataViewForRow:aRowIndex], - viewUID = [view UID], - purgableInfos = _purgableInfosForDataView[viewUID]; - - if (purgableInfos) - { - for (var key in purgableInfos) - { - var info = purgableInfos[key]; - //if (!CPLocationInRange(PurgableInfoRow(info), rows)) - //{ - //CPLog.debug("yes, a purged view is usable, its called: " + PurgableInfoView(info)); - delete purgableInfos[key]; - return PurgableInfoView(info); - //} - //else - // CPLog.warn("avoiding"); - } - } - - // if we haven't cached an archive of the data view, do it now - if (!_dataViewData[viewUID]) - _dataViewData[viewUID] = [CPKeyedArchiver archivedDataWithRootObject:view]; - - // unarchive the data view cache - var newView = [CPKeyedUnarchiver unarchiveObjectWithData:_dataViewData[viewUID]]; - - // map the new view's UID to it's data view prototype - _dataViewForView[[newView UID]] = view; - - CPLog.warn("creating cell: %s", newView); - - return newView; -} - -- (void)_purge -{ - for (var viewUID in _purgableInfosForDataView) - { - var purgableInfos = _purgableInfosForDataView[viewUID]; - - for (var key in purgableInfos) - { - var view = PurgableInfoView(purgableInfos[key]); - - if (!view) - CPLog.info("key="+key+" view=" + view + " purgableInfos[key]="+purgableInfos[key]) - else if (view._superview) { - //CPLog.error("PURGING: (removing)" + view); - //[view removeFromSuperview]; - [view setHidden:YES]; - } - //else - // CPLog.warn("PURGING: (already removed)" + view); - - //delete purgableInfos[key]; - } - } + return _headerToolTip; } @end - var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", CPTableColumnHeaderViewKey = @"CPTableColumnHeaderViewKey", CPTableColumnDataViewKey = @"CPTableColumnDataViewKey", @@ -438,18 +319,25 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", - (id)initWithCoder:(CPCoder)aCoder { - [self _init]; - - _identifier = [aCoder decodeObjectForKey:CPTableColumnIdentifierKey]; + self = [super init]; - [self setHeaderView:[aCoder decodeObjectForKey:CPTableColumnHeaderViewKey]]; - [self setDataView:[aCoder decodeObjectForKey:CPTableColumnDataViewKey]]; - - _width = [aCoder decodeFloatForKey:CPTableColumnWidthKey]; - _minWidth = [aCoder decodeFloatForKey:CPTableColumnMinWidthKey]; - _maxWidth = [aCoder decodeFloatForKey:CPTableColumnMaxWidthKey]; - - _resizingMask = [aCoder decodeBoolForKey:CPTableColumnResizingMaskKey]; + if (self) + { + _dataViewData = { }; + + [self setIdentifier:[aCoder decodeObjectForKey:CPTableColumnIdentifierKey]]; + // [self setHeaderView:[aCoder decodeObjectForKey:CPTableColumnHeaderViewKey]]; + // [self setDataView:[aCoder decodeObjectForKey:CPTableColumnDataViewKey]]; + + [self setHeaderView:[CPTextField new]]; + [self setDataView:[CPTextField new]]; + + _width = [aCoder decodeFloatForKey:CPTableColumnWidthKey]; + _minWidth = [aCoder decodeFloatForKey:CPTableColumnMinWidthKey]; + _maxWidth = [aCoder decodeFloatForKey:CPTableColumnMaxWidthKey]; + + // _resizingMask = [aCoder decodeBoolForKey:CPTableColumnResizingMaskKey]; + } return self; } @@ -457,15 +345,49 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", - (void)encodeWithCoder:(CPCoder)aCoder { [aCoder encodeObject:_identifier forKey:CPTableColumnIdentifierKey]; - - [aCoder encodeObject:_headerView forKey:CPTableColumnHeaderViewKey]; - [aCoder encodeObject:_dataView forKey:CPTableColumnDataViewKey]; - + +// [aCoder encodeObject:_headerView forKey:CPTableColumnHeaderViewKey]; +// [aCoder encodeObject:_dataView forKey:CPTableColumnDataViewKey]; + [aCoder encodeObject:_width forKey:CPTableColumnWidthKey]; [aCoder encodeObject:_minWidth forKey:CPTableColumnMinWidthKey]; [aCoder encodeObject:_maxWidth forKey:CPTableColumnMaxWidthKey]; - - [aCoder encodeObject:_resizingMask forKey:CPTableColumnResizingMaskKey]; + +// [aCoder encodeObject:_resizingMask forKey:CPTableColumnResizingMaskKey]; +} + +@end + +@implementation CPTableColumn (NSInCompatibility) + +- (void)setHeaderCell:(CPView)aView +{ + [CPException raise:CPUnsupportedMethodException + reason:@"setHeaderCell: is not supported. -setHeaderCell:aView instead."]; +} + +- (CPView)headerCell +{ + [CPException raise:CPUnsupportedMethodException + reason:@"headCell is not supported. -headerView instead."]; +} + +- (void)setDataCell:(CPView)aView +{ + [CPException raise:CPUnsupportedMethodException + reason:@"setDataCell: is not supported. Use -setHeaderCell:aView instead."]; +} + +- (CPView)dataCell +{ + [CPException raise:CPUnsupportedMethodException + reason:@"dataCell is not supported. Use -dataCell instead."]; +} + +- (id)dataCellForRow:(int)row +{ + [CPException raise:CPUnsupportedMethodException + reason:@"dataCellForRow: is not supported. Use -dataViewForRow:row instead."]; } @end diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 02b2e5cd9..5d87543ee 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -1,1238 +1,1405 @@ -/* - * CPTableView.j - * AppKit - * - * Created by Francisco Tolmasky. - * Copyright 2008, 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 @import "CPControl.j" @import "CPTableColumn.j" +@import "_CPCornerView.j" +@import "CPScroller.j" -@import "CPColor.j" -@import "CPTextField.j" +#include "CoreGraphics/CGGeometry.h" -#define ROW_HEIGHT(aRow) (_hasVariableHeightRows ? _rowHeights[aRow] : _rowHeight) -#define ROW_MIN_Y(aRow) (_hasVariableHeightRows ? _rowMinYs[aRow] : (aRow * (_rowHeight + _intercellSpacing.height))) +var CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_ = 1 << 2, -CPTableViewColumnDidMoveNotification = "CPTableViewColumnDidMoveNotification"; -CPTableViewColumnDidResizeNotification = "CPTableViewColumnDidResizeNotification"; -CPTableViewSelectionDidChangeNotification = "CPTableViewSelectionDidChangeNotification"; -CPTableViewSelectionIsChangingNotification = "CPTableViewSelectionIsChangingNotification"; + CPTableViewDataSource_tableView_acceptDrop_row_dropOperation_ = 1 << 3, + CPTableViewDataSource_tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_ = 1 << 4, + CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_ = 1 << 5, + CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_ = 1 << 6, -var _CPTableViewWillDisplayCellSelector = 1 << 0, - _CPTableViewShouldSelectRowSelector = 1 << 1, - _CPTableViewShouldSelectTableColumnSelector = 1 << 2, - _CPTableViewSelectionShouldChangeSelector = 1 << 3, - _CPTableViewShouldEditTableColumnSelector = 1 << 4, - _CPTableViewSelectionIndexesForProposedSelectionSelector = 1 << 5, - _CPTableViewHeightOfRowSelector = 1 << 6; - + CPTableViewDataSource_tableView_sortDescriptorsDidChange_ = 1 << 7; + +var CPTableViewDelegate_selectionShouldChangeInTableView_ = 1 << 0, + CPTableViewDelegate_tableView_dataViewForTableColumn_row_ = 1 << 1, + CPTableViewDelegate_tableView_didClickTableColumn_ = 1 << 2, + CPTableViewDelegate_tableView_didDragTableColumn_ = 1 << 3, + CPTableViewDelegate_tableView_heightOfRow_ = 1 << 4, + CPTableViewDelegate_tableView_isGroupRow_ = 1 << 5, + CPTableViewDelegate_tableView_mouseDownInHeaderOfTableColumn_ = 1 << 6, + CPTableViewDelegate_tableView_nextTypeSelectMatchFromRow_toRow_forString_ = 1 << 7, + CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_ = 1 << 8, + CPTableViewDelegate_tableView_shouldEditTableColumn_row_ = 1 << 9, + CPTableViewDelegate_tableView_shouldSelectRow_ = 1 << 10, + CPTableViewDelegate_tableView_shouldSelectTableColumn_ = 1 << 11, + CPTableViewDelegate_tableView_shouldShowViewExpansionForTableColumn_row_ = 1 << 12, + CPTableViewDelegate_tableView_shouldTrackView_forTableColumn_row_ = 1 << 13, + CPTableViewDelegate_tableView_shouldTypeSelectForEvent_withCurrentSearchString_ = 1 << 14, + CPTableViewDelegate_tableView_toolTipForView_rect_tableColumn_row_mouseLocation_ = 1 << 15, + CPTableViewDelegate_tableView_typeSelectStringForTableColumn_row_ = 1 << 16, + CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_ = 1 << 17, + CPTableViewDelegate_tableViewSelectionDidChange_ = 1 << 18, + CPTableViewDelegate_tableViewSelectionIsChanging_ = 1 << 19; + +// TODO: add docs /* - @ingroup appkit - - This class is not yet stable. - - CPTableView is located within the AppKit framework and is used to display tables. - It uses a delegate model for getting its data i.e. you give it an object that provides - it with the data it should display. - - @ignore +CPTableViewSelectionHighlightStyleRegular = 0; +CPTableViewSelectionHighlightStyleSourceList = 1; */ -@implementation CPTableView : CPControl + +#define NUMBER_OF_COLUMNS() (_tableColumns.length) + +@implementation _CPTableDrawView : CPView { - // Archived: - - id _dataSource; - id _delegate; - - //CPTableHeaderView _headerView; - //CPView _cornerView; - - CPArray _tableColumns; - - CPIndexSet _selectedRowIndexes; - //CPArray _selectedColumns; - - float _rowHeight; - CGSize _intercellSpacing; - - BOOL _allowsMultipleSelection; - BOOL _allowsEmptySelection; - //BOOL _allowsColumnReordering; - //BOOL _allowsColumnResizing; - //BOOL _allowsColumnSelection; - //BOOL _autoresizesAllColumnsToFit; - - //CPColor _gridColor; - //BOOL _drawsGrid; - - SEL _doubleAction; - - // Not archived: - - int _delegateSelectorsCache; - - //CPScrollView _scrollView; - - unsigned _numberOfRows; - //unsigned _numberOfColumns; - - BOOL _hasVariableHeightRows; - - // Heights - float _columnHeight; // calculated - - CPArray _rowHeights; - CPArray _rowMinYs; - - CPArray _tableCells; - CPArray _tableColumnViews; - - // Caching - Object _dataViewCache; - CPArray _objectValueCache; - - CPRange _visibleRows; - CPRange _visibleColumns; - - CPRange _populatedRows; - CPRange _populatedColumns; - - // Selection - CPIndexSet _previousSelectedRowIndexes; - int _selectionStartRow; - int _selectionModifier; - - CPIndexSet _currentlySelected; - CPArray _selectionViews; - CPArray _selectionViewsPool; - - CPDate _scrollTimer; + CPTableView _tableView; } -+ (void)initialize +- (id)initWithTableView:(CPTableView)aTableView { - + self = [super init]; + + if (self) + _tableView = aTableView; + + return self; +} + +- (void)drawRect:(CGRect)aRect +{ + var frame = [self frame], + context = [[CPGraphicsContext currentContext] graphicsPort]; + + CGContextTranslateCTM(context, -_CGRectGetMinX(frame), -_CGRectGetMinY(frame)); + + [_tableView _drawRect:aRect]; +} + +@end + +@implementation CPTableView : CPControl +{ + id _dataSource; + CPInteger _implementedDataSourceMethods; + + id _delegate; + CPInteger _implementedDelegateMethods; + + CPArray _tableColumns; + CPArray _tableColumnRanges; + CPInteger _dirtyTableColumnRangeIndex; + CPInteger _numberOfHiddenColumns; + + Object _objectValues; + CPRange _exposedRows; + CPIndexSet _exposedColumns; + + Object _dataViewsForTableColumns; + Object _cachedDataViews; + + //Configuring Behavior + BOOL _allowsColumnReordering; + BOOL _allowsColumnResizing; + BOOL _allowsMultipleSelection; + BOOL _allowsEmptySelection; + + //Setting Display Attributes + CGSize _intercellSpacing; + float _rowHeight; + BOOL _usesAlternatingRowBackgroundColors; + unsigned _selectionHighlightMask; + unsigned _currentHighlightedTableColumn; + + unsigned _numberOfRows; + + + CPTableHeaderView _headerView; + _CPCornerView _cornerView; + + CPIndexSet _selectedColumnIndexes; + CPIndexSet _selectedRowIndexes; + CPInteger _selectionStartRow; + + _CPTableDrawView _tableDrawView; } - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; - + if (self) { - [self _init]; + //Configuring Behavior + _allowsColumnReordering = YES; + _allowsColumnResizing = YES; + _allowsMultipleSelection = NO; + _allowsEmptySelection = YES; + _allowsColumnSelection = NO; + + _tableViewFlags = 0; + + //Setting Display Attributes +// _selectionHighlightMask = CPTableViewSelectionHighlightStyleRegular; + + _tableColumns = []; + _tableColumnRanges = []; + _dirtyTableColumnRangeIndex = CPNotFound; + _numberOfHiddenColumns = 0; + + _objectValues = { }; + _dataViewsForTableColumns = { }; + _dataViews= []; + _numberOfRows = 0; + _exposedRows = [CPIndexSet indexSet]; + _exposedColumns = [CPIndexSet indexSet]; + _cachedDataViews = { }; + _intercellSpacing = _CGSizeMake(0.0, 0.0); + _rowHeight = 24.0; + + _headerView = [[CPTableHeaderView alloc] initWithFrame:CGRectMake(0, 0, [self bounds].size.width, _rowHeight)]; + + [_headerView setTableView:self]; + + _cornerView = [[_CPCornerView alloc] initWithFrame:CGRectMake(0, 0, [CPScroller scrollerWidth], CGRectGetHeight([_headerView frame]))]; + + _selectedColumnIndexes = [CPIndexSet indexSet]; + _selectedRowIndexes = [CPIndexSet indexSet]; + + _tableDrawView = [[_CPTableDrawView alloc] initWithTableView:self]; + [_tableDrawView setBackgroundColor:[CPColor yellowColor]]; + [self addSubview:_tableDrawView]; } - + return self; } -- (void)_init -{ - _tableColumns = []; - //_numberOfColumns = 0; - - _selectedRowIndexes = [CPIndexSet indexSet]; - - _rowHeight = 17.0; - _intercellSpacing = CPSizeMake(3.0, 2.0); - - _allowsMultipleSelection = YES; - _allowsEmptySelection = YES; - - - _tableCells = []; - _tableColumnViews = []; - - _dataViewCache = {}; - _objectValueCache = []; - - _visibleRows = CPMakeRange(0, 0); - _visibleColumns = CPMakeRange(0, 0); - - _rowHeights = []; - _rowMinYs = []; -} - -/* - Returns the table's column height -*/ -- (float)_columnHeight -{ - return _columnHeight;//_numberOfRows * (_rowHeight + _intercellSpacing.height); -} - -- (void)newCellForRow:(unsigned)aRowIndex column:(unsigned)aColumnIndex avoidingRows:(CPRange)rows -{ - var dataView = [_tableColumns[aColumnIndex] _newDataViewForRow:aRowIndex avoidingRows:rows]; - - [dataView setFrame:CGRectMake(0.0, ROW_MIN_Y(aRowIndex), [_tableColumns[aColumnIndex] width], ROW_HEIGHT(aRowIndex))]; - - if ([dataView respondsToSelector:@selector(highlight:)]) - [dataView highlight:[_selectedRowIndexes containsIndex:aRowIndex]]; - - if (!_objectValueCache[aColumnIndex]) - _objectValueCache[aColumnIndex] = []; - - // We may be storing 0 after all! - if (_objectValueCache[aColumnIndex][aRowIndex] === undefined) - _objectValueCache[aColumnIndex][aRowIndex] = [_dataSource tableView:self objectValueForTableColumn:_tableColumns[aColumnIndex] row:aRowIndex]; - - [dataView setObjectValue:_objectValueCache[aColumnIndex][aRowIndex]]; - - return dataView; -} - -- (void)clearCells -{ - var columnEnd = CPMaxRange(_visibleColumns), - rowEnd = CPMaxRange(_visibleRows); - - for (var column = _visibleColumns.location; column < columnEnd; column++) - { - var tableColumn = _tableColumns[column], - tableColumnCells = _tableCells[column]; - - for (var row = _visibleRows.location; row < rowEnd; row++) - { - var cell = tableColumnCells[row]; - if (cell) - { - tableColumnCells[row] = nil; - [tableColumn _markView:cell inRow:row asPurgable:YES]; - } - else - { - CPLog.warn("Missing cell? " + row + "," + column); - } - } - } - - _visibleColumns = CPMakeRange(0,0); - _visibleRows = CPMakeRange(0,0); -} - -- (void)loadTableCellsInRect:(CGRect)aRect -{ - if (!_dataSource) - return; - - // Determine new visible rows and columns. - - var rowStart = MAX(0, [self _rowAtY:CGRectGetMinY(aRect)] - 1), - rowEnd = MIN(_numberOfRows, [self _rowAtY:CGRectGetMaxY(aRect)] + 1), - - visibleRows = CPMakeRange(rowStart, rowEnd - rowStart), - - columnStart = MAX(0, [self _columnAtX:CGRectGetMinX(aRect)]), - columnEnd = MIN(_tableColumns.length, [self _columnAtX:CGRectGetMaxX(aRect)] + 1), - - visibleColumns = CPMakeRange(columnStart, columnEnd - columnStart); - - if (CPEqualRanges(_visibleRows, visibleRows) && CPEqualRanges(_visibleColumns, visibleColumns)) - return; - - var unionVisibleRows = CPUnionRange(_visibleRows, visibleRows), - unionVisibleColumns = CPUnionRange(_visibleColumns, visibleColumns); - - - // Determine whether to use 2 sweeps or one. If we have lots of overlap of cells, use just one. - if (unionVisibleRows.length * unionVisibleColumns.length <= - (_visibleRows.length * _visibleColumns.length) + (visibleRows.length * visibleColumns.length)) - { - //CPLog.info("single sweep"); - - var cEnd = CPMaxRange(unionVisibleColumns), - rEnd = CPMaxRange(unionVisibleRows), - cell; - - for (var column = unionVisibleColumns.location; column < cEnd; ++column) - { - var tableColumn = _tableColumns[column], - tableColumnCells = _tableCells[column], - columnIsVisible = CPLocationInRange(column, visibleColumns), - newCells = []; - - for (var row = unionVisibleRows.location; row < rEnd; ++row) - { - if (cell = tableColumnCells[row]) - { - if (!columnIsVisible || !CPLocationInRange(row, visibleRows)) - { - tableColumnCells[row] = nil; - [tableColumn _markView:cell inRow:row asPurgable:YES]; - } - } - else - { - newCells.push(row); - } - } - - while (newCells.length > 0) - { - var row = newCells.pop(); - - tableColumnCells[row] = [self newCellForRow:row column:column avoidingRows:visibleRows]; - - if (!tableColumnCells[row]._superview) - [_tableColumnViews[column] addSubview:tableColumnCells[row]]; - else if (tableColumnCells[row]._isHidden) - [tableColumnCells[row] setHidden:NO]; - } - - [tableColumn _purge]; - } - } - else { - //CPLog.info("double sweep"); - - // first sweep: remove old cells - - var cEnd = CPMaxRange(_visibleColumns), - rEnd = CPMaxRange(_visibleRows), - cell; - - for (var column = _visibleColumns.location; column < cEnd; ++column) - { - var tableColumn = _tableColumns[column], - tableColumnCells = _tableCells[column], - columnIsVisible = CPLocationInRange(column, visibleColumns); - - for (var row = _visibleRows.location; row < rEnd; ++row) - { - if (cell = tableColumnCells[row]) - { - if (!columnIsVisible || !CPLocationInRange(row, visibleRows)) - { - tableColumnCells[row] = nil; - [tableColumn _markView:cell inRow:row asPurgable:YES]; - } - } - } - } - - // second sweep: add new cells - - var cEnd = CPMaxRange(visibleColumns), - rEnd = CPMaxRange(visibleRows); - - for (var column = visibleColumns.location; column < cEnd; ++column) - { - var tableColumn = _tableColumns[column], - tableColumnCells = _tableCells[column]; - - for (var row = visibleRows.location; row < rEnd; ++row) - { - tableColumnCells[row] = [self newCellForRow:row column:column avoidingRows:visibleRows]; - - if (!tableColumnCells[row]._superview) - [_tableColumnViews[column] addSubview:tableColumnCells[row]]; - else if (tableColumnCells[row]._isHidden) - [tableColumnCells[row] setHidden:NO]; - } - - [tableColumn _purge]; - } - } - - - _visibleRows = visibleRows; - _visibleColumns = visibleColumns; - -} - -// Setting display attributes -/* - Sets the width and height between cell. The default is (3.0, 2.0) (width, height). - @param the width and height spacing -*/ -- (void)setIntercellSpacing:(CGSize)aSize -{ - if (_intercellSpacing.width != aSize.width) - { - var i = 1, - delta = aSize.width - _intercellSpacing.width; - total = delta; - - for (; i < _tableColumns.length; ++i, total += delta) - { - var origin = [_tableColumnViews[i] frame].origin; - [_tableColumnViews[i] setFrameOrigin:CGPointMake(origin.x + total, origin.y)]; - } - } - - if (_intercellSpacing.height != aSize.height) - { - var i = 0; - - for (; i < _tableColumns.length; ++i, total += delta) - { - [_tableColumnViews[i] setFrameSize:CGSizeMake([_tableColumnViews[i] width], _numberOfRows * (_rowHeight + _intercellSpacing.height))]; - - var j = 1, - y = _rowHeight + _intercellSpacing.height; - - for (; j < _numberOfRows; ++i, y += _rowHeight + _intercellSpacing.height) - { - if (!_tableCells[i][j]) - continue; - - [_tableCells[i][j] setFrameOrigin:CPPointMake(0.0, y)]; - } - } - - // FIXME: variable height rows - } - - _intercellSpacing = CPSizeCreateCopy(aSize); -} - -/* - Returns the width and height of the space between - cells. -*/ -- (CGSize)intercellSpacing -{ - return _intercellSpacing; -} - -/* - Sets the height of table rows - @param aRowHeight the new height of the table rows -*/ -- (void)setRowHeight:(unsigned)aRowHeight -{ - if (_rowHeight == aRowHeight) - return; - - _rowHeight = aRowHeight; - - // don't perform adjustments if we're using variable height rows - if (_hasVariableHeightRows) - return; - - for (var row = 0; row < _numberOfRows; ++row) - for (var column = 0; column < _tableColumns.length; ++column) - [_tableCells[column][row] setFrameOrigin:CPPointMake(0.0, row * (_rowHeight + _intercellSpacing.height))]; -} - -/* - Returns the height of a table row -*/ -- (unsigned)rowHeight -{ - return _rowHeight; -} - -/* - Adds a column to the table - @param aTableColumn the column to be added -*/ -- (void)addTableColumn:(CPTableColumn)aTableColumn -{ - var i = 0, - x = _tableColumns.length ? CPRectGetMaxX([self rectOfColumn:_tableColumns.length - 1]) + _intercellSpacing.width : 0.0, - tableColumnView = [[CPView alloc] initWithFrame:CPRectMake(x, 0.0, [aTableColumn width], [self _columnHeight])], - tableColumnCells = []; - - [_tableColumns addObject:aTableColumn]; - [_tableColumnViews addObject:tableColumnView]; - -// [tableColumnView setBackgroundColor:[CPColor greenColor]]; - - [self addSubview:tableColumnView]; - - [_tableCells addObject:tableColumnCells]; - - // TODO: do we really need to initialize this, or is undefined good enough? - for (; i < _numberOfRows; ++i) - _tableCells[_tableColumns.length-1][i] = nil; - - //++_numberOfColumns; -} - -/* - Removes a column from the table - @param aTableColumn the column to remove -*/ -- (void)removeTableColumn:(CPTableColumn)aTableColumn -{ - var frame = [self frame], - width = [aTableColumn width] + _intercellSpacing.width, - index = [_tableColumns indexOfObjectIdenticalTo:aTableColumn]; - - // Remove the column view and all the cell views from the view hierarchy. - [_tableColumnViews[i] removeFromSuperview]; - - [_tableCells removeObjectAtIndex:index]; - [_tableColumns removeObjectAtIndex:index]; - [_tableColumnViews removeObjectAtIndex:index]; - - // Shift remaining column views to the left. - for (; index < _tableColumns.length; ++ index) - [_tableColumnViews[index] setFrameOrigin:CPPointMake(CPRectGetMinX([_tableColumnViews[index] frame]) - width, 0.0)] - - // Resize ourself. - [self setFrameSize:CPSizeMake(CPRectGetWidth(frame) - width, CPRectGetHeight(frame))]; -} - -/* - Not yet implemented. Changes the position of the column in - the table. - @param fromIndex the original index of the column - @param toIndex the desired index of the column -*/ -- (void)moveColumn:(unsigned)fromIndex toColumn:(unsinged)toIndex -{ - if (fromIndex == toIndex) - return; -// FIXME: IMPLEMENT -} - -/* - Returns an array containing the table's CPTableColumns. -*/ -- (CPArray)tableColumns -{ - return _tableColumns; -} - -/* - Returns the first CPTableColumn equal to the given object (as determined by the "isEqual:" selector), or nil if none exists. - @param anObject the object to look for -*/ -- (CPTableColumn)tableColumnWithIdentifier:(id)anObject -{ - for (var i = 0; i < _tableColumns.length; i++) - if ([_tableColumns[i] isEqual:anObject]) - return _tableColumns[i]; - return nil; -} - -// Getting the dimensions of the table -/* - Returns the number of columns in the table -*/ -- (int)numberOfColumns -{ - return _tableColumns.length; -} - -/* - Returns the number of rows in the table -*/ -- (int)numberOfRows -{ - return _numberOfRows; -} - -/* - Adjusts the size of the table and it's header view. -*/ -- (void)tile -{ - var HEIGHT = 10.0; - -// [_headerView setFrame:CPRectMake(0.0, 0.0, CPRectGetWidth([self bounds]), HEIGHT)]; -// [_scrollView setFrame:CPRectMake(0.0, HEIGHT, CPRectGetWidth([self bounds]), CPRectGetHeight([self bounds]) - HEIGHT)]; -} - -/* - Sets the object that is used to obtain the table data. The data source must implement the following - methods: -
-- (int)numberOfRowsInTableView:(CPTableView)aTableView
-- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aTableColumn row:(int)rowIndex
-
- @param aDataSource the object with the table data - @throws CPInternalInconsistencyException if aDataSource doesn't implement all the required methods -*/ - (void)setDataSource:(id)aDataSource { - if (![aDataSource respondsToSelector:@selector(numberOfRowsInTableView:)]) - [CPException raise:CPInternalInconsistencyException reason:"Data source doesn't support 'numberOfRowsInTableView:'"]; - if (![aDataSource respondsToSelector:@selector(tableView:objectValueForTableColumn:row:)]) - [CPException raise:CPInternalInconsistencyException reason:"Data source doesn't support 'tableView:objectValueForTableColumn:row:'"]; + if (_dataSource === aDataSource) + return; _dataSource = aDataSource; - + _implementedDataSourceMethods = 0; + + if (!_dataSource) + return; + + if (![_dataSource respondsToSelector:@selector(numberOfRowsInTableView:)]) + [CPException raise:CPInternalInconsistencyException + reason:[aDataSource description] + " does not implement numberOfRowsInTableView:."]; + + if (![_dataSource respondsToSelector:@selector(tableView:objectValueForTableColumn:row:)]) + [CPException raise:CPInternalInconsistencyException + reason:[aDataSource description] + " does not implement tableView:objectValueForTableColumn:row:"]; + + if ([_dataSource respondsToSelector:@selector(tableView:setObjectValue:forTableColumn:row:)]) + _implementedDataSourceMethods |= CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_; + + if ([_dataSource respondsToSelector:@selector(tableView:setObjectValue:forTableColumn:row:)]) + _implementedDataSourceMethods |= CPTableViewDataSource_tableView_acceptDrop_row_dropOperation_; + + if ([_dataSource respondsToSelector:@selector(tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)]) + _implementedDataSourceMethods |= CPTableViewDataSource_tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_; + + if ([_dataSource respondsToSelector:@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)]) + _implementedDataSourceMethods |= CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_; + + if ([_dataSource respondsToSelector:@selector(tableView:writeRowsWithIndexes:toPasteboard:)]) + _implementedDataSourceMethods |= CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_; + [self reloadData]; } -/* - Returns the object that has access to the table data -*/ - (id)dataSource { return _dataSource; } +//Loading Data + +- (void)reloadData +{ + if (!_dataSource) + return; + + _objectValues = { }; + [self noteNumberOfRowsChanged]; +[self _sizeToParent]; + [self layoutSubviews]; +} + +//Target-action Behavior + +- (void)setDoubleAction:(SEL)anAction +{ + _doubleAction = anAction; +} + +- (SEL)doubleAction +{ + return _doubleAction; +} + +/* + * - clickedColumn + * - clickedRow +*/ +//Configuring Behavior + +- (void)setAllowsColumnReordering:(BOOL)shouldAllowColumnReordering +{ + _allowsColumnReordering = !!shouldAllowColumnReordering; +} + +- (BOOL)allowsColumnReordering +{ + return _allowsColumnReordering; +} + +- (void)setAllowsColumnResizing:(BOOL)shouldAllowColumnResizing +{ + _allowsColumnResizing = !!shouldAllowColumnResizing; +} + +- (BOOL)allowsColumnResizing +{ + return _allowsColumnResizing; +} + +- (void)setAllowsMultipleSelection:(BOOL)shouldAllowMultipleSelection +{ + _allowsMultipleSelection = !!shouldAllowMultipleSelection; +} + +- (BOOL)allowsMultipleSelection +{ + return _allowsMultipleSelection; +} + +- (void)setAllowsEmptySelection:(BOOL)shouldAllowEmptySelection +{ + _allowsEmptySelection = !!shouldAllowEmptySelection; +} + +- (BOOL)allowsEmptySelection +{ + return _allowsEmptySelection; +} + +- (void)setAllowsColumnSelection:(BOOL)shouldAllowColumnSelection +{ + _allowsColumnSelection = !!shouldAllowColumnSelection; +} + +- (BOOL)allowsColumnSelection +{ + return _allowsColumnSelection; +} + +//Setting Display Attributes + +- (void)setIntercellSpacing:(CGSize)aSize +{ + if (_CGSizeEqualToSize(_intercellSpacing, aSize)) + return; + + _intercellSpacing = _CGSizeMakeCopy(aSize); + + [self setNeedsLayout]; +} + +- (void)setThemeState:(int)astae +{ +} + +- (CGSize)intercellSpacing +{ + return _CGSizeMakeCopy(_intercellSpacing); +} + +- (void)setRowHeight:(unsigned)aRowHeight +{ + aRowHeight = +aRowHeight; + + if (_rowHeight === aRowHeight) + return; + + _rowHeight = aRowHeight; + + [self setNeedsLayout]; +} + +- (unsigned)rowHeight +{ + return _rowHeight; +} +/* +- (void)setUsesAlternatingRowBackgroundColors:(BOOL)shouldUseAlternatingRowBackgroundColors +{ + // TODO:need to look at how one actually sets the alternating row, a tip at: + // http://forums.macnn.com/79/developer-center/228347/nstableview-alternating-row-colors/ + // otherwise this may not be feasible or may introduce an additional change req'd in CP + // we'd probably need to iterate through rowId % 2 == 0 and setBackgroundColor with + // whatever the alternating row color is. + _usesAlternatingRowBackgroundColors = shouldUseAlternatingRowBackgroundColors; +} + +- (BOOL)usesAlternatingRowBackgroundColors +{ + return _usesAlternatingRowBackgroundColors; +} + +- (unsigned)selectionHighlightStyle +{ + return _selectionHighlightMask; +} + +- (void)setSelectionHighlightStyle:(unsigned)aSelectionHighlightStyle +{ + _selectionHighlightMask = aSelectionHighlightStyle; +} + +- setGridColor: + + + * - gridColor + * - setGridStyleMask: + * - gridStyleMask + * - indicatorImageInTableColumn: + * - setIndicatorImage:inTableColumn: +*/ +//Column Management + +- (void)addTableColumn:(CPTableColumn)aTableColumn +{ + [_tableColumns addObject:aTableColumn]; + [aTableColumn setTableView:self]; + + if (_dirtyTableColumnRangeIndex < 0) + _dirtyTableColumnRangeIndex = NUMBER_OF_COLUMNS() - 1; + else + _dirtyTableColumnRangeIndex = MIN(NUMBER_OF_COLUMNS() - 1, _dirtyTableColumnRangeIndex); + + [self setNeedsLayout]; +} + +- (void)removeTableColumn:(CPTableColumn)aTableColumn +{ + if ([aTableColumn tableView] !== self) + return; + + var index = [_tableColumns indeOfObjectIdenticalTo:aTableColumn]; + + if (index === CPNotFound) + return; + + [aTableColumn setTableView:nil]; + [_tableColumns removeObjectAtIndex:index]; + + var tableColumnUID = [aTableColumn UID]; + + if (_objectValues[tableColumnUID]) + _objectValues[tableColumnUID] = nil; + + if (_dirtyTableColumnRangeIndex < 0) + _dirtyTableColumnRangeIndex = index; + else + _dirtyTableColumnRangeIndex = MIN(index, _dirtyTableColumnRangeIndex); + + [self setNeedsLayout]; +} + +- (void)moveColumn:(unsigned)fromIndex toColumn:(unsigned)toIndex +{ + fromIndex = +fromIndex; + toIndex = +toIndex; + + if (fromIndex === toIndex) + return; + + if (_dirtyTableColumnRangeIndex < 0) + _dirtyTableColumnRangeIndex = MIN(fromIndex, toIndex); + else + _dirtyTableColumnRangeIndex = MIN(fromIndex, toIndex, _dirtyTableColumnRangeIndex); + + if (toIndex > fromIndex) + --toIndex; + + var tableColumn = _tableColumns[fromIndex]; + + [_tableColumns removeObjectAtIndex:fromIndex]; + [_tableColumns insertObject:tableColumn atIndex:toIndex]; + + [self setNeedsLayout]; +} + +- (CPArray)tableColumns +{ + return _tableColumns; +} + +- (CPInteger)columnWithIdentifier:(CPString)anIdentifier +{ + var index = 0, + count = NUMBER_OF_COLUMNS(); + + for (; index < count; ++index) + if ([_tableColumns identifier] === anIdentifier) + return index; + + return CPNotFound; +} + +- (CPTableColumn)tableColumnWithIdentifier:(CPString)anIdentifier +{ + var index = [self columnWithIdentifier:anIdentifier]; + + if (index === CPNotFound) + return nil; + + return _tableColumns[index]; +} + +//Selecting Columns and Rows +- (void)selectColumnIndexes:(CPIndexSet)columns byExtendingSelection:(BOOL)shouldExtendSelection +{ + // We deselect all columns when selecting rows. + _selectedRowIndexes = [CPIndexSet indexSet]; + + if (shouldExtendSelection) + [_selectedColumnIndexes addIndexes:columns]; + else + _selectedColumnIndexes = [columns copy]; + + [self setNeedsLayout]; +} + +- (void)selectRowIndexes:(CPIndexSet)rows byExtendingSelection:(BOOL)shouldExtendSelection +{ + // We deselect all rows when selecting columns. + _selectedColumnIndexes = [CPIndexSet indexSet]; + + if (shouldExtendSelection) + [_selectedRowIndexes addIndexes:rows]; + else + _selectedRowIndexes = [rows copy]; + + [self setNeedsLayout]; +} + +- (CPIndexSet)selectedColumnIndexes +{ + return _selectedColumnIndexes; +} + +- (void)selectedRowIndexes +{ + return _selectedRowIndexes; +} + +- (void)deselectColumn:(CPInteger)aColumn +{ + [_selectedColumnIndexes removeIndex:aColumn]; +} + +- (void)deselectRow:(CPInteger)aRow +{ + [_selectedRowIndexes removeIndex:aRow]; +} + +- (CPInteger)numberOfSelectedColumns +{ + return [_selectedColumnIndexes count]; +} + +- (CPInteger)numberOfSelectedRows +{ + return [_selectedRowIndexes count]; +} + +/* +- (CPInteger)selectedColumn + * - selectedRow +*/ + +- (BOOL)isColumnSelected:(CPInteger)aColumn +{ + return [_selectedColumnIndexes containsIndex:aColumn]; +} + +- (BOOL)isRowSelected:(CPInteger)aRow +{ + return [_selectedRowIndexes containsIndex:aRow]; +} +/* +- (void)selectAll: + * - deselectAll: + * - allowsTypeSelect + * - setAllowsTypeSelect: +*/ +//Table Dimensions + +- (int)numberOfColumns +{ + return NUMBER_OF_COLUMNS(); +} + +/* + Returns the number of rows in the receiver. +*/ +- (int)numberOfRows +{ + if (!_dataSource) + return 0; + + return [_dataSource numberOfRowsInTableView:self]; +} + +//Displaying Cell +/* + * - preparedCellAtColumn:row: +*/ +//Editing Cells +/* + * - editColumn:row:withEvent:select: + * - editedColumn + * - editedRow +*/ +//Setting Auxiliary Views +/* + * - setHeaderView: + * - headerView + * - setCornerView: + * - cornerView +*/ + +- (CPView)cornerView +{ + return _cornerView; +} + +- (void)setCornerView:(CPView)aView +{ + _cornerView = aView; +} + +- (CPView)headerView +{ + return _headerView; +} + +- (void)setHeaderView:(CPView)aHeaderView +{ + _headerView = aHeaderView; + [_headerView setTableView:self]; +} + +//Layout Support + +// Complexity: +// O(Columns) +- (void)_recalculateTableColumnRanges +{ + if (_dirtyTableColumnRangeIndex < 0) + return; + + var index = _dirtyTableColumnRangeIndex, + count = NUMBER_OF_COLUMNS(), + x = index === 0 ? 0.0 : CPMaxRange(_tableColumnRanges[index - 1]); + + for (; index < count; ++index) + { + var tableColumn = _tableColumns[index]; + + if ([tableColumn isHidden]) + _tableColumnRanges[index] = CPMakeRange(x, 0.0); + + else + { + var width = [_tableColumns[index] width]; + + _tableColumnRanges[index] = CPMakeRange(x, width); + + x += width; + } + } + + _tableColumnRanges.length = count; + _dirtyTableColumnRangeIndex = CPNotFound; +} + +// Complexity: +// O(1) +- (CGRect)rectOfColumn:(CPInteger)aColumnIndex +{ + aColumnIndex = +aColumnIndex; + + if (aColumnIndex < 0 || aColumnIndex >= NUMBER_OF_COLUMNS()) + return _CGRectMakeZero(); + + if (_dirtyTableColumnRangeIndex !== CPNotFound) + [self _recalculateTableColumnRanges]; + + var range = _tableColumnRanges[aColumnIndex]; + + return _CGRectMake(range.location, 0.0, range.length, CGRectGetHeight([self bounds])); +} + +- (CGRect)rectOfRow:(CPInteger)aRowIndex +{ + if (NO) + return NULL; + + // FIXME: WRONG: ASK TABLE COLUMN RANGE + return _CGRectMake(0.0, (aRowIndex * (_rowHeight + _intercellSpacing.height)), _CGRectGetWidth([self bounds]), _rowHeight); +} + +// Complexity: +// O(1) +- (CPRange)rowsInRect:(CGRect)aRect +{ + var bounds = nil, + firstRow = [self rowAtPoint:aRect.origin], + lastRow = [self rowAtPoint:_CGPointMake(0.0, _CGRectGetMaxY(aRect))]; + + if (firstRow < 0) + { + bounds = [self bounds]; + + if (_CGRectGetMinY(aRect) < _CGRectGetMinY(bounds)) + firstRow = 0; + else + firstRow = _numberOfRows - 1; + } + + if (lastRow < 0) + { + if (!bounds) + bounds = [self bounds]; + + if (_CGRectGetMaxY(aRect) < _CGRectGetMinY(bounds)) + lastRow = 0; + else + lastRow = _numberOfRows - 1; + } + + return CPMakeRange(firstRow, lastRow - firstRow + 1); +} + +// Complexity: +// O(lg Columns) if table view contains no hidden columns +// O(Columns) if table view contains hidden columns +- (CPIndexSet)columnIndexesInRect:(CGRect)aRect +{ + var column = MAX(0, [self columnAtPoint:_CGPointMake(aRect.origin.x, 0.0)]), + lastColumn = [self columnAtPoint:_CGPointMake(_CGRectGetMaxX(aRect), 0.0)]; + + if (lastColumn === CPNotFound) + lastColumn = NUMBER_OF_COLUMNS() - 1; + + // Don't bother doing the expensive removal of hidden indexes if we have no hidden columns. + if (_numberOfHiddenColumns <= 0) + return [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(column, lastColumn - column + 1)]; + + // + var indexSet = [CPIndexSet indexSet]; + + for (; column <= lastColumn; ++column) + { + var tableColumn = _tableColumns[column]; + + if (![tableColumn isHidden]) + [indexSet addIndex:column]; + } + + return indexSet; +} + +// Complexity: +// O(lg Columns) if table view contains now hidden columns +// O(Columns) if table view contains hidden columns +- (CPInteger)columnAtPoint:(CGPoint)aPoint +{ + var bounds = [self bounds]; + + if (!_CGRectContainsPoint(bounds, aPoint)) + return CPNotFound; + + if (_dirtyTableColumnRangeIndex !== CPNotFound) + [self _recalculateTableColumnRanges]; + + var x = aPoint.x, + low = 0, + high = _tableColumnRanges.length - 1; + + while (low <= high) + { + var middle = FLOOR(low + (high - low) / 2), + range = _tableColumnRanges[middle]; + + if (x < range.location) + high = middle - 1; + + else if (x >= CPMaxRange(range)) + low = middle + 1; + + else + { + var numberOfColumns = _tableColumnRanges.length; + + while (middle < numberOfColumns && [_tableColumns[middle] isHidden]) + ++middle; + + if (middle < numberOfColumns) + return middle; + + return CPNotFound; + } + } + + return CPNotFound; +} + +- (CPInteger)rowAtPoint:(CGPoint)aPoint +{ + var y = aPoint.y; + + if (NO) + { + } + + return FLOOR(y / (_rowHeight + _intercellSpacing.height)); +} + +- (CGRect)frameOfDataViewAtColumn:(CPInteger)aColumnIndex row:(CPInteger)aRowIndex +{ + var tableColumnRange = _tableColumns[aColumnIndex], + rectOfRow = [self rectOfRow:aRowIndex]; + + return _CGRectMake(tableColumnRange.location, _CGRectGetMinY(rectOfRow), tableColumnRange.length, _CGRectGetHeight(rectOfRow)); +} +/* + * - columnAutoresizingStyle + * - setColumnAutoresizingStyle: +*/ +- (void)sizeLastColumnToFit +{ + var superview = [self superview]; + + if (!superview) + return; + + var superviewSize = [superview bounds].size; + + if (_dirtyTableColumnRangeIndex !== CPNotFound) + [self _recalculateTableColumnRanges]; + + var count = NUMBER_OF_COLUMNS(); + + while (count-- && [_tableColumns[count] isHidden]) ; + + if (count >= 0) + { + var difference = superviewSize.width - CPMaxRange(_tableColumnRanges[count]), + tableColumn = _tableColumns[count]; + + [tableColumn setWidth:MAX(0.0, [tableColumn width] + difference)]; + } + + [self setNeedsLayout]; +} + +- (void)noteNumberOfRowsChanged +{ + _numberOfRows = [_dataSource numberOfRowsInTableView:self]; + + [self setNeedsLayout]; +} +/* + * - tile + * - sizeToFit + * - noteHeightOfRowsWithIndexesChanged: +*/ +//Scrolling +/* + * - scrollRowToVisible: + * - scrollColumnToVisible: +*/ +//Persistence +/* + * - autosaveName + * - autosaveTableColumns + * - setAutosaveName: + * - setAutosaveTableColumns: +*/ + +- (void)_sizeToParent +{ + var superviewSize = [[self superview] bounds].size; + + if (_dirtyTableColumnRangeIndex !== CPNotFound) + [self _recalculateTableColumnRanges]; + + if (_tableColumnRanges.length > 0) + var naturalWidth = CPMaxRange([_tableColumnRanges lastObject]); + + else + var naturalWidth = 0.0; + + [self setFrameSize:_CGSizeMake( MAX(superviewSize.width, naturalWidth), + MAX(superviewSize.height, (_rowHeight + _intercellSpacing.height) * _numberOfRows))]; +} + +//Setting the Delegate:(id)aDelegate + +- (void)setDelegate:(id)aDelegate +{ + if (_delegate === aDelegate) + return; + + var defaultCenter = [CPNotificationCenter defaultCenter]; + + if (_delegate) + { + if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) + [defaultCenter + removeObserver:_delegate + name:CPTableViewColumnDidMoveNotification + object:self]; + + if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) + [defaultCenter + removeObserver:_delegate + name:CPTableViewColumnDidResizeNotification + object:self]; + + if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) + [defaultCenter + removeObserver:_delegate + name:CPTableViewSelectionDidChangeNotification + object:self]; + + if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) + [defaultCenter + removeObserver:_delegate + name:CPTableViewSelectionIsChangingNotification + object:self]; + } + + _delegate = aDelegate; + _implementedDelegateMethods = 0; + + if ([_delegate respondsToSelector:@selector(selectionShouldChangeInTableView:)]) + _implementedDelegateMethods |= CPTableViewDelegate_selectionShouldChangeInTableView_; + + if ([_delegate respondsToSelector:@selector(tableView:dataViewForTableColumn:row:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_dataViewForTableColumn_row_; + + if ([_delegate respondsToSelector:@selector(tableView:didClickTableColumn:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_didClickTableColumn_; + + if ([_delegate respondsToSelector:@selector(tableView:didDragTableColumn:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_didDragTableColumn_; + + if ([_delegate respondsToSelector:@selector(tableView:heightOfRow:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_heightOfRow_; + + if ([_delegate respondsToSelector:@selector(tableView:isGroupRow:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_isGroupRow_; + + if ([_delegate respondsToSelector:@selector(tableView:mouseDownInHeaderOfTableColumn:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_mouseDownInHeaderOfTableColumn_; + + if ([_delegate respondsToSelector:@selector(tableView:nextTypeSelectMatchFromRow:toRow:forString:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_nextTypeSelectMatchFromRow_toRow_forString_; + + if ([_delegate respondsToSelector:@selector(tableView:selectionIndexesForProposedSelection:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_; + + if ([_delegate respondsToSelector:@selector(tableView:shouldEditTableColumn:row:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldEditTableColumn_row_; + + if ([_delegate respondsToSelector:@selector(tableView:shouldSelectRow:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldSelectRow_; + + if ([_delegate respondsToSelector:@selector(tableView:shouldSelectTableColumn:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldSelectTableColumn_; + + if ([_delegate respondsToSelector:@selector(tableView:shouldShowViewExpansionForTableColumn:row:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldShowViewExpansionForTableColumn_row_; + + if ([_delegate respondsToSelector:@selector(tableView:shouldTrackView:forTableColumn:row:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldTrackView_forTableColumn_row_; + + if ([_delegate respondsToSelector:@selector(tableView:shouldTypeSelectForEvent:withCurrentSearchString:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldTypeSelectForEvent_withCurrentSearchString_; + + if ([_delegate respondsToSelector:@selector(tableView:toolTipForView:rect:tableColumn:row:mouseLocation:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_toolTipForView_rect_tableColumn_row_mouseLocation_; + + if ([_delegate respondsToSelector:@selector(tableView:typeSelectStringForTableColumn:row:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_typeSelectStringForTableColumn_row_; + + if ([_delegate respondsToSelector:@selector(tableView:willDisplayView:forTableColumn:row:)]) + _implementedDelegateMethods |= CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_; + + if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) + [defaultCenter + addObserver:_delegate + selector:@selector(tableViewColumnDidMove:) + name:CPTableViewColumnDidMoveNotification + object:self]; + + if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) + [defaultCenter + addObserver:_delegate + selector:@selector(tableViewColumnDidMove:) + name:CPTableViewColumnDidResizeNotification + object:self]; + + if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) + [defaultCenter + addObserver:_delegate + selector:@selector(tableViewSelectionDidChange:) + name:CPTableViewSelectionDidChangeNotification + object:self]; + + if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) + [defaultCenter + addObserver:_delegate + selector:@selector(tableViewSelectionIsChanging:) + name:CPTableViewSelectionIsChangingNotification + object:self]; +} - (id)delegate { return _delegate; } - -/*! - Sets the delegate for the tableview. -*/ -- (void)setDelegate:(id)aDelegate +//Highlightable Column Headers +/* +- (CPTableColumn)highlightedTableColumn { - if (_delegate === aDelegate) - return; - - var notificationCenter = [CPNotificationCenter defaultCenter]; - - if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) - [notificationCenter removeObserver:_delegate name:CPTableViewColumnDidMoveNotification object:self]; - if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) - [notificationCenter removeObserver:_delegate name:CPTableViewColumnDidResizeNotification object:self]; - if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) - [notificationCenter removeObserver:_delegate name:CPTableViewSelectionDidChangeNotification object:self]; - if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) - [notificationCenter removeObserver:_delegate name:CPTableViewSelectionIsChangingNotification object:self]; - - _delegate = aDelegate; - - if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) - [notificationCenter addObserver:_delegate selector:@selector(tableViewColumnDidMove:) name:CPTableViewColumnDidMoveNotification object:self]; - if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) - [notificationCenter addObserver:_delegate selector:@selector(tableViewColumnDidResize:) name:CPTableViewColumnDidResizeNotification object:self]; - if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) - [notificationCenter addObserver:_delegate selector:@selector(tableViewSelectionDidChange:) name:CPTableViewSelectionDidChangeNotification object:self]; - if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) - [notificationCenter addObserver:_delegate selector:@selector(tableViewSelectionIsChanging:) name:CPTableViewSelectionIsChangingNotification object:self]; - _delegateSelectorsCache = 0; +} - if ([_delegate respondsToSelector:@selector(tableView:willDisplayCell:forTableColumn:row:)]) - _delegateSelectorsCache |= _CPTableViewWillDisplayCellSelector; - if ([_delegate respondsToSelector:@selector(tableView:shouldSelectRow:)]) - _delegateSelectorsCache |= _CPTableViewShouldSelectRowSelector; - if ([_delegate respondsToSelector:@selector(tableView:shouldSelectTableColumn:)]) - _delegateSelectorsCache |= _CPTableViewShouldSelectTableColumnSelector; - if ([_delegate respondsToSelector:@selector(selectionShouldChangeInTableView:)]) - _delegateSelectorsCache |= _CPTableViewSelectionShouldChangeSelector; - if ([_delegate respondsToSelector:@selector(tableView:shouldEditTableColumn:row:)]) - _delegateSelectorsCache |= _CPTableViewShouldEditTableColumnSelector; - if ([_delegate respondsToSelector:@selector(tableView:selectionIndexesForProposedSelection:)]) - _delegateSelectorsCache |= _CPTableViewSelectionIndexesForProposedSelectionSelector; - if ([_delegate respondsToSelector:@selector(tableView:heightOfRow:)]) + * - setHighlightedTableColumn: +*/ +//Dragging +/* + * - dragImageForRowsWithIndexes:tableColumns:event:offset: + * - canDragRowsWithIndexes:atPoint: + * - setDraggingSourceOperationMask:forLocal: + * - setDropRow:dropOperation: + * - setVerticalMotionCanBeginDrag: + * - verticalMotionCanBeginDrag +*/ +//Sorting +/* + * - setSortDescriptors: + * - sortDescriptors +*/ + +//Text Delegate Methods +/* + * - textShouldBeginEditing: + * - textDidBeginEditing: + * - textDidChange: + * - textShouldEndEditing: + * - textDidEndEditing: +*/ + +- (id)_objectValueForTableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRowIndex +{ + var tableColumnUID = [aTableColumn UID], + tableColumnObjectValues = _objectValues[tableColumnUID]; + + if (!tableColumnObjectValues) { - _delegateSelectorsCache |= _CPTableViewHeightOfRowSelector; - _hasVariableHeightRows = YES; + tableColumnObjectValues = []; + _objectValues[tableColumnUID] = tableColumnObjectValues; } - else - _hasVariableHeightRows = NO; -} + var objectValue = tableColumnObjectValues[aRowIndex]; -/* - Tells the table view that the number of rows in the table - has changed. -*/ -- (void)noteNumberOfRowsChanged -{ - var numberOfRows = [_dataSource numberOfRowsInTableView:self]; - - if (_numberOfRows != numberOfRows) + if (objectValue === undefined) { - _numberOfRows = numberOfRows; - - [self _recalculateColumnHeight]; + objectValue = [_dataSource tableView:self objectValueForTableColumn:aTableColumn row:aRowIndex]; + tableColumnObjectValues[aRowIndex] = objectValue; } + + return objectValue; } -- (void)noteHeightOfRowsWithIndexesChanged:(CPIndexSet)indexSet -{ - // FIXME: more efficient version is possible since we know which indexes changes - [self _recalculateColumnHeight]; -} - -/* - Returns the rectangle bounding the specified row. - @param aRowIndex the row to obtain a rectangle for - @return the bounding rectangle -*/ -- (CGRect)rectOfRow:(int)aRowIndex -{ - return CPRectMake(0.0, ROW_MIN_Y(aRowIndex), CPRectGetWidth([self bounds]), ROW_HEIGHT(aRowIndex)); -} - -/* - Returns the rectangle bounding the specified column - @param aColumnIndex the column to obtain a rectangle for - @return the bounding column -*/ -- (CGRect)rectOfColumn:(int)aColumnIndex -{ - return [_tableColumnViews[aColumnIndex] frame]; -} - -/* - Adjusts column widths to make them all visible at once. Same as tile. -*/ -- (void)sizeToFit -{ -// [self tile]; -} - -- (void)_recalculateColumnHeight -{ - var oldColumnHeight = _columnHeight; - - if (_hasVariableHeightRows) - { - _rowMinYs[0] = 0; - for (var row = 0; row < _numberOfRows; row++) - { - _rowHeights[row] = [_delegate tableView:self heightOfRow:row]; - _rowMinYs[row+1] = _rowMinYs[row] + _rowHeights[row] + _intercellSpacing.height; - } - _columnHeight = _rowMinYs[_numberOfRows]; // last index is one more than last row, and is the total column height - } - else - _columnHeight = _numberOfRows * (_rowHeight + _intercellSpacing.height); - - var count = _tableColumnViews.length; - - while (count--) - [_tableColumnViews[count] setFrameSize:CGSizeMake([_tableColumns[count] width], _columnHeight)]; - - [self setFrameSize:CGSizeMake(CGRectGetWidth([self frame]), _columnHeight)]; -} - -- (CGRect)visibleRectInParent +- (CGRect)_exposedRect { var superview = [self superview]; - - if (!superview) + + if (![superview isKindOfClass:[CPClipView class]]) return [self bounds]; - + return [self convertRect:CGRectIntersection([superview bounds], [self frame]) fromView:superview]; } -/* - Reloads the data from the dataSource. This is an - expensive method, so use it lightly. -*/ -- (void)reloadData +- (void)load { - var oldNumberOfRows = _numberOfRows; - - _numberOfRows = [_dataSource numberOfRowsInTableView:self]; - - if (oldNumberOfRows != _numberOfRows) + if (!_dataSource) { - [self _recalculateColumnHeight]; - [self setFrameSize:CGSizeMake(CGRectGetWidth([self frame]), [self _columnHeight])]; + // remove? + return; + } + +// if (!window.blah) +// return window.setTimeout(function() { window.blah = true; [self load]; window.blah = false}, 0.0); + + if (window.console && window.console.profile) + console.profile("cell-load"); + + var exposedRect = [self _exposedRect], + exposedRows = [CPIndexSet indexSetWithIndexesInRange:[self rowsInRect:exposedRect]], + exposedColumns = [self columnIndexesInRect:exposedRect], + obscuredRows = [_exposedRows copy], + obscuredColumns = [_exposedColumns copy]; + + [obscuredRows removeIndexes:exposedRows]; + [obscuredColumns removeIndexes:exposedColumns]; + + var newlyExposedRows = [exposedRows copy], + newlyExposedColumns = [exposedColumns copy]; + + [newlyExposedRows removeIndexes:_exposedRows]; + [newlyExposedColumns removeIndexes:_exposedColumns]; + + var previouslyExposedRows = [exposedRows copy], + previouslyExposedColumns = [exposedColumns copy]; + + [previouslyExposedRows removeIndexes:newlyExposedRows]; + [previouslyExposedColumns removeIndexes:newlyExposedColumns]; + +// console.log("will remove:" + '\n\n' + +// previouslyExposedRows + "\n" + obscuredColumns + "\n\n" + +// obscuredRows + "\n" + previouslyExposedColumns + "\n\n" + +// obscuredRows + "\n" + obscuredColumns); + [self _unloadDataViewsInRows:previouslyExposedRows columns:obscuredColumns]; + [self _unloadDataViewsInRows:obscuredRows columns:previouslyExposedColumns]; + [self _unloadDataViewsInRows:obscuredRows columns:obscuredColumns]; + + [self _loadDataViewsInRows:previouslyExposedRows columns:newlyExposedColumns]; + [self _loadDataViewsInRows:newlyExposedRows columns:previouslyExposedColumns]; + [self _loadDataViewsInRows:newlyExposedRows columns:newlyExposedColumns]; + +// console.log("newly exposed rows: " + newlyExposedRows + "\nnewly exposed columns: " + newlyExposedColumns); + _exposedRows = exposedRows; + _exposedColumns = exposedColumns; + + [_tableDrawView setFrame:exposedRect]; +// [_tableDrawView setBounds:exposedRect]; + [_tableDrawView display]; + + if (window.console && window.console.profile) + console.profileEnd("cell-load"); +} + +- (void)_unloadDataViewsInRows:(CPIndexSet)rows columns:(CPIndexSet)columns +{ + if (![rows count] || ![columns count]) + return; + + var rowArray = [], + columnArray = []; + + [rows getIndexes:rowArray maxCount:-1 inIndexRange:nil]; + [columns getIndexes:columnArray maxCount:-1 inIndexRange:nil]; + + var columnIndex = 0, + columnsCount = columnArray.length; + + for (; columnIndex < columnsCount; ++columnIndex) + { + var column = columnArray[columnIndex], + tableColumn = _tableColumns[column], + tableColumnUID = [tableColumn UID]; + + var rowIndex = 0, + rowsCount = rowArray.length; + + for (; rowIndex < rowsCount; ++rowIndex) + { + var row = rowArray[rowIndex], + dataView = _dataViewsForTableColumns[tableColumnUID][row]; + + _dataViewsForTableColumns[tableColumnUID][row] = nil; +if (!_cachedDataViews[dataView.identifier]) +_cachedDataViews[dataView.identifier] = [dataView]; +else +_cachedDataViews[dataView.identifier].push(dataView); + } + } +} + +- (void)_loadDataViewsInRows:(CPIndexSet)rows columns:(CPIndexSet)columns +{ + if (![rows count] || ![columns count]) + return; + + var rowArray = [], + rowRects = [], + columnArray = []; + + [rows getIndexes:rowArray maxCount:-1 inIndexRange:nil]; + [columns getIndexes:columnArray maxCount:-1 inIndexRange:nil]; + + var columnIndex = 0, + columnsCount = columnArray.length; + + for (; columnIndex < columnsCount; ++columnIndex) + { + var column = columnArray[columnIndex], + tableColumn = _tableColumns[column], + tableColumnUID = [tableColumn UID], + tableColumnRange = _tableColumnRanges[column]; + + if (!_dataViewsForTableColumns[tableColumnUID]) + _dataViewsForTableColumns[tableColumnUID] = []; + + var rowIndex = 0, + rowsCount = rowArray.length; + + for (; rowIndex < rowsCount; ++rowIndex) + { + var row = rowArray[rowIndex], + dataView = [tableColumn _newDataViewForRow:row], + rectOfRow = rowRects[row]; + + if (!rectOfRow) + rectOfRow = rowRects[row] = [self rectOfRow:row]; + + [dataView setFrame:_CGRectMake(tableColumnRange.location, _CGRectGetMinY(rectOfRow), tableColumnRange.length, _CGRectGetHeight(rectOfRow))]; + [dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]]; + + if ([dataView superview] !== self) + [self addSubview:dataView]; + + _dataViewsForTableColumns[tableColumnUID][row] = dataView; + } + } +} + +- (void)setFrameSize:(CGSize)aSize +{ + [super setFrameSize:aSize]; + [_headerView setFrameSize:CGSizeMake(aSize.width, [_headerView frame].size.height)]; +} + +- (void)_drawRect:(CGRect)aRect +{ + [self highlightSelectionInClipRect:[self _exposedRect]]; +} + +- (void)highlightSelectionInClipRect:(CGRect)aRect +{ + [[CPColor greenColor] set]; + + var context = [[CPGraphicsContext currentContext] graphicsPort]; + + if ([_selectedRowIndexes count] >= 1) + { + var exposedRows = [CPIndexSet indexSetWithIndexesInRange:[self rowsInRect:aRect]], + exposedRange = CPMakeRange([exposedRows firstIndex], [exposedRows lastIndex] - [exposedRows firstIndex] + 1), + rowArray = []; + + [_selectedRowIndexes getIndexes:rowArray maxCount:-1 inIndexRange:exposedRange]; + + var rowArrayIndex = 0, + rowArrayCount = rowArray.length; + + for (; rowArrayIndex < rowArrayCount; ++rowArrayIndex) + CGContextFillRect(context, [self rectOfRow:rowArray[rowArrayIndex]]); + } + else + { + } - - _objectValueCache = []; - - [self clearCells]; - - [self setNeedsLayout]; } - (void)layoutSubviews { - [self loadTableCellsInRect:[self visibleRectInParent]]; + [self load]; } -- (void)displaySoon +- (void)viewWillMoveToSuperview:(CPView)aView { - [_scrollTimer invalidate]; - _scrollTimer = [CPTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(displayNow) userInfo:nil repeats:NO]; + var superview = [self superview], + defaultCenter = [CPNotificationCenter defaultCenter]; + + if (superview) + { + [defaultCenter + removeObserver:self + name:CPViewFrameDidChangeNotification + object:superview]; + + [defaultCenter + removeObserver:self + name:CPViewBoundsDidChangeNotification + object:superview]; + } + + if (aView) + { + [aView setPostsFrameChangedNotifications:YES]; + [aView setPostsBoundsChangedNotifications:YES]; + + [defaultCenter + addObserver:self + selector:@selector(superviewFrameChanged:) + name:CPViewFrameDidChangeNotification + object:aView]; + + [defaultCenter + addObserver:self + selector:@selector(superviewBoundsChanged:) + name:CPViewBoundsDidChangeNotification + object:aView]; + } } -- (void)displayNow +- (void)superviewBoundsChanged:(CPNotification)aNotification { [self setNeedsLayout]; } -- (void)viewDidMoveToSuperview +- (void)superviewFrameChanged:(CPNotification)aNotification { - [[[self enclosingScrollView] contentView] setPostsBoundsChangedNotifications:YES]; - - [[CPNotificationCenter defaultCenter] - addObserver:self - selector:@selector(viewBoundsChanged:) - name:CPViewBoundsDidChangeNotification - object:[[self enclosingScrollView] contentView]]; } -- (void)viewBoundsChanged:(CPNotification)aNotification -{ - //CPLog.info(_cmd + CPStringFromRect([[[self enclosingScrollView] contentView] bounds])); - //objj_debug_print_backtrace(); - //[self setNeedsLayout]; - [self displayNow]; -} +// /* -- (void)setAllowsColumnReordering:(BOOL)allowsColumnReordering -{ - if (_allowsColumnReordering === _allowsColumnReordering) - return; - - _allowsColumnReordering = allowsColumnReordering; -} -- (void)allowsColumnReordering -{ - return _allowsColumnReordering; -} - -- (void)setAllowsColumnResizing:(BOOL)allowsColumnResizing -{ - if (_allowsColumnResizing === allowsColumnResizing) - return; - - _allowsColumnResizing = allowsColumnResizing; -} -- (void)allowsColumnResizing -{ - return _allowsColumnResizing; -} - -- (void)setAllowsColumnSelection:(BOOL)allowsColumnSelection -{ - if (_allowsColumnSelection === allowsColumnSelection) - return; - - _allowsColumnSelection = allowsColumnSelection; -} -- (void)allowsColumnSelection -{ - return _allowsColumnSelection; -} -*/ - -- (void)setAllowsMultipleSelection:(BOOL)allowsMultipleSelection -{ - if (_allowsMultipleSelection === allowsMultipleSelection) - return; - - _allowsMultipleSelection = allowsMultipleSelection; - - // TODO: more stuff? -} -- (void)allowsMultipleSelection -{ - return _allowsMultipleSelection; -} - -- (void)setAllowsEmptySelection:(BOOL)allowsEmptySelection -{ - if (_allowsEmptySelection === allowsEmptySelection) - return; - - _allowsEmptySelection = allowsEmptySelection; -} -- (void)allowsEmptySelection -{ - return _allowsEmptySelection; -} - - -/* - Returns the index of the row at the given point, or CPNotFound (-1) if it is out of range. - @param aPoint the point - @return the index of the row at aPoint -*/ -- (int)rowAtPoint:(CGPoint)aPoint -{ - var index = [self _rowAtY:aPoint.y] - - if (index >= 0 && index < _numberOfRows) - return index; - else - return CPNotFound; -} - -- (int)columnAtPoint:(CGPoint)aPoint -{ - var index = [self _columnAtX:aPoint.x] - - if (index >= 0 && index < _tableColumns.length) - return index; - else - return CPNotFound; -} - -/* - @ignore - - Internal version takes a Y value, returns an index, or -1 if its beyond the min, or numberOfRows if it's beyond the max -*/ -- (int)_rowAtY:(float)y -{ - if (_hasVariableHeightRows) - { - var a = 0, - b = _numberOfRows; - - if (y < _rowMinYs[0]) - return -1; - if (y >= _rowMinYs[_rowMinYs.length-1]) - return _numberOfRows; - - // binary search - while (true) - { - var half = a + Math.floor((b - a) / 2); - - if (y < _rowMinYs[half]) - b = half; - else if (half < _numberOfRows-1 && y >= _rowMinYs[half+1]) - a = half; - else - return half; - } - } - else - return FLOOR(y / (_rowHeight + _intercellSpacing.height)); -} - -/* - @ignore - - Internal version takes a X value, returns an index, or -1 if its beyond the min, or numberOfColumns if it's beyond the max -*/ -- (int)_columnAtX:(float)x -{ - var a = 0, - b = _tableColumns.length; - - var last = [_tableColumnViews[_tableColumns.length-1] frame]; - if (x < [_tableColumnViews[0] frame].origin.x) - return -1; - if (x >= last.origin.x + last.size.width) - return _tableColumns.length; - - // binary search - while (true) - { - var half = a + Math.floor((b - a) / 2); - - if (x < [_tableColumnViews[half] frame].origin.x) - b = half; - else if (half < _tableColumns.length-1 && x >= [_tableColumnViews[half+1] frame].origin.x) - a = half; - else - return half; - } -} - -/* - Selects the specified row indexes, optionally adding to existing selection - @param indexes the indexes to select - @param extend whether or not to add to the existing selection -*/ -- (void)selectRowIndexes:(CPIndexSet)indexes byExtendingSelection:(BOOL)extend -{ - // FIXME: should this be subject to the delegate filters, etc? - - if (extend) - _selectedRowIndexes = [[_selectedRowIndexes copy] addIndexes:indexes]; - else if ([indexes count] > 0 || _allowsEmptySelection) - _selectedRowIndexes = [indexes copy]; - - [self _drawSelection]; -} - -/* - Returns a CPIndexSet of the selected rows - @return indexes of the selected rows -*/ -- (CPIndexSet)selectedRowIndexes -{ - return _selectedRowIndexes; -} - -/* - Returns the number of selected rows - @return number of selected rows -*/ -- (int)numberOfSelectedRows -{ - return [_selectedRowIndexes count]; -} - - -/* - Deselects all rows if allowsEmptySelection is true. If delegate responds to "selectionShouldChangeInTableView:", asks if it should chnage. - Sends the CPTableViewSelectionDidChangeNotification on deselection. - @param the sender in a target/action -*/ -- (void)deselectAll:(id)sender -{ - if (!_allowsEmptySelection || [_selectedRowIndexes count] === 0 || - ((_delegateSelectorsCache & _CPTableViewSelectionShouldChangeSelector) && ![_delegate selectionShouldChangeInTableView:self])) - return; - - [self selectRowIndexes:[CPIndexSet indexSet] byExtendingSelection:NO]; - [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]; -} - -- (void)editColumn:(int)columnIndex row:(int)rowIndex withEvent:(CPEvent)theEvent select:(BOOL)flag -{ - -} - -/* - @ignore -*/ -- (void)_updateSelectionWithMouseAtRow:(int)aRow -{ - // Make a preliminary new selection - var newSelection; - if (_allowsMultipleSelection) - newSelection = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(MIN(aRow, _selectionStartRow), ABS(aRow-_selectionStartRow)+1)]; - else if (aRow >= 0 && aRow < _numberOfRows) - newSelection = [CPIndexSet indexSetWithIndex:aRow]; - else - newSelection = [CPIndexSet indexSet]; - - // If cmd/ctrl was held down XOR the old selection with the proposed selection - if (_allowsMultipleSelection && _selectionModifier & (CPCommandKeyMask | CPControlKeyMask | CPAlternateKeyMask)) - { - // A = newSelection, B = _previousSelectedRowIndexes - // (A intersection B) = (A - (A - B)) - var intersection = [newSelection copy], - difference = [newSelection copy]; - [difference removeIndexes:_previousSelectedRowIndexes]; - [intersection removeIndexes:difference] - - // (A xor B) = (A + B) - (A intersection B) - [newSelection addIndexes:_previousSelectedRowIndexes]; - [newSelection removeIndexes:intersection]; - - // FIXME: if multiple selection is off, and we cmd/ctrl click the previously selected row, then deselect it. - } - - // if the new selection is different than the old selection - if (![newSelection isEqualToIndexSet:_selectedRowIndexes]) - { - // ask the delegate if we should change the selection - if ((_delegateSelectorsCache & _CPTableViewSelectionShouldChangeSelector) && ![_delegate selectionShouldChangeInTableView:self]) - return; - - // ask the delegate which indexes can be selected. selectionIndexesForProposedSelection is faster than shouldSelectRow - if (_delegateSelectorsCache & _CPTableViewSelectionIndexesForProposedSelectionSelector) - newSelection = [_delegate tableView:self selectionIndexesForProposedSelection:newSelection]; - else if (_delegateSelectorsCache & _CPTableViewShouldSelectRowSelector) - { - var indexes = []; - [newSelection getIndexes:indexes maxCount:Number.MAX_VALUE inIndexRange:nil]; - for (var i = 0; i < indexes.length; i++) - if (![_delegate tableView:self shouldSelectRow:indexes[i]]) - [newSelection removeIndex:indexes[i]]; - } - } - - // if empty selection is not allowed and the new selection has nothing selected, abort - if (!_allowsEmptySelection && [newSelection count] === 0) - return; - - // if the new selection is *still* different, and update the selection and send a notification - if (![newSelection isEqualToIndexSet:_selectedRowIndexes]) - { - [self selectRowIndexes:newSelection byExtendingSelection:NO]; - [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionIsChangingNotification object:self userInfo:nil]; - } -} - -/* - @ignore -*/ -- (void)mouseDown:(CPEvent)anEvent -{ - [self trackSelection:anEvent]; -} - -/* - Sets the message to be sent to the target when a cell is double clicked - @param aSelector the selector to be performed -*/ -- (void)setDoubleAction:(SEL)aSelector -{ - _doubleAction = aSelector; -} -- (SEL)doubleAction -{ - return _doubleAction; -} - -- (int)clickedColumn -{ - return _clickedColumn; -} -- (int)clickedRow -{ - return _clickedRow; -} - -/* - @ignore -*/ -- (void)trackSelection:(CPEvent)anEvent -{ var type = [anEvent type], point = [self convertPoint:[anEvent locationInWindow] fromView:nil], currentRow = MAX(0, MIN(_numberOfRows-1, [self _rowAtY:point.y])); - - if (type == CPLeftMouseUp) - { - _clickedRow = [self rowAtPoint:point]; - _clickedColumn = [self columnAtPoint:point]; - - if ([anEvent clickCount] === 2) - { - CPLog.warn("edit?!"); - - [self sendAction:_doubleAction to:_target]; - } - else - { - if (![_previousSelectedRowIndexes isEqualToIndexSet:_selectedRowIndexes]) - { - [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]; - } - - [self sendAction:_action to:_target]; - } - - return; - } - - if (type == CPLeftMouseDown) - { - _previousSelectedRowIndexes = _selectedRowIndexes; - _selectionModifier = [anEvent modifierFlags]; - - if (_selectionModifier & CPShiftKeyMask) - _selectionStartRow = (ABS([_previousSelectedRowIndexes firstIndex] - currentRow) < ABS([_previousSelectedRowIndexes lastIndex] - currentRow)) ? - [_previousSelectedRowIndexes firstIndex] : [_previousSelectedRowIndexes lastIndex]; - else - _selectionStartRow = currentRow; - - [self _updateSelectionWithMouseAtRow:currentRow]; - } - else if (type == CPLeftMouseDragged) - { - [self _updateSelectionWithMouseAtRow:currentRow]; - } - - [CPApp setTarget:self selector:@selector(trackSelection:) forNextEventMatchingMask:CPLeftMouseDraggedMask | CPLeftMouseUpMask untilDate:nil inMode:nil dequeue:YES]; + +*/ + +- (BOOL)startTrackingAt:(CGPoint)aPoint +{ + var row = [self rowAtPoint:aPoint]; + + if ([self mouseDownFlags] & CPShiftKeyMask) + _selectionAnchor = (ABS([_selectedRowIndexes firstIndex] - row) < ABS([_selectedRowIndexes lastIndex] - row)) ? + [_selectedRowIndexes firstIndex] : [_selectedRowIndexes lastIndex]; + else + _selectionAnchor = row; + + [self _updateSelectionWithMouseAtRow:row]; + + return YES; } -/* - @ignore -*/ -- (void)_drawSelection +- (BOOL)continueTracking:(CGPoint)lastPoint at:(CGPoint)aPoint { - if (!_currentlySelected) { - _currentlySelected = [CPIndexSet indexSet]; - _selectionViews = []; - _selectionViewsPool = []; - } + [self _updateSelectionWithMouseAtRow:[self rowAtPoint:aPoint]]; - // TODO: we could also remove selections that aren't visible, but then we'll need to run this on every scroll/resize? - - // get array of indexes we can remove - var removeSet = [_currentlySelected copy], - indexesToRemove = []; - [removeSet removeIndexes:_selectedRowIndexes]; - [removeSet getIndexes:indexesToRemove maxCount:Number.MAX_VALUE inIndexRange:nil]; - - // get array of indexes we need to add - var addSet = [_selectedRowIndexes copy], - indexesToAdd = []; - [addSet removeIndexes:_currentlySelected]; - [addSet getIndexes:indexesToAdd maxCount:Number.MAX_VALUE inIndexRange:nil]; - - for (var i = 0; i < indexesToRemove.length; i++) - { - var row = indexesToRemove[i]; - for (var column = 0; column < _tableColumns.length; column++) - if ([_tableCells[column][row] respondsToSelector:@selector(highlight:)]) - [_tableCells[column][row] highlight:NO]; - } - for (var i = 0; i < indexesToAdd.length; i++) - { - var row = indexesToAdd[i]; - for (var column = 0; column < _tableColumns.length; column++) - if ([_tableCells[column][row] respondsToSelector:@selector(highlight:)]) - [_tableCells[column][row] highlight:YES]; - } + return YES; +} - // add each one we need to add, taking the selection views from removed seelctions, the pool, or new - for (var i = 0; i < indexesToAdd.length; i++) +- (void)stopTracking:(CGPoint)lastPoint at:(CGPoint)aPoint mouseIsUp:(BOOL)mouseIsUp +{/* + _clickedRow = [self rowAtPoint:point]; + _clickedColumn = [self columnAtPoint:point]; + + if ([anEvent clickCount] === 2) { - var index = indexesToAdd[i], - view; - - if (indexesToRemove.length > 0) + CPLog.warn("edit?!"); + + [self sendAction:_doubleAction to:_target]; + } + else + { + if (![_previousSelectedRowIndexes isEqualToIndexSet:_selectedRowIndexes]) { - view = _selectionViews[indexesToRemove.pop()]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]; } - else if (_selectionViewsPool.length > 0) + + [self sendAction:_action to:_target]; + } +*/ +} + +- (void)_updateSelectionWithMouseAtRow:(CPInteger)aRow +{ + // If cmd/ctrl was held down XOR the old selection with the proposed selection + if ([self mouseDownFlags] & (CPCommandKeyMask | CPControlKeyMask | CPAlternateKeyMask)) + { + if ([_selectedRowIndexes containsIndex:aRow]) { - view = _selectionViewsPool.pop(); - [self addSubview:view positioned:CPWindowBelow relativeTo:nil]; + newSelection = [_selectedRowIndexes copy]; + + [newSelection removeIndex:aRow]; } + + else if (_allowsMultipleSelection) + { + newSelection = [_selectedRowIndexes copy]; + + [newSelection addIndex:aRow]; + } + else - { - view = [[CPView alloc] init]; - [view setBackgroundColor:[CPColor alternateSelectedControlColor]]; - - [self addSubview:view positioned:CPWindowBelow relativeTo:nil]; - } - - _selectionViews[index] = view; - - var frame = [self rectOfRow:index]; - frame.size.height += _intercellSpacing.height - 1; - //frame.size.width += 500; - - [view setFrame:frame]; + newSelection = [CPIndexSet indexSetWithIndex:aRow]; } - - // remove any selections that weren't already reused - for (var i = 0; i < indexesToRemove.length; i++) + + else if (_allowsMultipleSelection) + newSelection = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(MIN(aRow, _selectionStartRow), ABS(aRow - _selectionStartRow) + 1)]; + + else if (aRow >= 0 && aRow < _numberOfRows) + newSelection = [CPIndexSet indexSetWithIndex:aRow]; + + else + newSelection = [CPIndexSet indexSet]; + + if ([newSelection isEqualToIndexSet:_selectedRowIndexes]) + return; + + if (_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_ && + ![_delegate selectionShouldChangeInTableView:self]) + return; + + if (_implementedDelegateMethods & CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_) + newSelection = [_delegate tableView:self selectionIndexesForProposedSelection:newSelection]; + + if (_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldSelectRow_) { - var row = indexesToRemove[i], - view = _selectionViews[row]; - - [view removeFromSuperview]; - _selectionViewsPool.push(view); + var indexArray = []; + + [newSelection getIndexes:indexArray maxCount:-1 inIndexRange:nil]; + + var indexCount = indexArray.length; + + while (indexCount--) + { + var index = indexArray[indexCount]; + + if (![_delegate tableView:self shouldSelectRow:index]) + [newSelection removeIndex:index]; + } } - - // update the currently selected index set - _currentlySelected = [_selectedRowIndexes copy]; + + // if empty selection is not allowed and the new selection has nothing selected, abort + if (!_allowsEmptySelection && [newSelection count] === 0) + return; + + if ([newSelection isEqualToIndexSet:_selectedRowIndexes]) + return; + + [self selectRowIndexes:newSelection byExtendingSelection:NO]; + + [[CPNotificationCenter defaultCenter] + postNotificationName:CPTableViewSelectionIsChangingNotification + object:self + userInfo:nil]; } @end - var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", CPTableViewDelegateKey = @"CPTableViewDelegateKey", CPTableViewHeaderViewKey = @"CPTableViewHeaderViewKey", @@ -1246,10 +1413,13 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", - (id)initWithCoder:(CPCoder)aCoder { - if (self = [super initWithCoder:aCoder]) + //FIXME:!!!! + [self init]; + + self = [super initWithCoder:aCoder]; + + if (self) { - [self _init]; - _dataSource = [aCoder decodeObjectForKey:CPTableViewDataSourceKey]; _delegate = [aCoder decodeObjectForKey:CPTableViewDelegateKey]; @@ -1259,9 +1429,10 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", _allowsMultipleSelection = [aCoder decodeBoolForKey:CPTableViewMultipleSelectionKey]; _allowsEmptySelection = [aCoder decodeBoolForKey:CPTableViewEmptySelectionKey]; - var tableColumns = [aCoder decodeObjectForKey:CPTableViewTableColumnsKey]; - for (var i = 0; i < tableColumns.length; i++) - [self addTableColumn:tableColumns[i]]; + _tableColumns = [aCoder decodeObjectForKey:CPTableViewTableColumnsKey]; + + [_tableColumns makeObjectsPerformSelector:@selector(setTableView:) withObject:self]; + _dirtyTableColumnRangeIndex = 0; } return self; @@ -1274,29 +1445,13 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", [aCoder encodeObject:_dataSource forKey:CPTableViewDataSourceKey]; [aCoder encodeObject:_delegate forKey:CPTableViewDelegateKey]; - [aCoder encodeObject:_tableColumns forKey:CPTableViewTableColumnsKey]; - [aCoder encodeFloat:_rowHeight forKey:CPTableViewRowHeightKey]; [aCoder encodeSize:_intercellSpacing forKey:CPTableViewIntercellSpacingKey]; [aCoder encodeBool:_allowsMultipleSelection forKey:CPTableViewMultipleSelectionKey]; [aCoder encodeBool:_allowsEmptySelection forKey:CPTableViewEmptySelectionKey]; -} - -@end - - - -@implementation CPColor (TableView) - -+ (CPColor)alternateSelectedControlColor -{ - return [[CPColor alloc] _initWithRGBA:[0.22, 0.46, 0.84, 1.0]]; -} - -+ (CPColor)secondarySelectedControlColor -{ - return [[CPColor alloc] _initWithRGBA:[0.83, 0.83, 0.83, 1.0]]; + + [aCoder encodeObject:_tableColumns forKey:CPTableViewTableColumnsKey]; } @end diff --git a/AppKit/NEWCPTableColumn.j b/AppKit/NEWCPTableColumn.j deleted file mode 100644 index 50aa73f4b..000000000 --- a/AppKit/NEWCPTableColumn.j +++ /dev/null @@ -1,342 +0,0 @@ - -@import -@import -@import -@import - -@import "CPTableHeaderView.j" - - -/* - @global - @class CPTableColumn -*/ -CPTableColumnNoResizing = 0; -/* - @global - @class CPTableColumn -*/ -CPTableColumnAutoresizingMask = 1; -/* - @global - @class CPTableColumn -*/ -CPTableColumnUserResizingMask = 2; - -@implementation NEWCPTableColumn : CPObject -{ - CPTableView _tableView; - CPView _headerView; - CPView _dataView; - Object _dataViewData; - - float _width; - float _minWidth; - float _maxWidth; - - id _identifier; - BOOL _isEditable; - CPSortDescriptor _sortDescriptorPrototype; - BOOL _isHidden; - CPString _headerToolTip; -} - -- (id)initWithIdentifier:(id)anIdentifier -{ - self = [super init]; - - if (self) - { - _dataViewData = { }; - - _width = 100.0; - _minWidth = 10.0; - _maxWidth = 1000000.0; - - [self setIdentifier:anIdentifier]; - [self setHeaderView:[CPTextField new]]; - [self setDataView:[CPTextField new]]; - } - - return self -} - -- (void)setTableView:(CPTableView)aTableView -{ - _tableView = aTableView; -} - -- (CPTableView)tableView -{ - return _tableView; -} - -- (void)setWidth:(float)aWidth -{ - aWidth = +aWidth; - - if (_width === aWidth) - return; - - var newWidth = MIN(MAX(aWidth, [self minWidth]), [self maxWidth]); - - if (_width === newWidth) - return; - - var oldWidth = _width; - - _width = newWidth; - - var tableView = [self tableView]; - - if (tableView) - [[CPNotificationCenter defaultCenter] - postNotificationName:CPTableViewColumnDidResizeNotification - object:tableView - userInfo:[CPDictionary dictionaryWithObjects:[self, oldWidth] forKeys:[@"CPTableColumn", "CPOldWidth"]]]; -} - -- (float)width -{ - return _width; -} - -- (void)setMinWidth:(float)aMinWidth -{ - aMinWidth = +aMinWidth; - - if (_minWidth === aMinWidth) - return; - - _minWidth = aMinWidth; - - var width = [self width], - newWidth = MAX(width, [self minWidth]); - - if (width !== newWidth) - [self setWidth:newWidth]; -} - -- (float)minWidth -{ - return _minWidth; -} - -- (void)setMaxWidth:(float)aMaxWidth -{ - aMaxWidth = +aMaxWidth; - - if (_maxWidth === aMaxWidth) - return; - - _maxWidth = aMaxWidth; - - var width = [self width], - newWidth = MAX(width, [self maxWidth]); - - if (width !== newWidth) - [self setWidth:newWidth]; -} - -- (float)maxWidth -{ - return _maxWidth; -} - -- (void)setResizingMask:(unsigned)aResizingMask -{ - _resizingMask = aResizingMask; -} - -- (float)resizingMask -{ - return _resizingMask; -} - -- (void)sizeToFit -{ - var width = _CGRectGetWidth([_headerView frame]); - - if (width < [self minWidth]) - [self setMinWidth:width]; - else if (width > [self maxWidth]) - [self setMaxWidth:width] - - if (_width !== width) - [self setWidth:width]; -} - -//Setting Component Cells -- (void)setHeaderView:(CPView)aView -{ - if (!aView) - [CPException raise:CPInvalidArgumentException reason:@"Attempt to set nil header view on " + [self description]]; - - _headerView = aView; -} - -- (CPView)headerView -{ - return _headerView; -} - -- (void)setDataView:(CPView)aView -{ - if (_dataView === aView) - return; - - if (_dataView) - _dataViewData[[_dataView UID]] = nil; - - _dataView = aView; - _dataViewData[[aView UID]] = [CPKeyedArchiver archivedDataWithRootObject:aView]; -} - -- (CPView)dataView -{ - return _dataView; -} - -/* - Returns the CPView object used by the CPTableView to draw values for the receiver. - - By default, this method just calls dataView. Subclassers can override if they need to - potentially use different cells for different rows. Subclasses should expect this method - to be invoked with row equal to -1 in cases where no actual row is involved but the table - view needs to get some generic cell info. -*/ -- (id)dataViewForRow:(int)aRowIndex -{ - return [self dataView]; -} - -- (id)_newDataViewForRow:(int)aRowIndex -{ - var dataView = [self dataViewForRow:aRowIndex], - dataViewUID = [dataView UID]; - -var x = [self tableView]._cachedDataViews[dataViewUID]; -if (x && x.length) -return x.pop(); - - // if we haven't cached an archive of the data view, do it now - if (!_dataViewData[dataViewUID]) - _dataViewData[dataViewUID] = [CPKeyedArchiver archivedDataWithRootObject:dataView]; - - // unarchive the data view cache - var newDataView = [CPKeyedUnarchiver unarchiveObjectWithData:_dataViewData[dataViewUID]]; -newDataView.identifier = dataViewUID; - return newDataView; -} - -//Setting the Identifier - -/* - Sets the receiver identifier to anIdentifier. -*/ -- (void)setIdentifier:(id)anIdentifier -{ - _identifier = anIdentifier; -} - -/* - Returns the object used by the data source to identify the attribute corresponding to the receiver. -*/ -- (id)identifier -{ - return _identifier; -} - -//Controlling Editability - -/* - Controls whether the user can edit cells in the receiver by double-clicking them. -*/ -- (void)setEditable:(BOOL)shouldBeEditable -{ - _isEditable = shouldBeEditable; -} - -/* - Returns YES if the user can edit cells associated with the receiver by double-clicking the - column in the NSTableView, NO otherwise. -*/ -- (BOOL)isEditable -{ - return _isEditable; -} - -//Sorting -- (void)setSortDescriptorPrototype:(CPSortDescriptor)aSortDescriptor -{ - _sortDescriptorPrototype = aSortDescriptor; -} - -- (CPSortDescriptor)sortDescriptorPrototype -{ - return _sortDescriptorPrototype; -} - -//Setting Column Visibility - -- (void)setHidden:(BOOL)shouldBeHidden -{ - _isHidden = shouldBeHidden; -} - -- (BOOL)isHidden -{ - return _isHidden; -} - -//Setting Tool Tips - -/* - Sets the tooltip string that is displayed when the cursor pauses over the - header cell of the receiver. -*/ -- (void)setHeaderToolTip:(CPString)aToolTip -{ - _headerToolTip = aToolTip; -} - -- (CPString)headerToolTip -{ - return _headerToolTip; -} - -@end - -@implementation NEWCPTableColumn (NSInCompatibility) - -- (void)setHeaderCell:(CPView)aView -{ - [CPException raise:CPUnsupportedMethodException - reason:@"setHeaderCell: is not supported. -setHeaderCell:aView instead."]; -} - -- (CPView)headerCell -{ - [CPException raise:CPUnsupportedMethodException - reason:@"headCell is not supported. -headerView instead."]; -} - -- (void)setDataCell:(CPView)aView -{ - [CPException raise:CPUnsupportedMethodException - reason:@"setDataCell: is not supported. Use -setHeaderCell:aView instead."]; -} - -- (CPView)dataCell -{ - [CPException raise:CPUnsupportedMethodException - reason:@"dataCell is not supported. Use -dataCell instead."]; -} - -- (id)dataCellForRow:(int)row -{ - [CPException raise:CPUnsupportedMethodException - reason:@"dataCellForRow: is not supported. Use -dataViewForRow:row instead."]; -} - -@end diff --git a/AppKit/NEWCPTableView.j b/AppKit/NEWCPTableView.j deleted file mode 100644 index be330f431..000000000 --- a/AppKit/NEWCPTableView.j +++ /dev/null @@ -1,1401 +0,0 @@ - -@import - -@import "CPControl.j" -@import "CPTableColumn.j" -@import "_CPCornerView.j" -@import "CPScroller.j" - -#include "CoreGraphics/CGGeometry.h" - -var CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_ = 1 << 2, - - CPTableViewDataSource_tableView_acceptDrop_row_dropOperation_ = 1 << 3, - CPTableViewDataSource_tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_ = 1 << 4, - CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_ = 1 << 5, - CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_ = 1 << 6, - - CPTableViewDataSource_tableView_sortDescriptorsDidChange_ = 1 << 7; - -var CPTableViewDelegate_selectionShouldChangeInTableView_ = 1 << 0, - CPTableViewDelegate_tableView_dataViewForTableColumn_row_ = 1 << 1, - CPTableViewDelegate_tableView_didClickTableColumn_ = 1 << 2, - CPTableViewDelegate_tableView_didDragTableColumn_ = 1 << 3, - CPTableViewDelegate_tableView_heightOfRow_ = 1 << 4, - CPTableViewDelegate_tableView_isGroupRow_ = 1 << 5, - CPTableViewDelegate_tableView_mouseDownInHeaderOfTableColumn_ = 1 << 6, - CPTableViewDelegate_tableView_nextTypeSelectMatchFromRow_toRow_forString_ = 1 << 7, - CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_ = 1 << 8, - CPTableViewDelegate_tableView_shouldEditTableColumn_row_ = 1 << 9, - CPTableViewDelegate_tableView_shouldSelectRow_ = 1 << 10, - CPTableViewDelegate_tableView_shouldSelectTableColumn_ = 1 << 11, - CPTableViewDelegate_tableView_shouldShowViewExpansionForTableColumn_row_ = 1 << 12, - CPTableViewDelegate_tableView_shouldTrackView_forTableColumn_row_ = 1 << 13, - CPTableViewDelegate_tableView_shouldTypeSelectForEvent_withCurrentSearchString_ = 1 << 14, - CPTableViewDelegate_tableView_toolTipForView_rect_tableColumn_row_mouseLocation_ = 1 << 15, - CPTableViewDelegate_tableView_typeSelectStringForTableColumn_row_ = 1 << 16, - CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_ = 1 << 17, - CPTableViewDelegate_tableViewSelectionDidChange_ = 1 << 18, - CPTableViewDelegate_tableViewSelectionIsChanging_ = 1 << 19; - -// TODO: add docs -/* -CPTableViewSelectionHighlightStyleRegular = 0; -CPTableViewSelectionHighlightStyleSourceList = 1; -*/ - -#define NUMBER_OF_COLUMNS() (_tableColumns.length) - -@implementation _CPTableDrawView : CPView -{ - CPTableView _tableView; -} - -- (id)initWithTableView:(CPTableView)aTableView -{ - self = [super init]; - - if (self) - _tableView = aTableView; - - return self; -} - -- (void)drawRect:(CGRect)aRect -{ - var frame = [self frame], - context = [[CPGraphicsContext currentContext] graphicsPort]; - - CGContextTranslateCTM(context, -_CGRectGetMinX(frame), -_CGRectGetMinY(frame)); - - [_tableView _drawRect:aRect]; -} - -@end - -@implementation NEWCPTableView : CPControl -{ - id _dataSource; - CPInteger _implementedDataSourceMethods; - - id _delegate; - CPInteger _implementedDelegateMethods; - - CPArray _tableColumns; - CPArray _tableColumnRanges; - CPInteger _dirtyTableColumnRangeIndex; - CPInteger _numberOfHiddenColumns; - - Object _objectValues; - CPRange _exposedRows; - CPIndexSet _exposedColumns; - - Object _dataViewsForTableColumns; - Object _cachedDataViews; - - //Configuring Behavior - BOOL _allowsColumnReordering; - BOOL _allowsColumnResizing; - BOOL _allowsMultipleSelection; - BOOL _allowsEmptySelection; - - //Setting Display Attributes - CGSize _intercellSpacing; - float _rowHeight; - BOOL _usesAlternatingRowBackgroundColors; - unsigned _selectionHighlightMask; - unsigned _currentHighlightedTableColumn; - - unsigned _numberOfRows; - - - CPTableHeaderView _headerView; - _CPCornerView _cornerView; - - CPIndexSet _selectedColumnIndexes; - CPIndexSet _selectedRowIndexes; - CPInteger _selectionStartRow; - - _CPTableDrawView _tableDrawView; -} - -- (id)initWithFrame:(CGRect)aFrame -{ - self = [super initWithFrame:aFrame]; - - if (self) - { - //Configuring Behavior - _allowsColumnReordering = YES; - _allowsColumnResizing = YES; - _allowsMultipleSelection = NO; - _allowsEmptySelection = YES; - _allowsColumnSelection = NO; - - _tableViewFlags = 0; - - //Setting Display Attributes -// _selectionHighlightMask = CPTableViewSelectionHighlightStyleRegular; - - _tableColumns = []; - _tableColumnRanges = []; - _dirtyTableColumnRangeIndex = CPNotFound; - _numberOfHiddenColumns = 0; - - _objectValues = { }; - _dataViewsForTableColumns = { }; - _dataViews= []; - _numberOfRows = 0; - _exposedRows = [CPIndexSet indexSet]; - _exposedColumns = [CPIndexSet indexSet]; - _cachedDataViews = { }; - _intercellSpacing = _CGSizeMake(0.0, 0.0); - _rowHeight = 24.0; - - _headerView = [[CPTableHeaderView alloc] initWithFrame:CGRectMake(0, 0, [self bounds].size.width, _rowHeight)]; - - [_headerView setTableView:self]; - - _cornerView = [[_CPCornerView alloc] initWithFrame:CGRectMake(0, 0, [CPScroller scrollerWidth], CGRectGetHeight([_headerView frame]))]; - - _selectedColumnIndexes = [CPIndexSet indexSet]; - _selectedRowIndexes = [CPIndexSet indexSet]; - - _tableDrawView = [[_CPTableDrawView alloc] initWithTableView:self]; - [_tableDrawView setBackgroundColor:[CPColor yellowColor]]; - [self addSubview:_tableDrawView]; - } - - return self; -} - -- (void)setDataSource:(id)aDataSource -{ - if (_dataSource === aDataSource) - return; - - _dataSource = aDataSource; - _implementedDataSourceMethods = 0; - - if (!_dataSource) - return; - - if (![_dataSource respondsToSelector:@selector(numberOfRowsInTableView:)]) - [CPException raise:CPInternalInconsistencyException - reason:[aDataSource description] + " does not implement numberOfRowsInTableView:."]; - - if (![_dataSource respondsToSelector:@selector(tableView:objectValueForTableColumn:row:)]) - [CPException raise:CPInternalInconsistencyException - reason:[aDataSource description] + " does not implement tableView:objectValueForTableColumn:row:"]; - - if ([_dataSource respondsToSelector:@selector(tableView:setObjectValue:forTableColumn:row:)]) - _implementedDataSourceMethods |= CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_; - - if ([_dataSource respondsToSelector:@selector(tableView:setObjectValue:forTableColumn:row:)]) - _implementedDataSourceMethods |= CPTableViewDataSource_tableView_acceptDrop_row_dropOperation_; - - if ([_dataSource respondsToSelector:@selector(tableView:namesOfPromisedFilesDroppedAtDestination:forDraggedRowsWithIndexes:)]) - _implementedDataSourceMethods |= CPTableViewDataSource_tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_; - - if ([_dataSource respondsToSelector:@selector(tableView:validateDrop:proposedRow:proposedDropOperation:)]) - _implementedDataSourceMethods |= CPTableViewDataSource_tableView_validateDrop_proposedRow_proposedDropOperation_; - - if ([_dataSource respondsToSelector:@selector(tableView:writeRowsWithIndexes:toPasteboard:)]) - _implementedDataSourceMethods |= CPTableViewDataSource_tableView_writeRowsWithIndexes_toPasteboard_; - - [self reloadData]; -} - -- (id)dataSource -{ - return _dataSource; -} - -//Loading Data - -- (void)reloadData -{ - if (!_dataSource) - return; - - _objectValues = { }; - [self noteNumberOfRowsChanged]; -[self _sizeToParent]; - [self layoutSubviews]; -} - -//Target-action Behavior - -- (void)setDoubleAction:(SEL)anAction -{ - _doubleAction = anAction; -} - -- (SEL)doubleAction -{ - return _doubleAction; -} - -/* - * - clickedColumn - * - clickedRow -*/ -//Configuring Behavior - -- (void)setAllowsColumnReordering:(BOOL)shouldAllowColumnReordering -{ - _allowsColumnReordering = !!shouldAllowColumnReordering; -} - -- (BOOL)allowsColumnReordering -{ - return _allowsColumnReordering; -} - -- (void)setAllowsColumnResizing:(BOOL)shouldAllowColumnResizing -{ - _allowsColumnResizing = !!shouldAllowColumnResizing; -} - -- (BOOL)allowsColumnResizing -{ - return _allowsColumnResizing; -} - -- (void)setAllowsMultipleSelection:(BOOL)shouldAllowMultipleSelection -{ - _allowsMultipleSelection = !!shouldAllowMultipleSelection; -} - -- (BOOL)allowsMultipleSelection -{ - return _allowsMultipleSelection; -} - -- (void)setAllowsEmptySelection:(BOOL)shouldAllowEmptySelection -{ - _allowsEmptySelection = !!shouldAllowEmptySelection; -} - -- (BOOL)allowsEmptySelection -{ - return _allowsEmptySelection; -} - -- (void)setAllowsColumnSelection:(BOOL)shouldAllowColumnSelection -{ - _allowsColumnSelection = !!shouldAllowColumnSelection; -} - -- (BOOL)allowsColumnSelection -{ - return _allowsColumnSelection; -} - -//Setting Display Attributes - -- (void)setIntercellSpacing:(CGSize)aSize -{ - if (_CGSizeEqualToSize(_intercellSpacing, aSize)) - return; - - _intercellSpacing = _CGSizeMakeCopy(aSize); - - [self setNeedsLayout]; -} - -- (void)setThemeState:(int)astae -{ -} - -- (CGSize)intercellSpacing -{ - return _CGSizeMakeCopy(_intercellSpacing); -} - -- (void)setRowHeight:(unsigned)aRowHeight -{ - aRowHeight = +aRowHeight; - - if (_rowHeight === aRowHeight) - return; - - _rowHeight = aRowHeight; - - [self setNeedsLayout]; -} - -- (unsigned)rowHeight -{ - return _rowHeight; -} -/* -- (void)setUsesAlternatingRowBackgroundColors:(BOOL)shouldUseAlternatingRowBackgroundColors -{ - // TODO:need to look at how one actually sets the alternating row, a tip at: - // http://forums.macnn.com/79/developer-center/228347/nstableview-alternating-row-colors/ - // otherwise this may not be feasible or may introduce an additional change req'd in CP - // we'd probably need to iterate through rowId % 2 == 0 and setBackgroundColor with - // whatever the alternating row color is. - _usesAlternatingRowBackgroundColors = shouldUseAlternatingRowBackgroundColors; -} - -- (BOOL)usesAlternatingRowBackgroundColors -{ - return _usesAlternatingRowBackgroundColors; -} - -- (unsigned)selectionHighlightStyle -{ - return _selectionHighlightMask; -} - -- (void)setSelectionHighlightStyle:(unsigned)aSelectionHighlightStyle -{ - _selectionHighlightMask = aSelectionHighlightStyle; -} - -- setGridColor: - - - * - gridColor - * - setGridStyleMask: - * - gridStyleMask - * - indicatorImageInTableColumn: - * - setIndicatorImage:inTableColumn: -*/ -//Column Management - -- (void)addTableColumn:(CPTableColumn)aTableColumn -{ - [_tableColumns addObject:aTableColumn]; - [aTableColumn setTableView:self]; - - if (_dirtyTableColumnRangeIndex < 0) - _dirtyTableColumnRangeIndex = NUMBER_OF_COLUMNS() - 1; - else - _dirtyTableColumnRangeIndex = MIN(NUMBER_OF_COLUMNS() - 1, _dirtyTableColumnRangeIndex); - - [self setNeedsLayout]; -} - -- (void)removeTableColumn:(CPTableColumn)aTableColumn -{ - if ([aTableColumn tableView] !== self) - return; - - var index = [_tableColumns indeOfObjectIdenticalTo:aTableColumn]; - - if (index === CPNotFound) - return; - - [aTableColumn setTableView:nil]; - [_tableColumns removeObjectAtIndex:index]; - - var tableColumnUID = [aTableColumn UID]; - - if (_objectValues[tableColumnUID]) - _objectValues[tableColumnUID] = nil; - - if (_dirtyTableColumnRangeIndex < 0) - _dirtyTableColumnRangeIndex = index; - else - _dirtyTableColumnRangeIndex = MIN(index, _dirtyTableColumnRangeIndex); - - [self setNeedsLayout]; -} - -- (void)moveColumn:(unsigned)fromIndex toColumn:(unsigned)toIndex -{ - fromIndex = +fromIndex; - toIndex = +toIndex; - - if (fromIndex === toIndex) - return; - - if (_dirtyTableColumnRangeIndex < 0) - _dirtyTableColumnRangeIndex = MIN(fromIndex, toIndex); - else - _dirtyTableColumnRangeIndex = MIN(fromIndex, toIndex, _dirtyTableColumnRangeIndex); - - if (toIndex > fromIndex) - --toIndex; - - var tableColumn = _tableColumns[fromIndex]; - - [_tableColumns removeObjectAtIndex:fromIndex]; - [_tableColumns insertObject:tableColumn atIndex:toIndex]; - - [self setNeedsLayout]; -} - -- (CPArray)tableColumns -{ - return _tableColumns; -} - -- (CPInteger)columnWithIdentifier:(CPString)anIdentifier -{ - var index = 0, - count = NUMBER_OF_COLUMNS(); - - for (; index < count; ++index) - if ([_tableColumns identifier] === anIdentifier) - return index; - - return CPNotFound; -} - -- (CPTableColumn)tableColumnWithIdentifier:(CPString)anIdentifier -{ - var index = [self columnWithIdentifier:anIdentifier]; - - if (index === CPNotFound) - return nil; - - return _tableColumns[index]; -} - -//Selecting Columns and Rows -- (void)selectColumnIndexes:(CPIndexSet)columns byExtendingSelection:(BOOL)shouldExtendSelection -{ - // We deselect all columns when selecting rows. - _selectedRowIndexes = [CPIndexSet indexSet]; - - if (shouldExtendSelection) - [_selectedColumnIndexes addIndexes:columns]; - else - _selectedColumnIndexes = [columns copy]; - - [self setNeedsLayout]; -} - -- (void)selectRowIndexes:(CPIndexSet)rows byExtendingSelection:(BOOL)shouldExtendSelection -{ - // We deselect all rows when selecting columns. - _selectedColumnIndexes = [CPIndexSet indexSet]; - - if (shouldExtendSelection) - [_selectedRowIndexes addIndexes:rows]; - else - _selectedRowIndexes = [rows copy]; - - [self setNeedsLayout]; -} - -- (CPIndexSet)selectedColumnIndexes -{ - return _selectedColumnIndexes; -} - -- (void)selectedRowIndexes -{ - return _selectedRowIndexes; -} - -- (void)deselectColumn:(CPInteger)aColumn -{ - [_selectedColumnIndexes removeIndex:aColumn]; -} - -- (void)deselectRow:(CPInteger)aRow -{ - [_selectedRowIndexes removeIndex:aRow]; -} - -- (CPInteger)numberOfSelectedColumns -{ - return [_selectedColumnIndexes count]; -} - -- (CPInteger)numberOfSelectedRows -{ - return [_selectedRowIndexes count]; -} - -/* -- (CPInteger)selectedColumn - * - selectedRow -*/ - -- (BOOL)isColumnSelected:(CPInteger)aColumn -{ - return [_selectedColumnIndexes containsIndex:aColumn]; -} - -- (BOOL)isRowSelected:(CPInteger)aRow -{ - return [_selectedRowIndexes containsIndex:aRow]; -} -/* -- (void)selectAll: - * - deselectAll: - * - allowsTypeSelect - * - setAllowsTypeSelect: -*/ -//Table Dimensions - -- (int)numberOfColumns -{ - return NUMBER_OF_COLUMNS(); -} - -/* - Returns the number of rows in the receiver. -*/ -- (int)numberOfRows -{ - if (!_dataSource) - return 0; - - return [_dataSource numberOfRowsInTableView:self]; -} - -//Displaying Cell -/* - * - preparedCellAtColumn:row: -*/ -//Editing Cells -/* - * - editColumn:row:withEvent:select: - * - editedColumn - * - editedRow -*/ -//Setting Auxiliary Views -/* - * - setHeaderView: - * - headerView - * - setCornerView: - * - cornerView -*/ - -- (CPView)cornerView -{ - return _cornerView; -} - -- (void)setCornerView:(CPView)aView -{ - _cornerView = aView; -} - -- (CPView)headerView -{ - return _headerView; -} - -- (void)setHeaderView:(CPView)aHeaderView -{ - _headerView = aHeaderView; - [_headerView setTableView:self]; -} - -//Layout Support - -// Complexity: -// O(Columns) -- (void)_recalculateTableColumnRanges -{ - if (_dirtyTableColumnRangeIndex < 0) - return; - - var index = _dirtyTableColumnRangeIndex, - count = NUMBER_OF_COLUMNS(), - x = index === 0 ? 0.0 : CPMaxRange(_tableColumnRanges[index - 1]); - - for (; index < count; ++index) - { - var tableColumn = _tableColumns[index]; - - if ([tableColumn isHidden]) - _tableColumnRanges[index] = CPMakeRange(x, 0.0); - - else - { - var width = [_tableColumns[index] width]; - - _tableColumnRanges[index] = CPMakeRange(x, width); - - x += width; - } - } - - _tableColumnRanges.length = count; - _dirtyTableColumnRangeIndex = CPNotFound; -} - -// Complexity: -// O(1) -- (CGRect)rectOfColumn:(CPInteger)aColumnIndex -{ - aColumnIndex = +aColumnIndex; - - if (aColumnIndex < 0 || aColumnIndex >= NUMBER_OF_COLUMNS()) - return _CGRectMakeZero(); - - if (_dirtyTableColumnRangeIndex !== CPNotFound) - [self _recalculateTableColumnRanges]; - - var range = _tableColumnRanges[aColumnIndex]; - - return _CGRectMake(range.location, 0.0, range.length, CGRectGetHeight([self bounds])); -} - -- (CGRect)rectOfRow:(CPInteger)aRowIndex -{ - if (NO) - return NULL; - - // FIXME: WRONG: ASK TABLE COLUMN RANGE - return _CGRectMake(0.0, (aRowIndex * (_rowHeight + _intercellSpacing.height)), _CGRectGetWidth([self bounds]), _rowHeight); -} - -// Complexity: -// O(1) -- (CPRange)rowsInRect:(CGRect)aRect -{ - var bounds = nil, - firstRow = [self rowAtPoint:aRect.origin], - lastRow = [self rowAtPoint:_CGPointMake(0.0, _CGRectGetMaxY(aRect))]; - - if (firstRow < 0) - { - bounds = [self bounds]; - - if (_CGRectGetMinY(aRect) < _CGRectGetMinY(bounds)) - firstRow = 0; - else - firstRow = _numberOfRows - 1; - } - - if (lastRow < 0) - { - if (!bounds) - bounds = [self bounds]; - - if (_CGRectGetMaxY(aRect) < _CGRectGetMinY(bounds)) - lastRow = 0; - else - lastRow = _numberOfRows - 1; - } - - return CPMakeRange(firstRow, lastRow - firstRow + 1); -} - -// Complexity: -// O(lg Columns) if table view contains no hidden columns -// O(Columns) if table view contains hidden columns -- (CPIndexSet)columnIndexesInRect:(CGRect)aRect -{ - var column = MAX(0, [self columnAtPoint:_CGPointMake(aRect.origin.x, 0.0)]), - lastColumn = [self columnAtPoint:_CGPointMake(_CGRectGetMaxX(aRect), 0.0)]; - - if (lastColumn === CPNotFound) - lastColumn = NUMBER_OF_COLUMNS() - 1; - - // Don't bother doing the expensive removal of hidden indexes if we have no hidden columns. - if (_numberOfHiddenColumns <= 0) - return [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(column, lastColumn - column + 1)]; - - // - var indexSet = [CPIndexSet indexSet]; - - for (; column <= lastColumn; ++column) - { - var tableColumn = _tableColumns[column]; - - if (![tableColumn isHidden]) - [indexSet addIndex:column]; - } - - return indexSet; -} - -// Complexity: -// O(lg Columns) if table view contains now hidden columns -// O(Columns) if table view contains hidden columns -- (CPInteger)columnAtPoint:(CGPoint)aPoint -{ - var bounds = [self bounds]; - - if (!_CGRectContainsPoint(bounds, aPoint)) - return CPNotFound; - - if (_dirtyTableColumnRangeIndex !== CPNotFound) - [self _recalculateTableColumnRanges]; - - var x = aPoint.x, - low = 0, - high = _tableColumnRanges.length - 1; - - while (low <= high) - { - var middle = FLOOR(low + (high - low) / 2), - range = _tableColumnRanges[middle]; - - if (x < range.location) - high = middle - 1; - - else if (x >= CPMaxRange(range)) - low = middle + 1; - - else - { - var numberOfColumns = _tableColumnRanges.length; - - while (middle < numberOfColumns && [_tableColumns[middle] isHidden]) - ++middle; - - if (middle < numberOfColumns) - return middle; - - return CPNotFound; - } - } - - return CPNotFound; -} - -- (CPInteger)rowAtPoint:(CGPoint)aPoint -{ - var y = aPoint.y; - - if (NO) - { - } - - return FLOOR(y / (_rowHeight + _intercellSpacing.height)); -} - -- (CGRect)frameOfDataViewAtColumn:(CPInteger)aColumnIndex row:(CPInteger)aRowIndex -{ - var tableColumnRange = _tableColumns[aColumnIndex], - rectOfRow = [self rectOfRow:aRowIndex]; - - return _CGRectMake(tableColumnRange.location, _CGRectGetMinY(rectOfRow), tableColumnRange.length, _CGRectGetHeight(rectOfRow)); -} -/* - * - columnAutoresizingStyle - * - setColumnAutoresizingStyle: -*/ -- (void)sizeLastColumnToFit -{ - var superview = [self superview]; - - if (!superview) - return; - - var superviewSize = [superview bounds].size; - - if (_dirtyTableColumnRangeIndex !== CPNotFound) - [self _recalculateTableColumnRanges]; - - var count = NUMBER_OF_COLUMNS(); - - while (count-- && [_tableColumns[count] isHidden]) ; - - if (count >= 0) - { - var difference = superviewSize.width - CPMaxRange(_tableColumnRanges[count]), - tableColumn = _tableColumns[count]; - - [tableColumn setWidth:MAX(0.0, [tableColumn width] + difference)]; - } - - [self setNeedsLayout]; -} - -- (void)noteNumberOfRowsChanged -{ - _numberOfRows = [_dataSource numberOfRowsInTableView:self]; - - [self setNeedsLayout]; -} -/* - * - tile - * - sizeToFit - * - noteHeightOfRowsWithIndexesChanged: -*/ -//Scrolling -/* - * - scrollRowToVisible: - * - scrollColumnToVisible: -*/ -//Persistence -/* - * - autosaveName - * - autosaveTableColumns - * - setAutosaveName: - * - setAutosaveTableColumns: -*/ - -- (void)_sizeToParent -{ - var superviewSize = [[self superview] bounds].size; - - if (_dirtyTableColumnRangeIndex !== CPNotFound) - [self _recalculateTableColumnRanges]; - - if (_tableColumnRanges.length > 0) - var naturalWidth = CPMaxRange([_tableColumnRanges lastObject]); - - else - var naturalWidth = 0.0; - - [self setFrameSize:_CGSizeMake( MAX(superviewSize.width, naturalWidth), - MAX(superviewSize.height, (_rowHeight + _intercellSpacing.height) * _numberOfRows))]; -} - -//Setting the Delegate:(id)aDelegate - -- (void)setDelegate:(id)aDelegate -{ - if (_delegate === aDelegate) - return; - - var defaultCenter = [CPNotificationCenter defaultCenter]; - - if (_delegate) - { - if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewColumnDidMoveNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewColumnDidResizeNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewSelectionDidChangeNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewSelectionIsChangingNotification - object:self]; - } - - _delegate = aDelegate; - _implementedDelegateMethods = 0; - - if ([_delegate respondsToSelector:@selector(selectionShouldChangeInTableView:)]) - _implementedDelegateMethods |= CPTableViewDelegate_selectionShouldChangeInTableView_; - - if ([_delegate respondsToSelector:@selector(tableView:dataViewForTableColumn:row:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_dataViewForTableColumn_row_; - - if ([_delegate respondsToSelector:@selector(tableView:didClickTableColumn:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_didClickTableColumn_; - - if ([_delegate respondsToSelector:@selector(tableView:didDragTableColumn:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_didDragTableColumn_; - - if ([_delegate respondsToSelector:@selector(tableView:heightOfRow:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_heightOfRow_; - - if ([_delegate respondsToSelector:@selector(tableView:isGroupRow:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_isGroupRow_; - - if ([_delegate respondsToSelector:@selector(tableView:mouseDownInHeaderOfTableColumn:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_mouseDownInHeaderOfTableColumn_; - - if ([_delegate respondsToSelector:@selector(tableView:nextTypeSelectMatchFromRow:toRow:forString:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_nextTypeSelectMatchFromRow_toRow_forString_; - - if ([_delegate respondsToSelector:@selector(tableView:selectionIndexesForProposedSelection:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_; - - if ([_delegate respondsToSelector:@selector(tableView:shouldEditTableColumn:row:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldEditTableColumn_row_; - - if ([_delegate respondsToSelector:@selector(tableView:shouldSelectRow:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldSelectRow_; - - if ([_delegate respondsToSelector:@selector(tableView:shouldSelectTableColumn:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldSelectTableColumn_; - - if ([_delegate respondsToSelector:@selector(tableView:shouldShowViewExpansionForTableColumn:row:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldShowViewExpansionForTableColumn_row_; - - if ([_delegate respondsToSelector:@selector(tableView:shouldTrackView:forTableColumn:row:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldTrackView_forTableColumn_row_; - - if ([_delegate respondsToSelector:@selector(tableView:shouldTypeSelectForEvent:withCurrentSearchString:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldTypeSelectForEvent_withCurrentSearchString_; - - if ([_delegate respondsToSelector:@selector(tableView:toolTipForView:rect:tableColumn:row:mouseLocation:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_toolTipForView_rect_tableColumn_row_mouseLocation_; - - if ([_delegate respondsToSelector:@selector(tableView:typeSelectStringForTableColumn:row:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_typeSelectStringForTableColumn_row_; - - if ([_delegate respondsToSelector:@selector(tableView:willDisplayView:forTableColumn:row:)]) - _implementedDelegateMethods |= CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_; - - if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewColumnDidMove:) - name:CPTableViewColumnDidMoveNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewColumnDidMove:) - name:CPTableViewColumnDidResizeNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewSelectionDidChange:) - name:CPTableViewSelectionDidChangeNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewSelectionIsChanging:) - name:CPTableViewSelectionIsChangingNotification - object:self]; -} - -- (id)delegate -{ - return _delegate; -} - -//Highlightable Column Headers -/* -- (CPTableColumn)highlightedTableColumn -{ - -} - - * - setHighlightedTableColumn: -*/ -//Dragging -/* - * - dragImageForRowsWithIndexes:tableColumns:event:offset: - * - canDragRowsWithIndexes:atPoint: - * - setDraggingSourceOperationMask:forLocal: - * - setDropRow:dropOperation: - * - setVerticalMotionCanBeginDrag: - * - verticalMotionCanBeginDrag -*/ -//Sorting -/* - * - setSortDescriptors: - * - sortDescriptors -*/ - -//Text Delegate Methods -/* - * - textShouldBeginEditing: - * - textDidBeginEditing: - * - textDidChange: - * - textShouldEndEditing: - * - textDidEndEditing: -*/ - -- (id)_objectValueForTableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRowIndex -{ - var tableColumnUID = [aTableColumn UID], - tableColumnObjectValues = _objectValues[tableColumnUID]; - - if (!tableColumnObjectValues) - { - tableColumnObjectValues = []; - _objectValues[tableColumnUID] = tableColumnObjectValues; - } - - var objectValue = tableColumnObjectValues[aRowIndex]; - - if (objectValue === undefined) - { - objectValue = [_dataSource tableView:self objectValueForTableColumn:aTableColumn row:aRowIndex]; - tableColumnObjectValues[aRowIndex] = objectValue; - } - - 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 (!_dataSource) - { - // remove? - return; - } - -// if (!window.blah) -// return window.setTimeout(function() { window.blah = true; [self load]; window.blah = false}, 0.0); - - if (window.console && window.console.profile) - console.profile("cell-load"); - - var exposedRect = [self _exposedRect], - exposedRows = [CPIndexSet indexSetWithIndexesInRange:[self rowsInRect:exposedRect]], - exposedColumns = [self columnIndexesInRect:exposedRect], - obscuredRows = [_exposedRows copy], - obscuredColumns = [_exposedColumns copy]; - - [obscuredRows removeIndexes:exposedRows]; - [obscuredColumns removeIndexes:exposedColumns]; - - var newlyExposedRows = [exposedRows copy], - newlyExposedColumns = [exposedColumns copy]; - - [newlyExposedRows removeIndexes:_exposedRows]; - [newlyExposedColumns removeIndexes:_exposedColumns]; - - var previouslyExposedRows = [exposedRows copy], - previouslyExposedColumns = [exposedColumns copy]; - - [previouslyExposedRows removeIndexes:newlyExposedRows]; - [previouslyExposedColumns removeIndexes:newlyExposedColumns]; - -// console.log("will remove:" + '\n\n' + -// previouslyExposedRows + "\n" + obscuredColumns + "\n\n" + -// obscuredRows + "\n" + previouslyExposedColumns + "\n\n" + -// obscuredRows + "\n" + obscuredColumns); - [self _unloadDataViewsInRows:previouslyExposedRows columns:obscuredColumns]; - [self _unloadDataViewsInRows:obscuredRows columns:previouslyExposedColumns]; - [self _unloadDataViewsInRows:obscuredRows columns:obscuredColumns]; - - [self _loadDataViewsInRows:previouslyExposedRows columns:newlyExposedColumns]; - [self _loadDataViewsInRows:newlyExposedRows columns:previouslyExposedColumns]; - [self _loadDataViewsInRows:newlyExposedRows columns:newlyExposedColumns]; - -// console.log("newly exposed rows: " + newlyExposedRows + "\nnewly exposed columns: " + newlyExposedColumns); - _exposedRows = exposedRows; - _exposedColumns = exposedColumns; - - [_tableDrawView setFrame:exposedRect]; -// [_tableDrawView setBounds:exposedRect]; - [_tableDrawView display]; - - if (window.console && window.console.profile) - console.profileEnd("cell-load"); -} - -- (void)_unloadDataViewsInRows:(CPIndexSet)rows columns:(CPIndexSet)columns -{ - if (![rows count] || ![columns count]) - return; - - var rowArray = [], - columnArray = []; - - [rows getIndexes:rowArray maxCount:-1 inIndexRange:nil]; - [columns getIndexes:columnArray maxCount:-1 inIndexRange:nil]; - - var columnIndex = 0, - columnsCount = columnArray.length; - - for (; columnIndex < columnsCount; ++columnIndex) - { - var column = columnArray[columnIndex], - tableColumn = _tableColumns[column], - tableColumnUID = [tableColumn UID]; - - var rowIndex = 0, - rowsCount = rowArray.length; - - for (; rowIndex < rowsCount; ++rowIndex) - { - var row = rowArray[rowIndex], - dataView = _dataViewsForTableColumns[tableColumnUID][row]; - - _dataViewsForTableColumns[tableColumnUID][row] = nil; -if (!_cachedDataViews[dataView.identifier]) -_cachedDataViews[dataView.identifier] = [dataView]; -else -_cachedDataViews[dataView.identifier].push(dataView); - } - } -} - -- (void)_loadDataViewsInRows:(CPIndexSet)rows columns:(CPIndexSet)columns -{ - if (![rows count] || ![columns count]) - return; - - var rowArray = [], - rowRects = [], - columnArray = []; - - [rows getIndexes:rowArray maxCount:-1 inIndexRange:nil]; - [columns getIndexes:columnArray maxCount:-1 inIndexRange:nil]; - - var columnIndex = 0, - columnsCount = columnArray.length; - - for (; columnIndex < columnsCount; ++columnIndex) - { - var column = columnArray[columnIndex], - tableColumn = _tableColumns[column], - tableColumnUID = [tableColumn UID], - tableColumnRange = _tableColumnRanges[column]; - - if (!_dataViewsForTableColumns[tableColumnUID]) - _dataViewsForTableColumns[tableColumnUID] = []; - - var rowIndex = 0, - rowsCount = rowArray.length; - - for (; rowIndex < rowsCount; ++rowIndex) - { - var row = rowArray[rowIndex], - dataView = [tableColumn _newDataViewForRow:row], - rectOfRow = rowRects[row]; - - if (!rectOfRow) - rectOfRow = rowRects[row] = [self rectOfRow:row]; - - [dataView setFrame:_CGRectMake(tableColumnRange.location, _CGRectGetMinY(rectOfRow), tableColumnRange.length, _CGRectGetHeight(rectOfRow))]; - [dataView setObjectValue:[self _objectValueForTableColumn:tableColumn row:row]]; - - if ([dataView superview] !== self) - [self addSubview:dataView]; - - _dataViewsForTableColumns[tableColumnUID][row] = dataView; - } - } -} - -- (void)setFrameSize:(CGSize)aSize -{ - [super setFrameSize:aSize]; - [_headerView setFrameSize:CGSizeMake(aSize.width, [_headerView frame].size.height)]; -} - -- (void)_drawRect:(CGRect)aRect -{ - [self highlightSelectionInClipRect:[self _exposedRect]]; -} - -- (void)highlightSelectionInClipRect:(CGRect)aRect -{ - [[CPColor greenColor] set]; - - var context = [[CPGraphicsContext currentContext] graphicsPort]; - - if ([_selectedRowIndexes count] >= 1) - { - var exposedRows = [CPIndexSet indexSetWithIndexesInRange:[self rowsInRect:aRect]], - exposedRange = CPMakeRange([exposedRows firstIndex], [exposedRows lastIndex] - [exposedRows firstIndex] + 1), - rowArray = []; - - [_selectedRowIndexes getIndexes:rowArray maxCount:-1 inIndexRange:exposedRange]; - - var rowArrayIndex = 0, - rowArrayCount = rowArray.length; - - for (; rowArrayIndex < rowArrayCount; ++rowArrayIndex) - CGContextFillRect(context, [self rectOfRow:rowArray[rowArrayIndex]]); - } - else - { - - } -} - -- (void)layoutSubviews -{ - [self load]; -} - -- (void)viewWillMoveToSuperview:(CPView)aView -{ - var superview = [self superview], - defaultCenter = [CPNotificationCenter defaultCenter]; - - if (superview) - { - [defaultCenter - removeObserver:self - name:CPViewFrameDidChangeNotification - object:superview]; - - [defaultCenter - removeObserver:self - name:CPViewBoundsDidChangeNotification - object:superview]; - } - - if (aView) - { - [aView setPostsFrameChangedNotifications:YES]; - [aView setPostsBoundsChangedNotifications:YES]; - - [defaultCenter - addObserver:self - selector:@selector(superviewFrameChanged:) - name:CPViewFrameDidChangeNotification - object:aView]; - - [defaultCenter - addObserver:self - selector:@selector(superviewBoundsChanged:) - name:CPViewBoundsDidChangeNotification - object:aView]; - } -} - -- (void)superviewBoundsChanged:(CPNotification)aNotification -{ - [self setNeedsLayout]; -} - -- (void)superviewFrameChanged:(CPNotification)aNotification -{ -} - -// - -/* - var type = [anEvent type], - point = [self convertPoint:[anEvent locationInWindow] fromView:nil], - currentRow = MAX(0, MIN(_numberOfRows-1, [self _rowAtY:point.y])); - -*/ - -- (BOOL)startTrackingAt:(CGPoint)aPoint -{ - var row = [self rowAtPoint:aPoint]; - - if ([self mouseDownFlags] & CPShiftKeyMask) - _selectionAnchor = (ABS([_selectedRowIndexes firstIndex] - row) < ABS([_selectedRowIndexes lastIndex] - row)) ? - [_selectedRowIndexes firstIndex] : [_selectedRowIndexes lastIndex]; - else - _selectionAnchor = row; - - [self _updateSelectionWithMouseAtRow:row]; - - return YES; -} - -- (BOOL)continueTracking:(CGPoint)lastPoint at:(CGPoint)aPoint -{ - [self _updateSelectionWithMouseAtRow:[self rowAtPoint:aPoint]]; - - return YES; -} - -- (void)stopTracking:(CGPoint)lastPoint at:(CGPoint)aPoint mouseIsUp:(BOOL)mouseIsUp -{/* - _clickedRow = [self rowAtPoint:point]; - _clickedColumn = [self columnAtPoint:point]; - - if ([anEvent clickCount] === 2) - { - CPLog.warn("edit?!"); - - [self sendAction:_doubleAction to:_target]; - } - else - { - if (![_previousSelectedRowIndexes isEqualToIndexSet:_selectedRowIndexes]) - { - [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]; - } - - [self sendAction:_action to:_target]; - } -*/ -} - -- (void)_updateSelectionWithMouseAtRow:(CPInteger)aRow -{ - // If cmd/ctrl was held down XOR the old selection with the proposed selection - if ([self mouseDownFlags] & (CPCommandKeyMask | CPControlKeyMask | CPAlternateKeyMask)) - { - if ([_selectedRowIndexes containsIndex:aRow]) - { - newSelection = [_selectedRowIndexes copy]; - - [newSelection removeIndex:aRow]; - } - - else if (_allowsMultipleSelection) - { - newSelection = [_selectedRowIndexes copy]; - - [newSelection addIndex:aRow]; - } - - else - newSelection = [CPIndexSet indexSetWithIndex:aRow]; - } - - else if (_allowsMultipleSelection) - newSelection = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(MIN(aRow, _selectionStartRow), ABS(aRow - _selectionStartRow) + 1)]; - - else if (aRow >= 0 && aRow < _numberOfRows) - newSelection = [CPIndexSet indexSetWithIndex:aRow]; - - else - newSelection = [CPIndexSet indexSet]; - - if ([newSelection isEqualToIndexSet:_selectedRowIndexes]) - return; - - if (_implementedDelegateMethods & CPTableViewDelegate_selectionShouldChangeInTableView_ && - ![_delegate selectionShouldChangeInTableView:self]) - return; - - if (_implementedDelegateMethods & CPTableViewDelegate_tableView_selectionIndexesForProposedSelection_) - newSelection = [_delegate tableView:self selectionIndexesForProposedSelection:newSelection]; - - if (_implementedDelegateMethods & CPTableViewDelegate_tableView_shouldSelectRow_) - { - var indexArray = []; - - [newSelection getIndexes:indexArray maxCount:-1 inIndexRange:nil]; - - var indexCount = indexArray.length; - - while (indexCount--) - { - var index = indexArray[indexCount]; - - if (![_delegate tableView:self shouldSelectRow:index]) - [newSelection removeIndex:index]; - } - } - - // if empty selection is not allowed and the new selection has nothing selected, abort - if (!_allowsEmptySelection && [newSelection count] === 0) - return; - - if ([newSelection isEqualToIndexSet:_selectedRowIndexes]) - return; - - [self selectRowIndexes:newSelection byExtendingSelection:NO]; - - [[CPNotificationCenter defaultCenter] - postNotificationName:CPTableViewSelectionIsChangingNotification - object:self - userInfo:nil]; -} - -@end diff --git a/AppKit/OLDCPTableColumn.j b/AppKit/OLDCPTableColumn.j new file mode 100644 index 000000000..6d37c1de9 --- /dev/null +++ b/AppKit/OLDCPTableColumn.j @@ -0,0 +1,471 @@ +/* + * CPTableColumn.j + * AppKit + * + * Created by Francisco Tolmasky. + * Copyright 2008, 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 + + +/* +@ignore +*/ + +/* + @global + @class CPTableColumn +*/ +CPTableColumnNoResizing = 0; +/* + @global + @class CPTableColumn +*/ +CPTableColumnAutoresizingMask = 1; +/* + @global + @class CPTableColumn +*/ +CPTableColumnUserResizingMask = 2; + +#define PurgableInfoMake(aView, aRow) { view:(aView), row:(aRow) } +#define PurgableInfoView(anInfo) ((anInfo).view) +#define PurgableInfoRow(anInfo) ((anInfo).row) + +/*! + @ingroup appkit + @class CPTableColumn + + An CPTableColumn object mainly keeps information about the width of the column, its minimum and maximum width; whether the column can be edited or resized; and the cells used to draw the column header and the data in the column. You can change all these attributes of the column by calling the appropriate methods. Please note that the table column does not hold nor has access to the data to be displayed in the column; this data is maintained in the table view's data source.

+ +

Each CPTableColumn object is identified by a CPString, called the column identifier. The reason is that, after a column has been added to a table view, the user might move the columns around, so there is a need to identify the columns regardless of its position in the table. + + @ignore +*/ +@implementation CPTableColumn : CPObject +{ + CPString _identifier; + CPView _headerView; + + CPTableView _tableView; + + float _width; + float _minWidth; + float _maxWidth; + + unsigned _resizingMask; + + CPView _dataView; // default data view for this column + + Object _dataViewData; // cache of data view archives (key=data view UID, value=data view archive) + Object _dataViewForView; // mapping from view instances back to their data view prototype (key=view instance UID, value=data view) + Object _purgableInfosForDataView; // (key=data view UID, value=) +} + +/*! + Initializes the table column with the specified identifier. + @param anIdentifier the identifier + @return the initialized table column +*/ +- (id)initWithIdentifier:(CPString)anIdentifier +{ + self = [super init]; + + if (self) + { + [self _init]; + + _identifier = anIdentifier; + + _width = 40.0; + _minWidth = 8.0; + _maxWidth = 1000.0; + + var dataView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()]; + [dataView setValue:[CPColor whiteColor] forThemeAttribute:"text-color" inState:CPThemeStateHighlighted]; + + [self setDataView:dataView]; + + _headerView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()]; + [_headerView setBackgroundColor:[CPColor greenColor]]; + } + + return self; +} + +- (void)_init +{ + _dataViewData = {}; + _dataViewForView = {}; + _purgableInfosForDataView = {}; +} + +/*! + Sets the table column's identifier + @param anIdentifier the new identifier +*/ +- (void)setIdentifier:(CPString)anIdentifier +{ + _identifier = anIdentifier; +} + +/*! + Returns the table column's identifier +*/ +- (CPString)identifier +{ + return _identifier; +} + +// Setting the CPTableView +/*! + Sets the table's view. This is called automatically by Cappuccino. + @param aTableView the new table view +*/ +- (void)setTableView:(CPTableView)aTableView +{ + _tableView = aTableView; +} + +/*! + Returns the column's table view. +*/ +- (CPTableView)tableView +{ + return _tableView; +} + +// Controlling size +/*! + Sets the column's width. + @param aWidth the new column width +*/ +- (void)setWidth:(float)aWidth +{ + _width = aWidth; +} + +/*! + Returns the column's width +*/ +- (float)width +{ + return _width; +} + +/*! + Sets column's minimum width. + @param aWidth the new minimum column width +*/ +- (void)setMinWidth:(float)aWidth +{ + if (_width < (_minWidth = aWidth)) + [self setWidth:_minWidth]; +} + +/*! + The column's minimum width +*/ +- (float)minWidth +{ + return _minWidth; +} + +/*! + Sets the column's maximum width. + @param aWidth the new maximum width +*/ +- (void)setMaxWidth:(float)aWidth +{ + if (_width > (_maxmimumWidth = aWidth)) + [self setWidth:_maxWidth]; +} + +/*! + Sets the resizing mask. The mask is one of: +

+CPTableColumnNoResizing;
+CPTableColumnAutoresizingMask;
+CPTableColumnUserResizingMask;
+
+ @param aMask the new resizing mask +*/ +- (void)setResizingMask:(unsigned)aMask +{ + _resizingMask = aMask; +} + +/*! + Returns the column's resizing mask. One of: +
+CPTableColumnNoResizing;
+CPTableColumnAutoresizingMask;
+CPTableColumnUserResizingMask;
+
+*/ +- (unsigned)resizingMask +{ + return _resizingMask; +} + +/*! + Resizes the column according to the min, max and set width. +*/ +- (void)sizeToFit +{ + var width = CPRectGetWidth([_headerView frame]); + + if (width < _minWidth) + [self setMinWidth:width]; + else if (width > _maxWidth) + [self setMaxWidth:width] + + if (_width != width) + [self setWidth:width]; +} + +/*! + Sets whether the column in this data is editable. + @param aFlag YES means the column data is editable +*/ +- (void)setEditable:(BOOL)aFlag +{ + _isEditable = aFlag; +} + +/*! + Returns YES if the column data is editable. +*/ +- (BOOL)isEditable +{ + return _isEditable; +} + +//Setting the column header view + +/*! + Sets the view that draws the column's header. + @param aHeaderView the view that will draws the column header +*/ + +- (void)setHeaderView:(CPView)aView +{ + _headerView = aView; +} + +/*! + Return the view that draws the column's header +*/ +- (CPView)headerView +{ + return _headerView; +} + +/*! + Sets the data cell that draws rows in this column. +*/ +- (void)setDataCell:(CPView )aView +{ + [self setDataView:aView]; +} + +/* + Sets the data view that draws rows in this column. +*/ +- (void)setDataView:(CPView )aView +{ + if (_dataView) + _dataViewData[[_dataView UID]] = nil; + + _dataView = aView; + _dataViewData[[aView UID]] = [CPKeyedArchiver archivedDataWithRootObject:aView]; +} + +/*! + Returns the data cell that draws rows in this column +*/ +- (CPCell)dataCell +{ + return _dataView; +} + +/* + Returns the data view that draws rows in this column +*/ +- (CPView)dataView +{ + return [self dataCell]; +} + +/*! + By default returns the value from dataCell. This can + be overridden by a subclass to return different cells for different + rows. + @param aRowIndex the index of the row to obtain the cell for +*/ +- (CPCell)dataCellForRow:(int)aRowIndex +{ + return [self dataView]; +} + +- (CPView)dataViewForRow:(int)aRowIndex +{ + return [self dataCellForRow:aRowIndex]; +} +/* +- (void)_markViewAsPurgable:(CPView)aView +{ + var viewUID = [aView UID], + dataViewUID = [_dataViewForView[viewUID] UID]; + + if (!_purgableInfosForDataView[dataViewUID]) + _purgableInfosForDataView[dataViewUID] = [CPDictionary dictionary]; + + [_purgableInfosForDataView[dataViewUID] setObject:aView forKey:viewUID]; +} +*/ +- (void)_markView:(CPView)aView inRow:(unsigned)aRow asPurgable:(BOOL)isPurgable +{ + var viewUID = [aView UID], + dataViewUID = [_dataViewForView[viewUID] UID]; + + if (!_purgableInfosForDataView[dataViewUID]) + { + if (!isPurgable) + return; + + _purgableInfosForDataView[dataViewUID] = {}; + } + + if (!isPurgable) { + if (_purgableInfosForDataView[dataViewUID][viewUID]) + CPLog.warn("removing unpurgable " + _purgableInfosForDataView[dataViewUID][viewUID]); + delete _purgableInfosForDataView[dataViewUID][viewUID]; + } + else + _purgableInfosForDataView[dataViewUID][viewUID] = PurgableInfoMake(aView, aRow); +} + +- (CPView)_newDataViewForRow:(int)aRowIndex avoidingRows:(CPRange)rows +{ + var view = [self dataViewForRow:aRowIndex], + viewUID = [view UID], + purgableInfos = _purgableInfosForDataView[viewUID]; + + if (purgableInfos) + { + for (var key in purgableInfos) + { + var info = purgableInfos[key]; + //if (!CPLocationInRange(PurgableInfoRow(info), rows)) + //{ + //CPLog.debug("yes, a purged view is usable, its called: " + PurgableInfoView(info)); + delete purgableInfos[key]; + return PurgableInfoView(info); + //} + //else + // CPLog.warn("avoiding"); + } + } + + // if we haven't cached an archive of the data view, do it now + if (!_dataViewData[viewUID]) + _dataViewData[viewUID] = [CPKeyedArchiver archivedDataWithRootObject:view]; + + // unarchive the data view cache + var newView = [CPKeyedUnarchiver unarchiveObjectWithData:_dataViewData[viewUID]]; + + // map the new view's UID to it's data view prototype + _dataViewForView[[newView UID]] = view; + + CPLog.warn("creating cell: %s", newView); + + return newView; +} + +- (void)_purge +{ + for (var viewUID in _purgableInfosForDataView) + { + var purgableInfos = _purgableInfosForDataView[viewUID]; + + for (var key in purgableInfos) + { + var view = PurgableInfoView(purgableInfos[key]); + + if (!view) + CPLog.info("key="+key+" view=" + view + " purgableInfos[key]="+purgableInfos[key]) + else if (view._superview) { + //CPLog.error("PURGING: (removing)" + view); + //[view removeFromSuperview]; + [view setHidden:YES]; + } + //else + // CPLog.warn("PURGING: (already removed)" + view); + + //delete purgableInfos[key]; + } + } +} + +@end + + +var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", + CPTableColumnHeaderViewKey = @"CPTableColumnHeaderViewKey", + CPTableColumnDataViewKey = @"CPTableColumnDataViewKey", + CPTableColumnWidthKey = @"CPTableColumnWidthKey", + CPTableColumnMinWidthKey = @"CPTableColumnMinWidthKey", + CPTableColumnMaxWidthKey = @"CPTableColumnMaxWidthKey", + CPTableColumnResizingMaskKey = @"CPTableColumnResizingMaskKey"; + +@implementation CPTableColumn (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder +{ + [self _init]; + + _identifier = [aCoder decodeObjectForKey:CPTableColumnIdentifierKey]; + + [self setHeaderView:[aCoder decodeObjectForKey:CPTableColumnHeaderViewKey]]; + [self setDataView:[aCoder decodeObjectForKey:CPTableColumnDataViewKey]]; + + _width = [aCoder decodeFloatForKey:CPTableColumnWidthKey]; + _minWidth = [aCoder decodeFloatForKey:CPTableColumnMinWidthKey]; + _maxWidth = [aCoder decodeFloatForKey:CPTableColumnMaxWidthKey]; + + _resizingMask = [aCoder decodeBoolForKey:CPTableColumnResizingMaskKey]; + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [aCoder encodeObject:_identifier forKey:CPTableColumnIdentifierKey]; + + [aCoder encodeObject:_headerView forKey:CPTableColumnHeaderViewKey]; + [aCoder encodeObject:_dataView forKey:CPTableColumnDataViewKey]; + + [aCoder encodeObject:_width forKey:CPTableColumnWidthKey]; + [aCoder encodeObject:_minWidth forKey:CPTableColumnMinWidthKey]; + [aCoder encodeObject:_maxWidth forKey:CPTableColumnMaxWidthKey]; + + [aCoder encodeObject:_resizingMask forKey:CPTableColumnResizingMaskKey]; +} + +@end diff --git a/AppKit/OLDCPTableView.j b/AppKit/OLDCPTableView.j new file mode 100644 index 000000000..02b2e5cd9 --- /dev/null +++ b/AppKit/OLDCPTableView.j @@ -0,0 +1,1302 @@ +/* + * CPTableView.j + * AppKit + * + * Created by Francisco Tolmasky. + * Copyright 2008, 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 "CPControl.j" +@import "CPTableColumn.j" + +@import "CPColor.j" +@import "CPTextField.j" + +#define ROW_HEIGHT(aRow) (_hasVariableHeightRows ? _rowHeights[aRow] : _rowHeight) +#define ROW_MIN_Y(aRow) (_hasVariableHeightRows ? _rowMinYs[aRow] : (aRow * (_rowHeight + _intercellSpacing.height))) + +CPTableViewColumnDidMoveNotification = "CPTableViewColumnDidMoveNotification"; +CPTableViewColumnDidResizeNotification = "CPTableViewColumnDidResizeNotification"; +CPTableViewSelectionDidChangeNotification = "CPTableViewSelectionDidChangeNotification"; +CPTableViewSelectionIsChangingNotification = "CPTableViewSelectionIsChangingNotification"; + +var _CPTableViewWillDisplayCellSelector = 1 << 0, + _CPTableViewShouldSelectRowSelector = 1 << 1, + _CPTableViewShouldSelectTableColumnSelector = 1 << 2, + _CPTableViewSelectionShouldChangeSelector = 1 << 3, + _CPTableViewShouldEditTableColumnSelector = 1 << 4, + _CPTableViewSelectionIndexesForProposedSelectionSelector = 1 << 5, + _CPTableViewHeightOfRowSelector = 1 << 6; + +/* + @ingroup appkit + + This class is not yet stable. + + CPTableView is located within the AppKit framework and is used to display tables. + It uses a delegate model for getting its data i.e. you give it an object that provides + it with the data it should display. + + @ignore +*/ +@implementation CPTableView : CPControl +{ + // Archived: + + id _dataSource; + id _delegate; + + //CPTableHeaderView _headerView; + //CPView _cornerView; + + CPArray _tableColumns; + + CPIndexSet _selectedRowIndexes; + //CPArray _selectedColumns; + + float _rowHeight; + CGSize _intercellSpacing; + + BOOL _allowsMultipleSelection; + BOOL _allowsEmptySelection; + //BOOL _allowsColumnReordering; + //BOOL _allowsColumnResizing; + //BOOL _allowsColumnSelection; + //BOOL _autoresizesAllColumnsToFit; + + //CPColor _gridColor; + //BOOL _drawsGrid; + + SEL _doubleAction; + + // Not archived: + + int _delegateSelectorsCache; + + //CPScrollView _scrollView; + + unsigned _numberOfRows; + //unsigned _numberOfColumns; + + BOOL _hasVariableHeightRows; + + // Heights + float _columnHeight; // calculated + + CPArray _rowHeights; + CPArray _rowMinYs; + + CPArray _tableCells; + CPArray _tableColumnViews; + + // Caching + Object _dataViewCache; + CPArray _objectValueCache; + + CPRange _visibleRows; + CPRange _visibleColumns; + + CPRange _populatedRows; + CPRange _populatedColumns; + + // Selection + CPIndexSet _previousSelectedRowIndexes; + int _selectionStartRow; + int _selectionModifier; + + CPIndexSet _currentlySelected; + CPArray _selectionViews; + CPArray _selectionViewsPool; + + CPDate _scrollTimer; +} + ++ (void)initialize +{ + +} + +- (id)initWithFrame:(CGRect)aFrame +{ + self = [super initWithFrame:aFrame]; + + if (self) + { + [self _init]; + } + + return self; +} + +- (void)_init +{ + _tableColumns = []; + //_numberOfColumns = 0; + + _selectedRowIndexes = [CPIndexSet indexSet]; + + _rowHeight = 17.0; + _intercellSpacing = CPSizeMake(3.0, 2.0); + + _allowsMultipleSelection = YES; + _allowsEmptySelection = YES; + + + _tableCells = []; + _tableColumnViews = []; + + _dataViewCache = {}; + _objectValueCache = []; + + _visibleRows = CPMakeRange(0, 0); + _visibleColumns = CPMakeRange(0, 0); + + _rowHeights = []; + _rowMinYs = []; +} + +/* + Returns the table's column height +*/ +- (float)_columnHeight +{ + return _columnHeight;//_numberOfRows * (_rowHeight + _intercellSpacing.height); +} + +- (void)newCellForRow:(unsigned)aRowIndex column:(unsigned)aColumnIndex avoidingRows:(CPRange)rows +{ + var dataView = [_tableColumns[aColumnIndex] _newDataViewForRow:aRowIndex avoidingRows:rows]; + + [dataView setFrame:CGRectMake(0.0, ROW_MIN_Y(aRowIndex), [_tableColumns[aColumnIndex] width], ROW_HEIGHT(aRowIndex))]; + + if ([dataView respondsToSelector:@selector(highlight:)]) + [dataView highlight:[_selectedRowIndexes containsIndex:aRowIndex]]; + + if (!_objectValueCache[aColumnIndex]) + _objectValueCache[aColumnIndex] = []; + + // We may be storing 0 after all! + if (_objectValueCache[aColumnIndex][aRowIndex] === undefined) + _objectValueCache[aColumnIndex][aRowIndex] = [_dataSource tableView:self objectValueForTableColumn:_tableColumns[aColumnIndex] row:aRowIndex]; + + [dataView setObjectValue:_objectValueCache[aColumnIndex][aRowIndex]]; + + return dataView; +} + +- (void)clearCells +{ + var columnEnd = CPMaxRange(_visibleColumns), + rowEnd = CPMaxRange(_visibleRows); + + for (var column = _visibleColumns.location; column < columnEnd; column++) + { + var tableColumn = _tableColumns[column], + tableColumnCells = _tableCells[column]; + + for (var row = _visibleRows.location; row < rowEnd; row++) + { + var cell = tableColumnCells[row]; + if (cell) + { + tableColumnCells[row] = nil; + [tableColumn _markView:cell inRow:row asPurgable:YES]; + } + else + { + CPLog.warn("Missing cell? " + row + "," + column); + } + } + } + + _visibleColumns = CPMakeRange(0,0); + _visibleRows = CPMakeRange(0,0); +} + +- (void)loadTableCellsInRect:(CGRect)aRect +{ + if (!_dataSource) + return; + + // Determine new visible rows and columns. + + var rowStart = MAX(0, [self _rowAtY:CGRectGetMinY(aRect)] - 1), + rowEnd = MIN(_numberOfRows, [self _rowAtY:CGRectGetMaxY(aRect)] + 1), + + visibleRows = CPMakeRange(rowStart, rowEnd - rowStart), + + columnStart = MAX(0, [self _columnAtX:CGRectGetMinX(aRect)]), + columnEnd = MIN(_tableColumns.length, [self _columnAtX:CGRectGetMaxX(aRect)] + 1), + + visibleColumns = CPMakeRange(columnStart, columnEnd - columnStart); + + if (CPEqualRanges(_visibleRows, visibleRows) && CPEqualRanges(_visibleColumns, visibleColumns)) + return; + + var unionVisibleRows = CPUnionRange(_visibleRows, visibleRows), + unionVisibleColumns = CPUnionRange(_visibleColumns, visibleColumns); + + + // Determine whether to use 2 sweeps or one. If we have lots of overlap of cells, use just one. + if (unionVisibleRows.length * unionVisibleColumns.length <= + (_visibleRows.length * _visibleColumns.length) + (visibleRows.length * visibleColumns.length)) + { + //CPLog.info("single sweep"); + + var cEnd = CPMaxRange(unionVisibleColumns), + rEnd = CPMaxRange(unionVisibleRows), + cell; + + for (var column = unionVisibleColumns.location; column < cEnd; ++column) + { + var tableColumn = _tableColumns[column], + tableColumnCells = _tableCells[column], + columnIsVisible = CPLocationInRange(column, visibleColumns), + newCells = []; + + for (var row = unionVisibleRows.location; row < rEnd; ++row) + { + if (cell = tableColumnCells[row]) + { + if (!columnIsVisible || !CPLocationInRange(row, visibleRows)) + { + tableColumnCells[row] = nil; + [tableColumn _markView:cell inRow:row asPurgable:YES]; + } + } + else + { + newCells.push(row); + } + } + + while (newCells.length > 0) + { + var row = newCells.pop(); + + tableColumnCells[row] = [self newCellForRow:row column:column avoidingRows:visibleRows]; + + if (!tableColumnCells[row]._superview) + [_tableColumnViews[column] addSubview:tableColumnCells[row]]; + else if (tableColumnCells[row]._isHidden) + [tableColumnCells[row] setHidden:NO]; + } + + [tableColumn _purge]; + } + } + else { + //CPLog.info("double sweep"); + + // first sweep: remove old cells + + var cEnd = CPMaxRange(_visibleColumns), + rEnd = CPMaxRange(_visibleRows), + cell; + + for (var column = _visibleColumns.location; column < cEnd; ++column) + { + var tableColumn = _tableColumns[column], + tableColumnCells = _tableCells[column], + columnIsVisible = CPLocationInRange(column, visibleColumns); + + for (var row = _visibleRows.location; row < rEnd; ++row) + { + if (cell = tableColumnCells[row]) + { + if (!columnIsVisible || !CPLocationInRange(row, visibleRows)) + { + tableColumnCells[row] = nil; + [tableColumn _markView:cell inRow:row asPurgable:YES]; + } + } + } + } + + // second sweep: add new cells + + var cEnd = CPMaxRange(visibleColumns), + rEnd = CPMaxRange(visibleRows); + + for (var column = visibleColumns.location; column < cEnd; ++column) + { + var tableColumn = _tableColumns[column], + tableColumnCells = _tableCells[column]; + + for (var row = visibleRows.location; row < rEnd; ++row) + { + tableColumnCells[row] = [self newCellForRow:row column:column avoidingRows:visibleRows]; + + if (!tableColumnCells[row]._superview) + [_tableColumnViews[column] addSubview:tableColumnCells[row]]; + else if (tableColumnCells[row]._isHidden) + [tableColumnCells[row] setHidden:NO]; + } + + [tableColumn _purge]; + } + } + + + _visibleRows = visibleRows; + _visibleColumns = visibleColumns; + +} + +// Setting display attributes +/* + Sets the width and height between cell. The default is (3.0, 2.0) (width, height). + @param the width and height spacing +*/ +- (void)setIntercellSpacing:(CGSize)aSize +{ + if (_intercellSpacing.width != aSize.width) + { + var i = 1, + delta = aSize.width - _intercellSpacing.width; + total = delta; + + for (; i < _tableColumns.length; ++i, total += delta) + { + var origin = [_tableColumnViews[i] frame].origin; + [_tableColumnViews[i] setFrameOrigin:CGPointMake(origin.x + total, origin.y)]; + } + } + + if (_intercellSpacing.height != aSize.height) + { + var i = 0; + + for (; i < _tableColumns.length; ++i, total += delta) + { + [_tableColumnViews[i] setFrameSize:CGSizeMake([_tableColumnViews[i] width], _numberOfRows * (_rowHeight + _intercellSpacing.height))]; + + var j = 1, + y = _rowHeight + _intercellSpacing.height; + + for (; j < _numberOfRows; ++i, y += _rowHeight + _intercellSpacing.height) + { + if (!_tableCells[i][j]) + continue; + + [_tableCells[i][j] setFrameOrigin:CPPointMake(0.0, y)]; + } + } + + // FIXME: variable height rows + } + + _intercellSpacing = CPSizeCreateCopy(aSize); +} + +/* + Returns the width and height of the space between + cells. +*/ +- (CGSize)intercellSpacing +{ + return _intercellSpacing; +} + +/* + Sets the height of table rows + @param aRowHeight the new height of the table rows +*/ +- (void)setRowHeight:(unsigned)aRowHeight +{ + if (_rowHeight == aRowHeight) + return; + + _rowHeight = aRowHeight; + + // don't perform adjustments if we're using variable height rows + if (_hasVariableHeightRows) + return; + + for (var row = 0; row < _numberOfRows; ++row) + for (var column = 0; column < _tableColumns.length; ++column) + [_tableCells[column][row] setFrameOrigin:CPPointMake(0.0, row * (_rowHeight + _intercellSpacing.height))]; +} + +/* + Returns the height of a table row +*/ +- (unsigned)rowHeight +{ + return _rowHeight; +} + +/* + Adds a column to the table + @param aTableColumn the column to be added +*/ +- (void)addTableColumn:(CPTableColumn)aTableColumn +{ + var i = 0, + x = _tableColumns.length ? CPRectGetMaxX([self rectOfColumn:_tableColumns.length - 1]) + _intercellSpacing.width : 0.0, + tableColumnView = [[CPView alloc] initWithFrame:CPRectMake(x, 0.0, [aTableColumn width], [self _columnHeight])], + tableColumnCells = []; + + [_tableColumns addObject:aTableColumn]; + [_tableColumnViews addObject:tableColumnView]; + +// [tableColumnView setBackgroundColor:[CPColor greenColor]]; + + [self addSubview:tableColumnView]; + + [_tableCells addObject:tableColumnCells]; + + // TODO: do we really need to initialize this, or is undefined good enough? + for (; i < _numberOfRows; ++i) + _tableCells[_tableColumns.length-1][i] = nil; + + //++_numberOfColumns; +} + +/* + Removes a column from the table + @param aTableColumn the column to remove +*/ +- (void)removeTableColumn:(CPTableColumn)aTableColumn +{ + var frame = [self frame], + width = [aTableColumn width] + _intercellSpacing.width, + index = [_tableColumns indexOfObjectIdenticalTo:aTableColumn]; + + // Remove the column view and all the cell views from the view hierarchy. + [_tableColumnViews[i] removeFromSuperview]; + + [_tableCells removeObjectAtIndex:index]; + [_tableColumns removeObjectAtIndex:index]; + [_tableColumnViews removeObjectAtIndex:index]; + + // Shift remaining column views to the left. + for (; index < _tableColumns.length; ++ index) + [_tableColumnViews[index] setFrameOrigin:CPPointMake(CPRectGetMinX([_tableColumnViews[index] frame]) - width, 0.0)] + + // Resize ourself. + [self setFrameSize:CPSizeMake(CPRectGetWidth(frame) - width, CPRectGetHeight(frame))]; +} + +/* + Not yet implemented. Changes the position of the column in + the table. + @param fromIndex the original index of the column + @param toIndex the desired index of the column +*/ +- (void)moveColumn:(unsigned)fromIndex toColumn:(unsinged)toIndex +{ + if (fromIndex == toIndex) + return; +// FIXME: IMPLEMENT +} + +/* + Returns an array containing the table's CPTableColumns. +*/ +- (CPArray)tableColumns +{ + return _tableColumns; +} + +/* + Returns the first CPTableColumn equal to the given object (as determined by the "isEqual:" selector), or nil if none exists. + @param anObject the object to look for +*/ +- (CPTableColumn)tableColumnWithIdentifier:(id)anObject +{ + for (var i = 0; i < _tableColumns.length; i++) + if ([_tableColumns[i] isEqual:anObject]) + return _tableColumns[i]; + return nil; +} + +// Getting the dimensions of the table +/* + Returns the number of columns in the table +*/ +- (int)numberOfColumns +{ + return _tableColumns.length; +} + +/* + Returns the number of rows in the table +*/ +- (int)numberOfRows +{ + return _numberOfRows; +} + +/* + Adjusts the size of the table and it's header view. +*/ +- (void)tile +{ + var HEIGHT = 10.0; + +// [_headerView setFrame:CPRectMake(0.0, 0.0, CPRectGetWidth([self bounds]), HEIGHT)]; +// [_scrollView setFrame:CPRectMake(0.0, HEIGHT, CPRectGetWidth([self bounds]), CPRectGetHeight([self bounds]) - HEIGHT)]; +} + +/* + Sets the object that is used to obtain the table data. The data source must implement the following + methods: +
+- (int)numberOfRowsInTableView:(CPTableView)aTableView
+- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aTableColumn row:(int)rowIndex
+
+ @param aDataSource the object with the table data + @throws CPInternalInconsistencyException if aDataSource doesn't implement all the required methods +*/ +- (void)setDataSource:(id)aDataSource +{ + if (![aDataSource respondsToSelector:@selector(numberOfRowsInTableView:)]) + [CPException raise:CPInternalInconsistencyException reason:"Data source doesn't support 'numberOfRowsInTableView:'"]; + if (![aDataSource respondsToSelector:@selector(tableView:objectValueForTableColumn:row:)]) + [CPException raise:CPInternalInconsistencyException reason:"Data source doesn't support 'tableView:objectValueForTableColumn:row:'"]; + + _dataSource = aDataSource; + + [self reloadData]; +} + +/* + Returns the object that has access to the table data +*/ +- (id)dataSource +{ + return _dataSource; +} + + +- (id)delegate +{ + return _delegate; +} + + +/*! + Sets the delegate for the tableview. +*/ +- (void)setDelegate:(id)aDelegate +{ + if (_delegate === aDelegate) + return; + + var notificationCenter = [CPNotificationCenter defaultCenter]; + + if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) + [notificationCenter removeObserver:_delegate name:CPTableViewColumnDidMoveNotification object:self]; + if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) + [notificationCenter removeObserver:_delegate name:CPTableViewColumnDidResizeNotification object:self]; + if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) + [notificationCenter removeObserver:_delegate name:CPTableViewSelectionDidChangeNotification object:self]; + if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) + [notificationCenter removeObserver:_delegate name:CPTableViewSelectionIsChangingNotification object:self]; + + _delegate = aDelegate; + + if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) + [notificationCenter addObserver:_delegate selector:@selector(tableViewColumnDidMove:) name:CPTableViewColumnDidMoveNotification object:self]; + if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) + [notificationCenter addObserver:_delegate selector:@selector(tableViewColumnDidResize:) name:CPTableViewColumnDidResizeNotification object:self]; + if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) + [notificationCenter addObserver:_delegate selector:@selector(tableViewSelectionDidChange:) name:CPTableViewSelectionDidChangeNotification object:self]; + if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) + [notificationCenter addObserver:_delegate selector:@selector(tableViewSelectionIsChanging:) name:CPTableViewSelectionIsChangingNotification object:self]; + + _delegateSelectorsCache = 0; + + if ([_delegate respondsToSelector:@selector(tableView:willDisplayCell:forTableColumn:row:)]) + _delegateSelectorsCache |= _CPTableViewWillDisplayCellSelector; + if ([_delegate respondsToSelector:@selector(tableView:shouldSelectRow:)]) + _delegateSelectorsCache |= _CPTableViewShouldSelectRowSelector; + if ([_delegate respondsToSelector:@selector(tableView:shouldSelectTableColumn:)]) + _delegateSelectorsCache |= _CPTableViewShouldSelectTableColumnSelector; + if ([_delegate respondsToSelector:@selector(selectionShouldChangeInTableView:)]) + _delegateSelectorsCache |= _CPTableViewSelectionShouldChangeSelector; + if ([_delegate respondsToSelector:@selector(tableView:shouldEditTableColumn:row:)]) + _delegateSelectorsCache |= _CPTableViewShouldEditTableColumnSelector; + if ([_delegate respondsToSelector:@selector(tableView:selectionIndexesForProposedSelection:)]) + _delegateSelectorsCache |= _CPTableViewSelectionIndexesForProposedSelectionSelector; + if ([_delegate respondsToSelector:@selector(tableView:heightOfRow:)]) + { + _delegateSelectorsCache |= _CPTableViewHeightOfRowSelector; + _hasVariableHeightRows = YES; + } + else + _hasVariableHeightRows = NO; +} + + +/* + Tells the table view that the number of rows in the table + has changed. +*/ +- (void)noteNumberOfRowsChanged +{ + var numberOfRows = [_dataSource numberOfRowsInTableView:self]; + + if (_numberOfRows != numberOfRows) + { + _numberOfRows = numberOfRows; + + [self _recalculateColumnHeight]; + } +} + +- (void)noteHeightOfRowsWithIndexesChanged:(CPIndexSet)indexSet +{ + // FIXME: more efficient version is possible since we know which indexes changes + [self _recalculateColumnHeight]; +} + +/* + Returns the rectangle bounding the specified row. + @param aRowIndex the row to obtain a rectangle for + @return the bounding rectangle +*/ +- (CGRect)rectOfRow:(int)aRowIndex +{ + return CPRectMake(0.0, ROW_MIN_Y(aRowIndex), CPRectGetWidth([self bounds]), ROW_HEIGHT(aRowIndex)); +} + +/* + Returns the rectangle bounding the specified column + @param aColumnIndex the column to obtain a rectangle for + @return the bounding column +*/ +- (CGRect)rectOfColumn:(int)aColumnIndex +{ + return [_tableColumnViews[aColumnIndex] frame]; +} + +/* + Adjusts column widths to make them all visible at once. Same as tile. +*/ +- (void)sizeToFit +{ +// [self tile]; +} + +- (void)_recalculateColumnHeight +{ + var oldColumnHeight = _columnHeight; + + if (_hasVariableHeightRows) + { + _rowMinYs[0] = 0; + for (var row = 0; row < _numberOfRows; row++) + { + _rowHeights[row] = [_delegate tableView:self heightOfRow:row]; + _rowMinYs[row+1] = _rowMinYs[row] + _rowHeights[row] + _intercellSpacing.height; + } + _columnHeight = _rowMinYs[_numberOfRows]; // last index is one more than last row, and is the total column height + } + else + _columnHeight = _numberOfRows * (_rowHeight + _intercellSpacing.height); + + var count = _tableColumnViews.length; + + while (count--) + [_tableColumnViews[count] setFrameSize:CGSizeMake([_tableColumns[count] width], _columnHeight)]; + + [self setFrameSize:CGSizeMake(CGRectGetWidth([self frame]), _columnHeight)]; +} + +- (CGRect)visibleRectInParent +{ + var superview = [self superview]; + + if (!superview) + return [self bounds]; + + return [self convertRect:CGRectIntersection([superview bounds], [self frame]) fromView:superview]; +} + +/* + Reloads the data from the dataSource. This is an + expensive method, so use it lightly. +*/ +- (void)reloadData +{ + var oldNumberOfRows = _numberOfRows; + + _numberOfRows = [_dataSource numberOfRowsInTableView:self]; + + if (oldNumberOfRows != _numberOfRows) + { + [self _recalculateColumnHeight]; + [self setFrameSize:CGSizeMake(CGRectGetWidth([self frame]), [self _columnHeight])]; + } + + _objectValueCache = []; + + [self clearCells]; + + [self setNeedsLayout]; +} + +- (void)layoutSubviews +{ + [self loadTableCellsInRect:[self visibleRectInParent]]; +} + +- (void)displaySoon +{ + [_scrollTimer invalidate]; + _scrollTimer = [CPTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(displayNow) userInfo:nil repeats:NO]; +} + +- (void)displayNow +{ + [self setNeedsLayout]; +} + +- (void)viewDidMoveToSuperview +{ + [[[self enclosingScrollView] contentView] setPostsBoundsChangedNotifications:YES]; + + [[CPNotificationCenter defaultCenter] + addObserver:self + selector:@selector(viewBoundsChanged:) + name:CPViewBoundsDidChangeNotification + object:[[self enclosingScrollView] contentView]]; +} + +- (void)viewBoundsChanged:(CPNotification)aNotification +{ + //CPLog.info(_cmd + CPStringFromRect([[[self enclosingScrollView] contentView] bounds])); + //objj_debug_print_backtrace(); + //[self setNeedsLayout]; + [self displayNow]; +} + +/* +- (void)setAllowsColumnReordering:(BOOL)allowsColumnReordering +{ + if (_allowsColumnReordering === _allowsColumnReordering) + return; + + _allowsColumnReordering = allowsColumnReordering; +} +- (void)allowsColumnReordering +{ + return _allowsColumnReordering; +} + +- (void)setAllowsColumnResizing:(BOOL)allowsColumnResizing +{ + if (_allowsColumnResizing === allowsColumnResizing) + return; + + _allowsColumnResizing = allowsColumnResizing; +} +- (void)allowsColumnResizing +{ + return _allowsColumnResizing; +} + +- (void)setAllowsColumnSelection:(BOOL)allowsColumnSelection +{ + if (_allowsColumnSelection === allowsColumnSelection) + return; + + _allowsColumnSelection = allowsColumnSelection; +} +- (void)allowsColumnSelection +{ + return _allowsColumnSelection; +} +*/ + +- (void)setAllowsMultipleSelection:(BOOL)allowsMultipleSelection +{ + if (_allowsMultipleSelection === allowsMultipleSelection) + return; + + _allowsMultipleSelection = allowsMultipleSelection; + + // TODO: more stuff? +} +- (void)allowsMultipleSelection +{ + return _allowsMultipleSelection; +} + +- (void)setAllowsEmptySelection:(BOOL)allowsEmptySelection +{ + if (_allowsEmptySelection === allowsEmptySelection) + return; + + _allowsEmptySelection = allowsEmptySelection; +} +- (void)allowsEmptySelection +{ + return _allowsEmptySelection; +} + + +/* + Returns the index of the row at the given point, or CPNotFound (-1) if it is out of range. + @param aPoint the point + @return the index of the row at aPoint +*/ +- (int)rowAtPoint:(CGPoint)aPoint +{ + var index = [self _rowAtY:aPoint.y] + + if (index >= 0 && index < _numberOfRows) + return index; + else + return CPNotFound; +} + +- (int)columnAtPoint:(CGPoint)aPoint +{ + var index = [self _columnAtX:aPoint.x] + + if (index >= 0 && index < _tableColumns.length) + return index; + else + return CPNotFound; +} + +/* + @ignore + + Internal version takes a Y value, returns an index, or -1 if its beyond the min, or numberOfRows if it's beyond the max +*/ +- (int)_rowAtY:(float)y +{ + if (_hasVariableHeightRows) + { + var a = 0, + b = _numberOfRows; + + if (y < _rowMinYs[0]) + return -1; + if (y >= _rowMinYs[_rowMinYs.length-1]) + return _numberOfRows; + + // binary search + while (true) + { + var half = a + Math.floor((b - a) / 2); + + if (y < _rowMinYs[half]) + b = half; + else if (half < _numberOfRows-1 && y >= _rowMinYs[half+1]) + a = half; + else + return half; + } + } + else + return FLOOR(y / (_rowHeight + _intercellSpacing.height)); +} + +/* + @ignore + + Internal version takes a X value, returns an index, or -1 if its beyond the min, or numberOfColumns if it's beyond the max +*/ +- (int)_columnAtX:(float)x +{ + var a = 0, + b = _tableColumns.length; + + var last = [_tableColumnViews[_tableColumns.length-1] frame]; + if (x < [_tableColumnViews[0] frame].origin.x) + return -1; + if (x >= last.origin.x + last.size.width) + return _tableColumns.length; + + // binary search + while (true) + { + var half = a + Math.floor((b - a) / 2); + + if (x < [_tableColumnViews[half] frame].origin.x) + b = half; + else if (half < _tableColumns.length-1 && x >= [_tableColumnViews[half+1] frame].origin.x) + a = half; + else + return half; + } +} + +/* + Selects the specified row indexes, optionally adding to existing selection + @param indexes the indexes to select + @param extend whether or not to add to the existing selection +*/ +- (void)selectRowIndexes:(CPIndexSet)indexes byExtendingSelection:(BOOL)extend +{ + // FIXME: should this be subject to the delegate filters, etc? + + if (extend) + _selectedRowIndexes = [[_selectedRowIndexes copy] addIndexes:indexes]; + else if ([indexes count] > 0 || _allowsEmptySelection) + _selectedRowIndexes = [indexes copy]; + + [self _drawSelection]; +} + +/* + Returns a CPIndexSet of the selected rows + @return indexes of the selected rows +*/ +- (CPIndexSet)selectedRowIndexes +{ + return _selectedRowIndexes; +} + +/* + Returns the number of selected rows + @return number of selected rows +*/ +- (int)numberOfSelectedRows +{ + return [_selectedRowIndexes count]; +} + + +/* + Deselects all rows if allowsEmptySelection is true. If delegate responds to "selectionShouldChangeInTableView:", asks if it should chnage. + Sends the CPTableViewSelectionDidChangeNotification on deselection. + @param the sender in a target/action +*/ +- (void)deselectAll:(id)sender +{ + if (!_allowsEmptySelection || [_selectedRowIndexes count] === 0 || + ((_delegateSelectorsCache & _CPTableViewSelectionShouldChangeSelector) && ![_delegate selectionShouldChangeInTableView:self])) + return; + + [self selectRowIndexes:[CPIndexSet indexSet] byExtendingSelection:NO]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]; +} + +- (void)editColumn:(int)columnIndex row:(int)rowIndex withEvent:(CPEvent)theEvent select:(BOOL)flag +{ + +} + +/* + @ignore +*/ +- (void)_updateSelectionWithMouseAtRow:(int)aRow +{ + // Make a preliminary new selection + var newSelection; + if (_allowsMultipleSelection) + newSelection = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(MIN(aRow, _selectionStartRow), ABS(aRow-_selectionStartRow)+1)]; + else if (aRow >= 0 && aRow < _numberOfRows) + newSelection = [CPIndexSet indexSetWithIndex:aRow]; + else + newSelection = [CPIndexSet indexSet]; + + // If cmd/ctrl was held down XOR the old selection with the proposed selection + if (_allowsMultipleSelection && _selectionModifier & (CPCommandKeyMask | CPControlKeyMask | CPAlternateKeyMask)) + { + // A = newSelection, B = _previousSelectedRowIndexes + // (A intersection B) = (A - (A - B)) + var intersection = [newSelection copy], + difference = [newSelection copy]; + [difference removeIndexes:_previousSelectedRowIndexes]; + [intersection removeIndexes:difference] + + // (A xor B) = (A + B) - (A intersection B) + [newSelection addIndexes:_previousSelectedRowIndexes]; + [newSelection removeIndexes:intersection]; + + // FIXME: if multiple selection is off, and we cmd/ctrl click the previously selected row, then deselect it. + } + + // if the new selection is different than the old selection + if (![newSelection isEqualToIndexSet:_selectedRowIndexes]) + { + // ask the delegate if we should change the selection + if ((_delegateSelectorsCache & _CPTableViewSelectionShouldChangeSelector) && ![_delegate selectionShouldChangeInTableView:self]) + return; + + // ask the delegate which indexes can be selected. selectionIndexesForProposedSelection is faster than shouldSelectRow + if (_delegateSelectorsCache & _CPTableViewSelectionIndexesForProposedSelectionSelector) + newSelection = [_delegate tableView:self selectionIndexesForProposedSelection:newSelection]; + else if (_delegateSelectorsCache & _CPTableViewShouldSelectRowSelector) + { + var indexes = []; + [newSelection getIndexes:indexes maxCount:Number.MAX_VALUE inIndexRange:nil]; + for (var i = 0; i < indexes.length; i++) + if (![_delegate tableView:self shouldSelectRow:indexes[i]]) + [newSelection removeIndex:indexes[i]]; + } + } + + // if empty selection is not allowed and the new selection has nothing selected, abort + if (!_allowsEmptySelection && [newSelection count] === 0) + return; + + // if the new selection is *still* different, and update the selection and send a notification + if (![newSelection isEqualToIndexSet:_selectedRowIndexes]) + { + [self selectRowIndexes:newSelection byExtendingSelection:NO]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionIsChangingNotification object:self userInfo:nil]; + } +} + +/* + @ignore +*/ +- (void)mouseDown:(CPEvent)anEvent +{ + [self trackSelection:anEvent]; +} + +/* + Sets the message to be sent to the target when a cell is double clicked + @param aSelector the selector to be performed +*/ +- (void)setDoubleAction:(SEL)aSelector +{ + _doubleAction = aSelector; +} +- (SEL)doubleAction +{ + return _doubleAction; +} + +- (int)clickedColumn +{ + return _clickedColumn; +} +- (int)clickedRow +{ + return _clickedRow; +} + +/* + @ignore +*/ +- (void)trackSelection:(CPEvent)anEvent +{ + var type = [anEvent type], + point = [self convertPoint:[anEvent locationInWindow] fromView:nil], + currentRow = MAX(0, MIN(_numberOfRows-1, [self _rowAtY:point.y])); + + if (type == CPLeftMouseUp) + { + _clickedRow = [self rowAtPoint:point]; + _clickedColumn = [self columnAtPoint:point]; + + if ([anEvent clickCount] === 2) + { + CPLog.warn("edit?!"); + + [self sendAction:_doubleAction to:_target]; + } + else + { + if (![_previousSelectedRowIndexes isEqualToIndexSet:_selectedRowIndexes]) + { + [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]; + } + + [self sendAction:_action to:_target]; + } + + return; + } + + if (type == CPLeftMouseDown) + { + _previousSelectedRowIndexes = _selectedRowIndexes; + _selectionModifier = [anEvent modifierFlags]; + + if (_selectionModifier & CPShiftKeyMask) + _selectionStartRow = (ABS([_previousSelectedRowIndexes firstIndex] - currentRow) < ABS([_previousSelectedRowIndexes lastIndex] - currentRow)) ? + [_previousSelectedRowIndexes firstIndex] : [_previousSelectedRowIndexes lastIndex]; + else + _selectionStartRow = currentRow; + + [self _updateSelectionWithMouseAtRow:currentRow]; + } + else if (type == CPLeftMouseDragged) + { + [self _updateSelectionWithMouseAtRow:currentRow]; + } + + [CPApp setTarget:self selector:@selector(trackSelection:) forNextEventMatchingMask:CPLeftMouseDraggedMask | CPLeftMouseUpMask untilDate:nil inMode:nil dequeue:YES]; +} + +/* + @ignore +*/ +- (void)_drawSelection +{ + if (!_currentlySelected) { + _currentlySelected = [CPIndexSet indexSet]; + _selectionViews = []; + _selectionViewsPool = []; + } + + // TODO: we could also remove selections that aren't visible, but then we'll need to run this on every scroll/resize? + + // get array of indexes we can remove + var removeSet = [_currentlySelected copy], + indexesToRemove = []; + [removeSet removeIndexes:_selectedRowIndexes]; + [removeSet getIndexes:indexesToRemove maxCount:Number.MAX_VALUE inIndexRange:nil]; + + // get array of indexes we need to add + var addSet = [_selectedRowIndexes copy], + indexesToAdd = []; + [addSet removeIndexes:_currentlySelected]; + [addSet getIndexes:indexesToAdd maxCount:Number.MAX_VALUE inIndexRange:nil]; + + for (var i = 0; i < indexesToRemove.length; i++) + { + var row = indexesToRemove[i]; + for (var column = 0; column < _tableColumns.length; column++) + if ([_tableCells[column][row] respondsToSelector:@selector(highlight:)]) + [_tableCells[column][row] highlight:NO]; + } + for (var i = 0; i < indexesToAdd.length; i++) + { + var row = indexesToAdd[i]; + for (var column = 0; column < _tableColumns.length; column++) + if ([_tableCells[column][row] respondsToSelector:@selector(highlight:)]) + [_tableCells[column][row] highlight:YES]; + } + + // add each one we need to add, taking the selection views from removed seelctions, the pool, or new + for (var i = 0; i < indexesToAdd.length; i++) + { + var index = indexesToAdd[i], + view; + + if (indexesToRemove.length > 0) + { + view = _selectionViews[indexesToRemove.pop()]; + } + else if (_selectionViewsPool.length > 0) + { + view = _selectionViewsPool.pop(); + [self addSubview:view positioned:CPWindowBelow relativeTo:nil]; + } + else + { + view = [[CPView alloc] init]; + [view setBackgroundColor:[CPColor alternateSelectedControlColor]]; + + [self addSubview:view positioned:CPWindowBelow relativeTo:nil]; + } + + _selectionViews[index] = view; + + var frame = [self rectOfRow:index]; + frame.size.height += _intercellSpacing.height - 1; + //frame.size.width += 500; + + [view setFrame:frame]; + } + + // remove any selections that weren't already reused + for (var i = 0; i < indexesToRemove.length; i++) + { + var row = indexesToRemove[i], + view = _selectionViews[row]; + + [view removeFromSuperview]; + _selectionViewsPool.push(view); + } + + // update the currently selected index set + _currentlySelected = [_selectedRowIndexes copy]; +} + +@end + + +var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", + CPTableViewDelegateKey = @"CPTableViewDelegateKey", + CPTableViewHeaderViewKey = @"CPTableViewHeaderViewKey", + CPTableViewTableColumnsKey = @"CPTableViewTableColumnsKey", + CPTableViewRowHeightKey = @"CPTableViewRowHeightKey", + CPTableViewIntercellSpacingKey = @"CPTableViewIntercellSpacingKey", + CPTableViewMultipleSelectionKey = @"CPTableViewMultipleSelectionKey", + CPTableViewEmptySelectionKey = @"CPTableViewEmptySelectionKey"; + +@implementation CPTableView (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder +{ + if (self = [super initWithCoder:aCoder]) + { + [self _init]; + + _dataSource = [aCoder decodeObjectForKey:CPTableViewDataSourceKey]; + _delegate = [aCoder decodeObjectForKey:CPTableViewDelegateKey]; + + _rowHeight = [aCoder decodeFloatForKey:CPTableViewRowHeightKey]; + _intercellSpacing = [aCoder decodeSizeForKey:CPTableViewIntercellSpacingKey]; + + _allowsMultipleSelection = [aCoder decodeBoolForKey:CPTableViewMultipleSelectionKey]; + _allowsEmptySelection = [aCoder decodeBoolForKey:CPTableViewEmptySelectionKey]; + + var tableColumns = [aCoder decodeObjectForKey:CPTableViewTableColumnsKey]; + for (var i = 0; i < tableColumns.length; i++) + [self addTableColumn:tableColumns[i]]; + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [super encodeWithCoder:aCoder]; + + [aCoder encodeObject:_dataSource forKey:CPTableViewDataSourceKey]; + [aCoder encodeObject:_delegate forKey:CPTableViewDelegateKey]; + + [aCoder encodeObject:_tableColumns forKey:CPTableViewTableColumnsKey]; + + [aCoder encodeFloat:_rowHeight forKey:CPTableViewRowHeightKey]; + [aCoder encodeSize:_intercellSpacing forKey:CPTableViewIntercellSpacingKey]; + + [aCoder encodeBool:_allowsMultipleSelection forKey:CPTableViewMultipleSelectionKey]; + [aCoder encodeBool:_allowsEmptySelection forKey:CPTableViewEmptySelectionKey]; +} + +@end + + + +@implementation CPColor (TableView) + ++ (CPColor)alternateSelectedControlColor +{ + return [[CPColor alloc] _initWithRGBA:[0.22, 0.46, 0.84, 1.0]]; +} + ++ (CPColor)secondarySelectedControlColor +{ + return [[CPColor alloc] _initWithRGBA:[0.83, 0.83, 0.83, 1.0]]; +} + +@end diff --git a/TableCibTest/AppController.j b/TableCibTest/AppController.j new file mode 100644 index 000000000..a079fb6e1 --- /dev/null +++ b/TableCibTest/AppController.j @@ -0,0 +1,45 @@ +/* + * AppController.j + * TableCibTest + * + * Created by Francisco Tolmasky on July 5, 2009. + * Copyright 2009, 280 North, Inc. All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib +} + +- (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 setFullBridge:YES]; +} + +- (int)numberOfRowsInTableView:(CPTableView)tableView +{ + return 700000; +} + +- (id)tableView:(CPTableView)tableView objectValueForTableColumn:(CPTableColumn)tableColumn row:(int)row +{ + if ([tableColumn identifier] === "icons") + return iconImage; + else + return String((row + 1) * [[tableColumn identifier] intValue]); +} + +@end diff --git a/TableCibTest/Info.plist b/TableCibTest/Info.plist new file mode 100644 index 000000000..f2ebe529d --- /dev/null +++ b/TableCibTest/Info.plist @@ -0,0 +1,12 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + TableCibTest + CPPrincipalClass + CPApplication + + diff --git a/TableCibTest/Rakefile b/TableCibTest/Rakefile new file mode 100644 index 000000000..ead2456ce --- /dev/null +++ b/TableCibTest/Rakefile @@ -0,0 +1,25 @@ + +require 'objective-j' +require 'objective-j/bundletask' + +if !ENV['CONFIG'] + ENV['CONFIG'] = 'Debug' +end + +ObjectiveJ::BundleTask.new(:TableCibTest) do |t| + t.name = 'TableCibTest' + t.identifier = 'com.280n.TableCibTest' + t.version = '1.0' + t.author = '280 North, Inc.' + t.email = 'feedback @nospam@ 280north.com' + t.summary = 'TableCibTest' + t.sources = FileList['*.j'] + t.resources = FileList['Resources/*'] + t.index_file = 'index.html' + t.info_plist = 'Info.plist' + t.build_path = File.join('Build', ENV['CONFIG'], 'TableCibTest') + t.flag = '-DDEBUG' if ENV['CONFIG'] == 'Debug' + t.flag = '-O' if ENV['CONFIG'] == 'Release' +end + +task :default => [:TableCibTest] diff --git a/TableCibTest/Resources/MainMenu.cib b/TableCibTest/Resources/MainMenu.cib new file mode 100644 index 000000000..5a70d0b85 --- /dev/null +++ b/TableCibTest/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;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;1;0E;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;1;0E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;1;0E;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;71E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;101E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;3;104E;D;K;6;CP$UIDd;3;105E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;106E;D;K;6;CP$UIDd;3;107E;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;3;109E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;112E;D;K;6;CP$UIDd;3;113E;D;K;6;CP$UIDd;3;114E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;116E;D;K;6;CP$UIDd;3;117E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;119E;D;K;6;CP$UIDd;3;120E;D;K;6;CP$UIDd;3;121E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;123E;D;K;6;CP$UIDd;3;124E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;127E;D;K;6;CP$UIDd;3;128E;D;K;6;CP$UIDd;3;130E;D;K;6;CP$UIDd;3;131E;D;K;6;CP$UIDd;3;132E;D;K;6;CP$UIDd;3;133E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;3;141E;D;K;6;CP$UIDd;3;142E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;145E;D;K;6;CP$UIDd;3;146E;D;K;6;CP$UIDd;3;147E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;148E;D;K;6;CP$UIDd;3;149E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;3;151E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;153E;D;K;6;CP$UIDd;3;154E;D;K;6;CP$UIDd;3;155E;D;K;6;CP$UIDd;3;156E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;157E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;159E;D;K;6;CP$UIDd;3;160E;D;K;6;CP$UIDd;3;161E;D;K;6;CP$UIDd;3;162E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;3;164E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;166E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;167E;D;K;6;CP$UIDd;3;168E;D;K;6;CP$UIDd;3;169E;D;K;6;CP$UIDd;3;170E;D;K;6;CP$UIDd;3;171E;D;K;6;CP$UIDd;3;172E;D;K;6;CP$UIDd;3;173E;D;K;6;CP$UIDd;3;174E;D;K;6;CP$UIDd;3;175E;D;K;6;CP$UIDd;3;176E;D;K;6;CP$UIDd;3;177E;D;K;6;CP$UIDd;3;178E;D;K;6;CP$UIDd;3;179E;D;K;6;CP$UIDd;3;180E;D;K;6;CP$UIDd;3;181E;D;K;6;CP$UIDd;3;182E;D;K;6;CP$UIDd;3;183E;D;K;6;CP$UIDd;3;184E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;187E;D;K;6;CP$UIDd;3;188E;D;K;6;CP$UIDd;3;189E;D;K;6;CP$UIDd;3;190E;D;K;6;CP$UIDd;3;191E;D;K;6;CP$UIDd;3;192E;D;K;6;CP$UIDd;3;193E;D;K;6;CP$UIDd;3;194E;D;K;6;CP$UIDd;3;195E;D;K;6;CP$UIDd;3;196E;D;K;6;CP$UIDd;3;197E;D;K;6;CP$UIDd;3;198E;D;K;6;CP$UIDd;3;199E;D;K;6;CP$UIDd;3;200E;D;K;6;CP$UIDd;3;201E;D;K;6;CP$UIDd;3;202E;D;K;6;CP$UIDd;3;203E;D;K;6;CP$UIDd;3;204E;D;K;6;CP$UIDd;3;205E;D;K;6;CP$UIDd;3;206E;D;K;6;CP$UIDd;3;207E;D;K;6;CP$UIDd;3;208E;D;K;6;CP$UIDd;3;209E;D;K;6;CP$UIDd;3;210E;D;K;6;CP$UIDd;3;211E;D;K;6;CP$UIDd;3;212E;D;K;6;CP$UIDd;3;213E;D;K;6;CP$UIDd;3;214E;D;K;6;CP$UIDd;3;215E;D;K;6;CP$UIDd;3;216E;D;K;6;CP$UIDd;3;217E;D;K;6;CP$UIDd;3;218E;D;K;6;CP$UIDd;3;219E;D;K;6;CP$UIDd;3;220E;D;K;6;CP$UIDd;3;221E;D;K;6;CP$UIDd;3;222E;D;K;6;CP$UIDd;3;223E;D;K;6;CP$UIDd;3;224E;D;K;6;CP$UIDd;3;225E;D;K;6;CP$UIDd;3;226E;D;K;6;CP$UIDd;3;227E;D;K;6;CP$UIDd;3;228E;D;K;6;CP$UIDd;3;229E;D;K;6;CP$UIDd;3;230E;D;K;6;CP$UIDd;3;231E;D;K;6;CP$UIDd;3;232E;D;K;6;CP$UIDd;3;233E;D;K;6;CP$UIDd;3;234E;D;K;6;CP$UIDd;3;235E;D;K;6;CP$UIDd;3;236E;D;K;6;CP$UIDd;3;237E;D;K;6;CP$UIDd;3;238E;D;K;6;CP$UIDd;3;239E;D;K;6;CP$UIDd;3;240E;D;K;6;CP$UIDd;3;241E;D;K;6;CP$UIDd;3;242E;D;K;6;CP$UIDd;3;243E;D;K;6;CP$UIDd;3;244E;D;K;6;CP$UIDd;3;245E;D;K;6;CP$UIDd;3;246E;D;K;6;CP$UIDd;3;247E;D;K;6;CP$UIDd;3;248E;D;K;6;CP$UIDd;3;249E;D;K;6;CP$UIDd;3;250E;D;K;6;CP$UIDd;3;251E;D;K;6;CP$UIDd;3;252E;D;K;6;CP$UIDd;3;253E;D;K;6;CP$UIDd;3;254E;D;K;6;CP$UIDd;3;255E;D;K;6;CP$UIDd;3;256E;D;K;6;CP$UIDd;3;257E;D;K;6;CP$UIDd;3;258E;D;K;6;CP$UIDd;3;259E;D;K;6;CP$UIDd;3;260E;D;K;6;CP$UIDd;3;261E;D;K;6;CP$UIDd;3;262E;D;K;6;CP$UIDd;3;263E;D;K;6;CP$UIDd;3;264E;D;K;6;CP$UIDd;3;265E;D;K;6;CP$UIDd;3;266E;D;K;6;CP$UIDd;3;267E;D;K;6;CP$UIDd;3;268E;D;K;6;CP$UIDd;3;269E;D;K;6;CP$UIDd;3;270E;D;K;6;CP$UIDd;3;271E;D;K;6;CP$UIDd;3;272E;D;K;6;CP$UIDd;3;273E;D;K;6;CP$UIDd;3;274E;D;K;6;CP$UIDd;3;275E;D;K;6;CP$UIDd;3;276E;D;K;6;CP$UIDd;3;277E;D;K;6;CP$UIDd;3;278E;D;K;6;CP$UIDd;3;279E;D;K;6;CP$UIDd;3;280E;D;K;6;CP$UIDd;3;281E;D;K;6;CP$UIDd;3;282E;D;K;6;CP$UIDd;3;283E;D;K;6;CP$UIDd;3;284E;D;K;6;CP$UIDd;3;285E;D;K;6;CP$UIDd;3;286E;D;K;6;CP$UIDd;3;287E;D;K;6;CP$UIDd;3;288E;D;K;6;CP$UIDd;3;289E;D;K;6;CP$UIDd;3;290E;D;K;6;CP$UIDd;3;291E;D;K;6;CP$UIDd;3;292E;D;K;6;CP$UIDd;3;293E;D;K;6;CP$UIDd;3;294E;D;K;6;CP$UIDd;3;295E;D;K;6;CP$UIDd;3;296E;D;K;6;CP$UIDd;3;297E;D;K;6;CP$UIDd;3;298E;D;K;6;CP$UIDd;3;299E;D;K;6;CP$UIDd;3;300E;D;K;6;CP$UIDd;3;301E;D;K;6;CP$UIDd;3;302E;D;K;6;CP$UIDd;3;303E;D;K;6;CP$UIDd;3;304E;D;K;6;CP$UIDd;3;305E;D;K;6;CP$UIDd;3;306E;D;K;6;CP$UIDd;3;307E;D;K;6;CP$UIDd;3;308E;D;K;6;CP$UIDd;3;309E;D;K;6;CP$UIDd;3;310E;D;K;6;CP$UIDd;3;311E;D;K;6;CP$UIDd;3;312E;D;K;6;CP$UIDd;3;313E;D;K;6;CP$UIDd;3;314E;D;K;6;CP$UIDd;3;315E;D;K;6;CP$UIDd;3;316E;D;K;6;CP$UIDd;3;317E;D;K;6;CP$UIDd;3;318E;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;3;320E;D;K;6;CP$UIDd;3;321E;D;K;6;CP$UIDd;3;322E;D;K;6;CP$UIDd;3;323E;D;K;6;CP$UIDd;3;324E;D;K;6;CP$UIDd;3;325E;D;K;6;CP$UIDd;3;326E;D;K;6;CP$UIDd;3;327E;D;K;6;CP$UIDd;3;328E;D;K;6;CP$UIDd;3;329E;D;K;6;CP$UIDd;3;330E;D;K;6;CP$UIDd;3;331E;D;K;6;CP$UIDd;3;332E;D;K;6;CP$UIDd;3;333E;D;K;6;CP$UIDd;3;334E;D;K;6;CP$UIDd;3;335E;D;K;6;CP$UIDd;3;336E;D;K;6;CP$UIDd;3;337E;D;K;6;CP$UIDd;3;338E;D;K;6;CP$UIDd;3;339E;D;K;6;CP$UIDd;3;340E;D;K;6;CP$UIDd;3;341E;D;K;6;CP$UIDd;3;342E;D;K;6;CP$UIDd;3;343E;D;K;6;CP$UIDd;3;344E;D;K;6;CP$UIDd;3;345E;D;K;6;CP$UIDd;3;347E;D;K;6;CP$UIDd;3;348E;D;K;6;CP$UIDd;3;349E;D;K;6;CP$UIDd;3;350E;D;K;6;CP$UIDd;3;351E;D;K;6;CP$UIDd;3;352E;D;K;6;CP$UIDd;3;353E;D;K;6;CP$UIDd;3;354E;D;K;6;CP$UIDd;3;355E;D;K;6;CP$UIDd;3;356E;D;K;6;CP$UIDd;3;357E;D;K;6;CP$UIDd;3;358E;D;K;6;CP$UIDd;3;359E;D;K;6;CP$UIDd;3;360E;D;K;6;CP$UIDd;3;361E;D;K;6;CP$UIDd;3;362E;D;K;6;CP$UIDd;3;363E;D;K;6;CP$UIDd;3;364E;D;K;6;CP$UIDd;3;365E;D;K;6;CP$UIDd;3;366E;D;K;6;CP$UIDd;3;367E;D;K;6;CP$UIDd;3;368E;D;K;6;CP$UIDd;3;369E;D;K;6;CP$UIDd;3;370E;D;K;6;CP$UIDd;3;371E;D;K;6;CP$UIDd;3;372E;D;K;6;CP$UIDd;3;373E;D;K;6;CP$UIDd;3;374E;D;K;6;CP$UIDd;3;375E;D;K;6;CP$UIDd;3;376E;D;K;6;CP$UIDd;3;377E;D;K;6;CP$UIDd;3;378E;D;K;6;CP$UIDd;3;379E;D;K;6;CP$UIDd;3;380E;D;K;6;CP$UIDd;3;381E;D;K;6;CP$UIDd;3;382E;D;K;6;CP$UIDd;3;383E;D;K;6;CP$UIDd;3;384E;E;E;S;16;IBCocoaFrameworkd;3;490D;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;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;51E;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;1;0E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;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;71E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;74E;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;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;3;104E;D;K;6;CP$UIDd;3;101E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;105E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;106E;D;K;6;CP$UIDd;3;107E;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;3;109E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;112E;D;K;6;CP$UIDd;3;113E;D;K;6;CP$UIDd;3;114E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;116E;D;K;6;CP$UIDd;3;117E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;120E;D;K;6;CP$UIDd;3;119E;D;K;6;CP$UIDd;3;121E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;123E;D;K;6;CP$UIDd;3;124E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;127E;D;K;6;CP$UIDd;3;128E;D;K;6;CP$UIDd;3;131E;D;K;6;CP$UIDd;3;130E;D;K;6;CP$UIDd;3;132E;D;K;6;CP$UIDd;3;133E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;3;142E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;141E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;145E;D;K;6;CP$UIDd;3;146E;D;K;6;CP$UIDd;3;147E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;148E;D;K;6;CP$UIDd;3;149E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;3;151E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;153E;D;K;6;CP$UIDd;3;154E;D;K;6;CP$UIDd;3;155E;D;K;6;CP$UIDd;3;157E;D;K;6;CP$UIDd;3;156E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;159E;D;K;6;CP$UIDd;3;160E;D;K;6;CP$UIDd;3;161E;D;K;6;CP$UIDd;3;162E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;3;164E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;166E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;3;141E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;3;124E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;130E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;112E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;3;116E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;91E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;341E;D;K;6;CP$UIDd;3;359E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;3;322E;D;K;6;CP$UIDd;3;354E;D;K;6;CP$UIDd;3;343E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;3;357E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;3;339E;D;K;6;CP$UIDd;3;345E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;378E;D;K;6;CP$UIDd;3;366E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;3;324E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;69E;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;79E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;3;369E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;3;338E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;3;365E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;3;350E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;3;101E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;106E;D;K;6;CP$UIDd;3;107E;D;K;6;CP$UIDd;3;352E;D;K;6;CP$UIDd;3;325E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;113E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;116E;D;K;6;CP$UIDd;3;117E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;120E;D;K;6;CP$UIDd;3;119E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;122E;D;K;6;CP$UIDd;3;374E;D;K;6;CP$UIDd;3;336E;D;K;6;CP$UIDd;3;349E;D;K;6;CP$UIDd;3;127E;D;K;6;CP$UIDd;3;356E;D;K;6;CP$UIDd;3;128E;D;K;6;CP$UIDd;3;131E;D;K;6;CP$UIDd;3;130E;D;K;6;CP$UIDd;3;132E;D;K;6;CP$UIDd;3;133E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;361E;D;K;6;CP$UIDd;3;142E;D;K;6;CP$UIDd;3;141E;D;K;6;CP$UIDd;3;334E;D;K;6;CP$UIDd;3;145E;D;K;6;CP$UIDd;3;146E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;149E;D;K;6;CP$UIDd;3;152E;D;K;6;CP$UIDd;3;153E;D;K;6;CP$UIDd;3;154E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;362E;D;K;6;CP$UIDd;3;372E;D;K;6;CP$UIDd;3;383E;D;K;6;CP$UIDd;3;160E;D;K;6;CP$UIDd;3;161E;D;K;6;CP$UIDd;3;323E;D;K;6;CP$UIDd;3;164E;D;K;6;CP$UIDd;3;380E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;3;368E;D;K;6;CP$UIDd;3;355E;D;K;6;CP$UIDd;3;328E;D;K;6;CP$UIDd;3;342E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;3;376E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;330E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;3;379E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;3;329E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;3;353E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;3;321E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;3;360E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;3;344E;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;86E;D;K;6;CP$UIDd;3;320E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;3;326E;D;K;6;CP$UIDd;2;98E;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;104E;D;K;6;CP$UIDd;3;335E;D;K;6;CP$UIDd;3;105E;D;K;6;CP$UIDd;3;367E;D;K;6;CP$UIDd;3;333E;D;K;6;CP$UIDd;3;373E;D;K;6;CP$UIDd;3;381E;D;K;6;CP$UIDd;3;108E;D;K;6;CP$UIDd;3;109E;D;K;6;CP$UIDd;3;110E;D;K;6;CP$UIDd;3;348E;D;K;6;CP$UIDd;3;111E;D;K;6;CP$UIDd;3;112E;D;K;6;CP$UIDd;3;340E;D;K;6;CP$UIDd;3;114E;D;K;6;CP$UIDd;3;371E;D;K;6;CP$UIDd;3;363E;D;K;6;CP$UIDd;3;121E;D;K;6;CP$UIDd;3;337E;D;K;6;CP$UIDd;3;123E;D;K;6;CP$UIDd;3;124E;D;K;6;CP$UIDd;3;126E;D;K;6;CP$UIDd;3;331E;D;K;6;CP$UIDd;3;377E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;3;351E;D;K;6;CP$UIDd;3;137E;D;K;6;CP$UIDd;3;382E;D;K;6;CP$UIDd;3;327E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;370E;D;K;6;CP$UIDd;3;384E;D;K;6;CP$UIDd;3;147E;D;K;6;CP$UIDd;3;148E;D;K;6;CP$UIDd;3;375E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;3;151E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;3;155E;D;K;6;CP$UIDd;3;347E;D;K;6;CP$UIDd;3;157E;D;K;6;CP$UIDd;3;156E;D;K;6;CP$UIDd;3;159E;D;K;6;CP$UIDd;3;332E;D;K;6;CP$UIDd;3;162E;D;K;6;CP$UIDd;3;364E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;3;358E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;3;166E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;385E;D;K;6;CP$UIDd;3;386E;D;K;6;CP$UIDd;3;387E;D;K;6;CP$UIDd;3;388E;D;K;6;CP$UIDd;3;389E;D;K;6;CP$UIDd;3;390E;D;K;6;CP$UIDd;3;391E;D;K;6;CP$UIDd;3;392E;D;K;6;CP$UIDd;3;393E;D;K;6;CP$UIDd;3;394E;D;K;6;CP$UIDd;3;395E;D;K;6;CP$UIDd;3;396E;D;K;6;CP$UIDd;3;397E;D;K;6;CP$UIDd;3;398E;D;K;6;CP$UIDd;3;399E;D;K;6;CP$UIDd;3;400E;D;K;6;CP$UIDd;3;401E;D;K;6;CP$UIDd;3;402E;D;K;6;CP$UIDd;3;403E;D;K;6;CP$UIDd;3;404E;D;K;6;CP$UIDd;3;405E;D;K;6;CP$UIDd;3;406E;D;K;6;CP$UIDd;3;407E;D;K;6;CP$UIDd;3;408E;D;K;6;CP$UIDd;3;409E;D;K;6;CP$UIDd;3;410E;D;K;6;CP$UIDd;3;411E;D;K;6;CP$UIDd;3;412E;D;K;6;CP$UIDd;3;413E;D;K;6;CP$UIDd;3;414E;D;K;6;CP$UIDd;3;415E;D;K;6;CP$UIDd;3;416E;D;K;6;CP$UIDd;3;417E;D;K;6;CP$UIDd;3;418E;D;K;6;CP$UIDd;3;419E;D;K;6;CP$UIDd;3;420E;D;K;6;CP$UIDd;3;421E;D;K;6;CP$UIDd;3;422E;D;K;6;CP$UIDd;3;423E;D;K;6;CP$UIDd;3;424E;D;K;6;CP$UIDd;3;425E;D;K;6;CP$UIDd;3;426E;D;K;6;CP$UIDd;3;427E;D;K;6;CP$UIDd;3;428E;D;K;6;CP$UIDd;3;429E;D;K;6;CP$UIDd;3;430E;D;K;6;CP$UIDd;3;431E;D;K;6;CP$UIDd;3;432E;D;K;6;CP$UIDd;3;433E;D;K;6;CP$UIDd;3;434E;D;K;6;CP$UIDd;3;435E;D;K;6;CP$UIDd;3;436E;D;K;6;CP$UIDd;3;437E;D;K;6;CP$UIDd;3;438E;D;K;6;CP$UIDd;3;439E;D;K;6;CP$UIDd;3;440E;D;K;6;CP$UIDd;3;441E;D;K;6;CP$UIDd;3;442E;D;K;6;CP$UIDd;3;443E;D;K;6;CP$UIDd;3;444E;D;K;6;CP$UIDd;3;445E;D;K;6;CP$UIDd;3;446E;D;K;6;CP$UIDd;3;447E;D;K;6;CP$UIDd;3;448E;D;K;6;CP$UIDd;3;449E;D;K;6;CP$UIDd;3;450E;D;K;6;CP$UIDd;3;451E;D;K;6;CP$UIDd;3;452E;D;K;6;CP$UIDd;3;453E;D;K;6;CP$UIDd;3;454E;D;K;6;CP$UIDd;3;455E;D;K;6;CP$UIDd;3;456E;D;K;6;CP$UIDd;3;457E;D;K;6;CP$UIDd;3;458E;D;K;6;CP$UIDd;3;459E;D;K;6;CP$UIDd;3;460E;D;K;6;CP$UIDd;3;461E;D;K;6;CP$UIDd;3;462E;D;K;6;CP$UIDd;3;463E;D;K;6;CP$UIDd;3;464E;D;K;6;CP$UIDd;3;465E;D;K;6;CP$UIDd;3;466E;D;K;6;CP$UIDd;3;467E;D;K;6;CP$UIDd;3;468E;D;K;6;CP$UIDd;3;469E;D;K;6;CP$UIDd;3;470E;D;K;6;CP$UIDd;3;471E;D;K;6;CP$UIDd;3;472E;D;K;6;CP$UIDd;3;473E;D;K;6;CP$UIDd;3;474E;D;K;6;CP$UIDd;3;475E;D;K;6;CP$UIDd;3;476E;D;K;6;CP$UIDd;3;477E;D;K;6;CP$UIDd;3;478E;D;K;6;CP$UIDd;3;479E;D;K;6;CP$UIDd;3;480E;D;K;6;CP$UIDd;3;481E;D;K;6;CP$UIDd;3;482E;D;K;6;CP$UIDd;3;483E;D;K;6;CP$UIDd;3;484E;D;K;6;CP$UIDd;3;485E;D;K;6;CP$UIDd;3;486E;D;K;6;CP$UIDd;3;487E;D;K;6;CP$UIDd;3;488E;D;K;6;CP$UIDd;3;489E;D;K;6;CP$UIDd;3;490E;D;K;6;CP$UIDd;3;491E;D;K;6;CP$UIDd;3;492E;D;K;6;CP$UIDd;3;493E;D;K;6;CP$UIDd;3;494E;D;K;6;CP$UIDd;3;495E;D;K;6;CP$UIDd;3;496E;D;K;6;CP$UIDd;3;497E;D;K;6;CP$UIDd;3;498E;D;K;6;CP$UIDd;3;499E;D;K;6;CP$UIDd;3;500E;D;K;6;CP$UIDd;3;501E;D;K;6;CP$UIDd;3;502E;D;K;6;CP$UIDd;3;503E;D;K;6;CP$UIDd;3;504E;D;K;6;CP$UIDd;3;505E;D;K;6;CP$UIDd;3;506E;D;K;6;CP$UIDd;3;507E;D;K;6;CP$UIDd;3;508E;D;K;6;CP$UIDd;3;509E;D;K;6;CP$UIDd;3;510E;D;K;6;CP$UIDd;3;511E;D;K;6;CP$UIDd;3;512E;D;K;6;CP$UIDd;3;513E;D;K;6;CP$UIDd;3;514E;D;K;6;CP$UIDd;3;515E;D;K;6;CP$UIDd;3;516E;D;K;6;CP$UIDd;3;517E;D;K;6;CP$UIDd;3;518E;D;K;6;CP$UIDd;3;519E;D;K;6;CP$UIDd;3;520E;D;K;6;CP$UIDd;3;521E;D;K;6;CP$UIDd;3;522E;D;K;6;CP$UIDd;3;523E;D;K;6;CP$UIDd;3;524E;D;K;6;CP$UIDd;3;525E;D;K;6;CP$UIDd;3;526E;D;K;6;CP$UIDd;3;527E;D;K;6;CP$UIDd;3;528E;D;K;6;CP$UIDd;3;529E;D;K;6;CP$UIDd;3;530E;D;K;6;CP$UIDd;3;531E;D;K;6;CP$UIDd;3;532E;D;K;6;CP$UIDd;3;533E;D;K;6;CP$UIDd;3;534E;D;K;6;CP$UIDd;3;535E;D;K;6;CP$UIDd;3;536E;D;K;6;CP$UIDd;3;537E;D;K;6;CP$UIDd;3;538E;D;K;6;CP$UIDd;3;539E;D;K;6;CP$UIDd;3;540E;D;K;6;CP$UIDd;3;541E;D;K;6;CP$UIDd;3;542E;D;K;6;CP$UIDd;3;543E;D;K;6;CP$UIDd;3;544E;D;K;6;CP$UIDd;3;545E;D;K;6;CP$UIDd;3;546E;D;K;6;CP$UIDd;3;547E;D;K;6;CP$UIDd;3;548E;D;K;6;CP$UIDd;3;549E;D;K;6;CP$UIDd;3;550E;D;K;6;CP$UIDd;3;551E;D;K;6;CP$UIDd;3;552E;D;K;6;CP$UIDd;3;553E;D;K;6;CP$UIDd;3;554E;D;K;6;CP$UIDd;3;555E;D;K;6;CP$UIDd;3;556E;D;K;6;CP$UIDd;3;557E;D;K;6;CP$UIDd;3;558E;D;K;6;CP$UIDd;3;559E;D;K;6;CP$UIDd;3;560E;D;K;6;CP$UIDd;3;561E;D;K;6;CP$UIDd;3;562E;D;K;6;CP$UIDd;3;563E;D;K;6;CP$UIDd;3;564E;D;K;6;CP$UIDd;3;565E;D;K;6;CP$UIDd;3;566E;D;K;6;CP$UIDd;3;567E;D;K;6;CP$UIDd;3;568E;D;K;6;CP$UIDd;3;569E;D;K;6;CP$UIDd;3;570E;D;K;6;CP$UIDd;3;571E;D;K;6;CP$UIDd;3;572E;D;K;6;CP$UIDd;3;573E;D;K;6;CP$UIDd;3;574E;D;K;6;CP$UIDd;3;575E;D;K;6;CP$UIDd;3;576E;D;K;6;CP$UIDd;3;577E;D;K;6;CP$UIDd;3;578E;D;K;6;CP$UIDd;3;579E;D;K;6;CP$UIDd;3;580E;D;K;6;CP$UIDd;3;581E;D;K;6;CP$UIDd;3;582E;D;K;6;CP$UIDd;3;583E;D;K;6;CP$UIDd;3;584E;D;K;6;CP$UIDd;3;585E;D;K;6;CP$UIDd;3;586E;D;K;6;CP$UIDd;3;587E;D;K;6;CP$UIDd;3;588E;D;K;6;CP$UIDd;3;589E;D;K;6;CP$UIDd;3;590E;D;K;6;CP$UIDd;3;591E;D;K;6;CP$UIDd;3;592E;D;K;6;CP$UIDd;3;593E;D;K;6;CP$UIDd;3;594E;D;K;6;CP$UIDd;3;595E;D;K;6;CP$UIDd;3;596E;D;K;6;CP$UIDd;3;597E;D;K;6;CP$UIDd;3;598E;D;K;6;CP$UIDd;3;599E;D;K;6;CP$UIDd;3;600E;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;3;601E;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;3;602E;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;71E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;603E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;604E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;71E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;605E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;606E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;607E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;71E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;608E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;609E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;3;607E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;610E;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;3;611E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;612E;E;D;K;10;$classnameS;10;CPMenuItemK;8;$classesA;S;10;CPMenuItemS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;616E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;53E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;618E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;619E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;620E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;86E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;621E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;111E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;84E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;622E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;623E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;624E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;625E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;626E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;627E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;628E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;137E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;629E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;630E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;122E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;10;$classnameS;13;CPTableColumnK;8;$classesA;S;13;CPTableColumnS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;634E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;635E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;636E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;47E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;84E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;637E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;636E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;638E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;639E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;98E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;640E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;641E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;122E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;616E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;642E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;643E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;644E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;601E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;645E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;646E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;647E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;118E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;648E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;95E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;22E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;649E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;47E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;650E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;118E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;651E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;652E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;34E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;653E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;53E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;652E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;654E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;152E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;22E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;655E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;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;70E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;130E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;656E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;657E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;658E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;130E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;659E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;606E;K;23;CPScrollViewContentViewD;K;6;CP$UIDd;3;661E;K;21;CPScrollViewVScrollerD;K;6;CP$UIDd;3;101E;K;21;CPScrollViewHScrollerD;K;6;CP$UIDd;2;20E;K;23;CPScrollViewVLineScrollD;K;6;CP$UIDd;3;632E;K;23;CPScrollViewVPageScrollD;K;6;CP$UIDd;3;632E;K;23;CPScrollViewHLineScrollD;K;6;CP$UIDd;3;632E;K;23;CPScrollViewHPageScrollD;K;6;CP$UIDd;3;632E;K;24;CPScrollViewHasVScrollerD;K;6;CP$UIDd;3;613E;K;24;CPScrollViewHasHScrollerD;K;6;CP$UIDd;3;613E;K;29;CPScrollViewAutohidesScrollerD;K;6;CP$UIDd;3;615E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;662E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;47E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;663E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;664E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;665E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;666E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;667E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;86E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;84E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;668E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;669E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;34E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;670E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;137E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;671E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;672E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;110E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;673E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;674E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;675E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;676E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;667E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;677E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;87E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;3;678E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;3;679E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;3;680E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;3;681E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;3;682E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;3;130E;K;41;_CPCibWindowTemplateWindowIsFullBridgeKeyD;K;6;CP$UIDd;3;615E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;683E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;3;162E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;682E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;684E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;685E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;686E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;687E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;122E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;648E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;688E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;689E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;690E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;691E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;639E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;692E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;693E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;71E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;694E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;695E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;71E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;605E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;696E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;607E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;71E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;608E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;609E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;3;607E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;697E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;698E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;53E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;699E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;700E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;701E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;702E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;703E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;118E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;652E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;118E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;672E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;704E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;621E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;705E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;690E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;97E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;706E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;707E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;665E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;666E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;708E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;137E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;650E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;709E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;710E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;711E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;34E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;712E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;630E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;713E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;714E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;53E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;622E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;31E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;84E;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;3;125E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;661E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;715E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;715E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;661E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;605E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;606E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;609E;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;716E;K;30;CPTableViewIntercellSpacingKeyD;K;6;CP$UIDd;3;717E;K;31;CPTableViewMultipleSelectionKeyD;K;6;CP$UIDd;3;615E;K;28;CPTableViewEmptySelectionKeyD;K;6;CP$UIDd;3;613E;K;26;CPTableViewTableColumnsKeyD;K;6;CP$UIDd;3;718E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;719E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;720E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;129E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;721E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;721E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;722E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;605E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;606E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;723E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;110E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;724E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;725E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;682E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;90E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;84E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;726E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;34E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;685E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;91E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;84E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;670E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;727E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;728E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;631E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;632E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;633E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;611E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;22E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;84E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;729E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;137E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;626E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;617E;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;1;0E;K;20;CPMenuItemSubmenuKeyD;K;6;CP$UIDd;2;34E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;730E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;110E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;731E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;110E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;732E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;110E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;733E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;734E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;137E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;647E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;98E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;735E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;654E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;736E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;737E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;738E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;137E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;739E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;740E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;34E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;741E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;742E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;743E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;111E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;3;152E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;683E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;744E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;745E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;31E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;746E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;97E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;747E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;24;CPMenuItemIsSeparatorKeyD;K;6;CP$UIDd;3;613E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;614E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;1;0E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;1;0E;K;22;CPMenuItemIsEnabledKeyD;K;6;CP$UIDd;3;615E;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;1;0E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;91E;E;S;19;Horizontal ScrollerS;13;Menu (Format)S;11;Separator-8S;25;Menu Item (Substitutions)S;22;Menu Item (Align Left)S;1;5S;31;Menu Item (NewApplication Help)S;16;Menu Item (File)S;9;SeparatorS;21;Menu (NewApplication)S;23;Menu Item (Hide Others)S;18;Menu Item (Delete)S;15;Menu (Baseline)S;17;Menu Item (Find…)S;1;3S;12;File's OwnerS;18;Menu Item (Speech)S;12;Table ColumnS;14;Table Column-1S;31;Menu Item (Hide NewApplication)S;30;Menu Item (Bring All to Front)S;11;Separator-1S;3;2-1S;16;Menu Item (View)S;23;Menu Item (Paste Style)S;29;Text Field Cell (Text Cell)-7S;11;Menu (View)S;16;Menu Item (Kern)S;18;Menu Item (Italic)S;11;Separator-9S;14;Table Column-2S;25;Menu Item (Stop Speaking)S;20;Menu (Substitutions)S;4;1111S;16;Menu Item (Undo)S;11;ApplicationS;19;Menu Item (Justify)S;2;10S;29;Text Field Cell (Text Cell)-8S;22;Menu Item (Use None)-1S;16;Menu Item (Text)S;24;Menu Item (Show Toolbar)S;29;Text Field Cell (Text Cell)-4S;20;Menu Item (Ligature)S;29;Text Field Cell (Text Cell)-5S;19;Menu Item (Tighten)S;11;Separator-2S;25;Menu Item (Use Default)-2S;23;Menu Item (Smart Links)S;23;Menu Item (Use Default)S;16;Menu Item (Font)S;18;Menu Item (Center)S;33;Bordered Scroll View (Table View)S;30;Menu Item (Customize Toolbar…)S;17;Menu Item (Open…)S;14;Table Column-4S;14;Table Column-3S;1;1S;15;Menu Item (Cut)S;17;Menu Item (Lower)S;16;Menu Item (Find)S;16;Menu Item (Copy)S;32;Menu Item (Spelling and Grammar)S;1;9S;14;Table Column-5S;8;MainMenuS;32;Menu Item (About NewApplication)S;1;2S;15;Window (Window)S;20;Menu Item (Services)S;13;Menu (Window)S;11;Menu (Edit)S;14;Table Column-6S;11;Separator-3S;26;Menu Item (Start Speaking)S;11;Menu (Text)S;29;Text Field Cell (Text Cell)-1S;1;8S;18;Menu (Open Recent)S;11;Menu (Kern)S;11;Separator-5S;20;Menu Item (Minimize)S;17;Vertical ScrollerS;14;Table Column-7S;28;Menu Item (Smart Copy/Paste)S;18;Menu Item (Bigger)S;22;Menu Item (Show Ruler)S;29;Text Field Cell (Text Cell)-9S;18;Menu Item (Loosen)S;22;Menu Item (Select All)S;19;Menu Item (Use All)S;25;Menu Item (Use Default)-1S;27;Menu (Spelling and Grammar)S;29;Text Field Cell (Text Cell)-2S;11;Menu (File)S;23;Menu Item (Open Recent)S;19;Menu Item (Smaller)S;11;Separator-4S;14;Table Column-8S;14;Table Column-9S;34;Menu Item (Use Selection for Find)S;15;Menu (Ligature)S;29;Text Field Cell (Text Cell)-3S;14;App ControllerS;23;Menu Item (Superscript)S;16;Menu Item (Redo)S;30;Text Field Cell (Text Cell)-10S;13;Menu (Speech)S;24;Menu Item (Smart Quotes)S;26;Menu Item (NewApplication)S;10;Table ViewS;16;Menu Item (Zoom)S;22;Menu Item (Copy Style)S;12;Content ViewS;26;Menu Item (Show Spelling…)S;23;Menu Item (Align Right)S;21;Menu Item (Underline)S;18;Menu Item (Window)S;17;Menu Item (Raise)S;16;Menu Item (Edit)S;11;Menu (Find)S;20;Menu Item (Show All)S;1;7S;15;Table Column-10S;18;Menu Item (Format)S;29;Menu Item (Jump to Selection)S;20;Menu Item (Baseline)S;39;Menu Item (Check Spelling While Typing)S;39;Menu Item (Check Grammar With Spelling)S;26;Menu Item (Check Spelling)S;3;1-1S;29;Text Field Cell (Text Cell)-6S;12;Separator-10S;21;Menu Item (Find Next)S;20;Menu Item (Use None)S;22;Menu Item (Copy Ruler)S;11;Menu (Font)S;22;Menu Item (Show Fonts)S;25;Menu Item (Find Previous)S;16;Menu Item (Bold)S;11;Separator-7S;27;Text Field Cell (Text Cell)S;21;Menu Item (Subscript)S;23;Menu Item (Show Colors)S;23;Menu Item (Paste Ruler)S;1;6S;12;Separator-11S;15;Menu (Services)S;3;121S;22;Menu Item (Clear Menu)S;17;Menu Item (Paste)S;11;Separator-6D;K;10;$classnameS;22;_CPCibControlConnectorK;8;$classesA;S;22;_CPCibControlConnectorS;15;_CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;55E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;748E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;142E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;749E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;103E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;750E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;32E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;751E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;52E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;752E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;96E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;753E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;35E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;754E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;131E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;755E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;42E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;756E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;63E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;757E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;120E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;758E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;147E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;759E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;67E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;760E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;80E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;761E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;158E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;762E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;107E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;763E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;78E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;764E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;144E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;765E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;33E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;766E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;59E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;767E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;128E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;768E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;138E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;769E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;770E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;145E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;771E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;127E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;772E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;146E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;773E;E;D;K;10;$classnameS;21;_CPCibOutletConnectorK;8;$classesA;S;21;_CPCibOutletConnectorS;15;_CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;346E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;3;119E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;774E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;66E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;775E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;41E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;776E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;61E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;777E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;133E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;778E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;69E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;779E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;165E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;780E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;57E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;781E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;150E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;782E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;77E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;783E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;123E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;784E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;106E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;785E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;109E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;786E;E;D;K;6;$classD;K;6;CP$UIDd;3;346E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;126E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;3;119E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;787E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;65E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;788E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;73E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;789E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;46E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;790E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;121E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;791E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;58E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;792E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;793E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;135E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;794E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;160E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;795E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;164E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;796E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;72E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;797E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;28E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;798E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;159E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;799E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;26E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;800E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;54E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;56E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;801E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;94E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;802E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;132E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;803E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;100E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;804E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;85E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;16E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;805E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;82E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;806E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;157E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;807E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;108E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;808E;E;D;K;6;$classD;K;6;CP$UIDd;3;346E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;119E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;88E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;809E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;151E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;810E;E;D;K;6;$classD;K;6;CP$UIDd;3;319E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;3;105E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;811E;E;d;3;370d;3;439d;3;396d;3;348d;3;145d;3;202d;3;405d;3;489d;3;211d;3;483d;3;479d;3;355d;3;443d;3;347d;3;391d;3;393d;3;475d;3;349d;3;356d;3;382d;2;-3d;3;440d;3;225d;3;112d;3;478d;3;486d;3;297d;3;418d;3;472d;3;142d;3;362d;3;354d;3;227d;3;377d;3;381d;3;460d;3;298d;2;72d;3;485d;3;218d;3;197d;3;471d;3;127d;2;29d;3;131d;2;58d;3;371d;2;24d;3;205d;3;235d;3;480d;3;379d;3;364d;2;80d;3;125d;3;366d;3;214d;3;350d;3;461d;3;467d;3;419d;3;198d;3;445d;3;363d;3;476d;3;395d;3;477d;3;466d;3;221d;3;411d;3;468d;3;407d;3;450d;3;470d;3;212d;3;449d;3;427d;3;367d;3;239d;3;228d;3;403d;3;204d;3;372d;3;383d;3;392d;2;19d;3;217d;3;437d;3;210d;3;375d;3;433d;3;346d;3;201d;3;474d;3;208d;3;388d;3;389d;3;213d;3;401d;3;374d;3;448d;3;444d;2;78d;3;400d;3;368d;3;126d;3;429d;3;462d;3;376d;3;380d;2;77d;3;111d;3;144d;2;83d;2;57d;3;209d;2;75d;2;86d;3;441d;2;39d;2;87d;3;134d;1;5d;3;149d;3;447d;2;74d;3;295d;3;404d;3;482d;3;430d;3;296d;3;397d;3;195d;3;373d;3;136d;3;207d;3;431d;3;413d;3;378d;3;398d;3;226d;3;143d;3;245d;3;406d;3;416d;3;410d;3;465d;3;103d;3;199d;3;488d;3;216d;3;240d;2;82d;3;106d;3;223d;3;473d;3;236d;3;196d;3;241d;3;415d;2;23d;3;481d;3;394d;3;232d;3;385d;3;426d;3;224d;3;442d;3;434d;3;414d;3;412d;3;200d;3;357d;2;81d;3;124d;3;428d;2;92d;3;360d;3;436d;3;215d;3;222d;3;351d;2;56d;3;463d;3;193d;2;37d;3;409d;3;432d;3;220d;3;459d;3;230d;3;150d;2;79d;3;399d;3;469d;3;219d;3;365d;3;446d;2;73d;3;402d;3;233d;3;417d;3;386d;3;484d;3;390d;3;451d;3;408d;3;384d;3;387d;3;438d;3;130d;3;231d;3;129d;3;435d;3;203d;3;206S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;88E;E;E;S;19;{{1, 1}, {476, 17}}S;19;{{0, 0}, {476, 17}}d;1;8S;6;normald;1;0S;29;_horizontalScrollerDidScroll:d;1;4f;18;0.6888567209243774S;6;FormatD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;60E;E;E;T;S;0;F;S;13;SubstitutionsS;14;submenuAction:S;10;Align LeftS;13;Page Setup...S;19;NewApplication HelpS;4;FileS;14;NewApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;85E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;3;163E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;3;138E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;54E;E;E;S;11;Hide OthersS;6;DeleteS;8;BaselineD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;3;120E;D;K;6;CP$UIDd;3;157E;D;K;6;CP$UIDd;3;135E;D;K;6;CP$UIDd;2;78E;E;E;S;5;Find…S;4;SaveS;6;Speechd;2;64d;2;10d;22;3.4028230607370965e+38S;19;Hide NewApplicationS;18;Bring All to FrontS;4;ViewS;11;Paste StyleD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;72E;E;E;S;4;KernS;6;ItalicS;13;Stop SpeakingD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;103E;D;K;6;CP$UIDd;3;123E;D;K;6;CP$UIDd;2;66E;E;E;S;19;Quit NewApplicationS;4;UndoS;7;JustifyS;15;Revert to SavedS;8;Use NoneS;4;TextS;12;Show ToolbarS;8;LigatureS;7;TightenS;11;Use DefaultS;11;Smart LinksS;4;FontS;6;CenterS;22;{{-1, -1}, {493, 365}}S;20;{{0, 0}, {493, 365}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;661E;D;K;6;CP$UIDd;3;101E;D;K;6;CP$UIDd;2;20E;E;E;d;2;18D;K;10;$classnameS;10;CPClipViewK;8;$classesA;S;10;CPClipViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;660E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;71E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;812E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;813E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;814E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;71E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;605E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;816E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;606E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;3;126E;E;S;18;Customize Toolbar…S;5;Open…d;2;69d;2;40d;4;1000S;4;HelpS;3;CutS;5;LowerS;4;FindS;4;CopyS;20;Spelling and GrammarS;3;NewS;9;AMainMenuD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;124E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;3;136E;D;K;6;CP$UIDd;3;141E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;3;134E;D;K;6;CP$UIDd;2;76E;E;E;S;20;About NewApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;28E;E;E;S;26;{3.40282e+38, 3.40282e+38}S;8;CPWindowS;24;{{335, 128}, {491, 363}}d;1;7S;6;WindowS;8;ServicesD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;100E;D;K;6;CP$UIDd;3;127E;D;K;6;CP$UIDd;3;114E;D;K;6;CP$UIDd;2;42E;E;E;S;4;EditD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;3;121E;D;K;6;CP$UIDd;3;166E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;3;165E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;3;107E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;37E;E;E;S;14;Start SpeakingD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;3;132E;D;K;6;CP$UIDd;3;156E;D;K;6;CP$UIDd;3;105E;D;K;6;CP$UIDd;3;151E;D;K;6;CP$UIDd;3;159E;E;E;S;8;Save As…S;11;Open RecentD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;164E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;3;150E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;3;106E;E;E;S;8;MinimizeS;22;{{477, 347}, {15, 17}}S;18;{{0, 0}, {15, 17}}S;17;disabled+verticalf;18;0.9971429109573364S;16;Smart Copy/PasteS;6;BiggerS;10;Show RulerS;6;LoosenS;10;Select AllS;7;Use AllD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;131E;D;K;6;CP$UIDd;3;146E;D;K;6;CP$UIDd;3;144E;D;K;6;CP$UIDd;3;145E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;3;112E;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;147E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;3;160E;E;E;S;7;Smallerd;2;67S;22;Use Selection for FindD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;109E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;3;108E;E;E;S;13;AppControllerS;11;SuperscriptS;4;RedoD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;52E;E;E;S;12;Smart QuotesS;20;{{0, 0}, {691, 348}}d;2;17S;6;{3, 2}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;3;116E;D;K;6;CP$UIDd;3;140E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;74E;E;E;S;4;ZoomS;10;Copy StyleS;20;{{0, 0}, {491, 363}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;71E;E;E;S;14;Show Spelling…S;11;Align RightS;9;UnderlineS;5;RaiseD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;3;149E;D;K;6;CP$UIDd;3;154E;D;K;6;CP$UIDd;3;117E;D;K;6;CP$UIDd;3;142E;E;E;S;8;Show AllS;17;Jump to SelectionS;27;Check Spelling While TypingS;27;Check Grammar With SpellingS;14;Check SpellingS;5;CloseS;9;Find NextS;10;Copy RulerD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;153E;D;K;6;CP$UIDd;3;155E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;3;133E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;3;104E;D;K;6;CP$UIDd;3;113E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;3;143E;D;K;6;CP$UIDd;3;161E;D;K;6;CP$UIDd;3;158E;D;K;6;CP$UIDd;3;148E;D;K;6;CP$UIDd;3;128E;D;K;6;CP$UIDd;2;46E;E;E;S;10;Show FontsS;13;Find PreviousS;4;BoldS;9;SubscriptS;11;Show ColorsS;11;Paste RulerS;6;Print…D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;S;12;Preferences…S;10;Clear MenuS;5;PasteS;5;undo:S;29;centerSelectionInVisibleArea:S;24;toggleSmartInsertDelete:S;22;hideOtherApplications:S;13;stopSpeaking:S;15;saveDocumentAs:S;23;performFindPanelAction:S;15;showGuessPanel:S;15;arrangeInFront:S;15;tightenKerning:S;12;superscript:S;13;performClose:S;19;useStandardKerning:S;5;copy:S;21;orderFrontColorPanel:S;10;selectAll:S;14;lowerBaseline:S;30;toggleContinuousSpellChecking:S;7;delete:S;17;turnOffLigatures:S;9;copyFont:S;22;unhideAllApplications:S;14;runPageLayout:S;22;toggleGrammarChecking:S;12;performZoom:S;14;checkSpelling:S;8;delegateS;29;toggleAutomaticLinkDetection:S;5;hide:S;19;toggleToolbarShown:S;10;underline:S;12;alignCenter:S;6;paste:S;15;alignJustified:S;15;turnOffKerning:S;4;cut:S;33;toggleAutomaticQuoteSubstitution:S;14;loosenKerning:S;21;useStandardLigatures:S;10;dataSourceS;9;unscript:S;13;openDocument:S;10;pasteFont:S;5;redo:S;22;revertDocumentToSaved:S;13;saveDocument:S;14;raiseBaseline:S;6;print:S;21;clearRecentDocuments:S;31;runToolbarCustomizationPalette:S;9;showHelp:S;11;pasteRuler:S;10;alignLeft:S;10;terminate:S;14;startSpeaking:S;11;alignRight:S;19;performMiniaturize:S;29;orderFrontStandardAboutPanel:S;12;newDocument:S;10;subscript:S;16;useAllLigatures:S;9;theWindowS;10;copyRuler:S;12;toggleRuler:S;21;{{1, 16}, {476, 348}}S;20;{{0, 0}, {476, 348}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;126E;E;E;D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;815E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;817E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;818E;D;K;6;CP$UIDd;3;818E;D;K;6;CP$UIDd;3;818E;D;K;6;CP$UIDd;3;819E;E;E;f;10;0.66666669d;1;1E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/TableCibTest/Resources/MainMenu.xib b/TableCibTest/Resources/MainMenu.xib new file mode 100644 index 000000000..671d22a13 --- /dev/null +++ b/TableCibTest/Resources/MainMenu.xib @@ -0,0 +1,3665 @@ + + + + 1050 + 9J61 + 677 + 949.46 + 353.00 + + YES + + + + YES + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + YES + + + NewApplication + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + NewApplication + + YES + + + About NewApplication + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + UHJlZmVyZW5jZXPigKY + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide NewApplication + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + YES + + + New + n + 1048576 + 2147483647 + + + + + + T3BlbuKApg + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + U2F2ZSBBc+KApg + S + 1179648 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + UHJpbnTigKY + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + YES + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + YES + + + RmluZOKApg + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + YES + + + U2hvdyBTcGVsbGluZ+KApg + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + YES + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + YES + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + YES + + + Font + + 2147483647 + + + submenuAction: + + Font + + YES + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + YES + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + YES + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + YES + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + YES + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Q3VzdG9taXplIFRvb2xiYXLigKY + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + YES + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + Help + + YES + + + NewApplication Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + 7 + 2 + {{335, 387}, {491, 363}} + 1946157056 + Window + NSWindow + + {3.40282e+38, 3.40282e+38} + + + 256 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 256 + {691, 349} + + YES + + + 256 + {{477, 0}, {16, 17}} + + + YES + + 6.900000e+01 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + LucidaGrande + 1.100000e+01 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + Text Cell + + LucidaGrande + 1.300000e+01 + 1044 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + 6.700000e+01 + 4.000000e+01 + 1.000000e+03 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + 6 + System + headerColor + + 3 + MQA + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 6.400000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 1.000000e+01 + 1.000000e+01 + 3.402823e+38 + + 75628032 + 0 + + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + YES + + + + 3.000000e+00 + 2.000000e+00 + + + 6 + System + gridColor + + 3 + MC41AA + + + 1.700000e+01 + -698351616 + 4 + 15 + 0 + YES + + + {{1, 0}, {476, 349}} + + + + + 4 + + + + 256 + {{477, 0}, {15, 349}} + + + _doScroller: + 9.971429e-01 + + + + 256 + {{1, 349}, {476, 15}} + + YES + 1 + + _doScroller: + 6.888567e-01 + + + {{-1, -1}, {493, 365}} + + + 178 + + + + QSAAAEEgAABBmAAAQZgAAA + + + {491, 363} + + + {{0, 0}, {1440, 878}} + {3.40282e+38, 3.40282e+38} + + + AppController + + + + + YES + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + showHelp: + + + + 360 + + + + saveDocument: + + + + 362 + + + + saveDocumentAs: + + + + 363 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + raiseBaseline: + + + + 426 + + + + lowerBaseline: + + + + 427 + + + + copyFont: + + + + 428 + + + + subscript: + + + + 429 + + + + superscript: + + + + 430 + + + + tightenKerning: + + + + 431 + + + + underline: + + + + 432 + + + + orderFrontColorPanel: + + + + 433 + + + + useAllLigatures: + + + + 434 + + + + loosenKerning: + + + + 435 + + + + pasteFont: + + + + 436 + + + + unscript: + + + + 437 + + + + useStandardKerning: + + + + 438 + + + + useStandardLigatures: + + + + 439 + + + + turnOffLigatures: + + + + 440 + + + + turnOffKerning: + + + + 441 + + + + alignLeft: + + + + 442 + + + + alignJustified: + + + + 443 + + + + copyRuler: + + + + 444 + + + + alignCenter: + + + + 445 + + + + toggleRuler: + + + + 446 + + + + alignRight: + + + + 447 + + + + pasteRuler: + + + + 448 + + + + terminate: + + + + 449 + + + + delegate + + + + 451 + + + + theWindow + + + + 459 + + + + dataSource + + + + 488 + + + + + YES + + 0 + + YES + + + + + + -2 + + + RmlsZSdzIE93bmVyA + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + + + + + + + MainMenu + + + 19 + + + YES + + + + + + 56 + + + YES + + + + + + 103 + + + YES + + + + 1 + + + 217 + + + YES + + + + + + 83 + + + YES + + + + + + 81 + + + YES + + + + + + + + + + + + + + + + 75 + + + 3 + + + 80 + + + 8 + + + 78 + + + 6 + + + 72 + + + + + 82 + + + 9 + + + 124 + + + YES + + + + + + 77 + + + 5 + + + 73 + + + 1 + + + 79 + + + 7 + + + 112 + + + 10 + + + 74 + + + 2 + + + 125 + + + YES + + + + + + 126 + + + + + 205 + + + YES + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + YES + + + + + + 216 + + + YES + + + + + + 200 + + + YES + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + YES + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 106 + + + YES + + + + 2 + + + 111 + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + 1111 + + + 144 + + + + + 129 + + + 121 + + + 143 + + + + + 236 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + YES + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + YES + + + + + + 296 + + + YES + + + + + + + 297 + + + + + 298 + + + + + 211 + + + YES + + + + + + 212 + + + YES + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + YES + + + + + + 349 + + + YES + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + 375 + + + YES + + + + + + 376 + + + YES + + + + + + + 377 + + + YES + + + + + + 378 + + + YES + + + + + + 379 + + + YES + + + + + + + + + + + + + 380 + + + + + 381 + + + + + 382 + + + + + 383 + + + + + 384 + + + + + 385 + + + + + 386 + + + + + 387 + + + + + 388 + + + YES + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + YES + + + + + + 398 + + + YES + + + + + + 399 + + + YES + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + YES + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + YES + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + YES + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 450 + + + + + 460 + + + YES + + + + + + + + 461 + + + + + 462 + + + + + 463 + + + YES + + + + + + + + + + + + + + + + 465 + + + YES + + + + + + 466 + + + YES + + + + + + 467 + + + + + 468 + + + + + 469 + + + YES + + + + + + 470 + + + + + 471 + + + YES + + + + + + 472 + + + + + 473 + + + YES + + + + + + 474 + + + + + 475 + + + YES + + + + + + 476 + + + + + 477 + + + YES + + + + + + 478 + + + + + 479 + + + YES + + + + + + 480 + + + + + 481 + + + YES + + + + + + 482 + + + + + 483 + + + YES + + + + + + 484 + + + + + 485 + + + YES + + + + + + 486 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 103.IBPluginDependency + 103.ImportedFromIB2 + 106.IBPluginDependency + 106.ImportedFromIB2 + 106.editorWindowContentRectSynchronizationRect + 111.IBPluginDependency + 111.ImportedFromIB2 + 112.IBPluginDependency + 112.ImportedFromIB2 + 124.IBPluginDependency + 124.ImportedFromIB2 + 125.IBPluginDependency + 125.ImportedFromIB2 + 125.editorWindowContentRectSynchronizationRect + 126.IBPluginDependency + 126.ImportedFromIB2 + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 19.IBPluginDependency + 19.ImportedFromIB2 + 195.IBPluginDependency + 195.ImportedFromIB2 + 196.IBPluginDependency + 196.ImportedFromIB2 + 197.IBPluginDependency + 197.ImportedFromIB2 + 198.IBPluginDependency + 198.ImportedFromIB2 + 199.IBPluginDependency + 199.ImportedFromIB2 + 200.IBPluginDependency + 200.ImportedFromIB2 + 200.editorWindowContentRectSynchronizationRect + 201.IBPluginDependency + 201.ImportedFromIB2 + 202.IBPluginDependency + 202.ImportedFromIB2 + 203.IBPluginDependency + 203.ImportedFromIB2 + 204.IBPluginDependency + 204.ImportedFromIB2 + 205.IBPluginDependency + 205.ImportedFromIB2 + 205.editorWindowContentRectSynchronizationRect + 206.IBPluginDependency + 206.ImportedFromIB2 + 207.IBPluginDependency + 207.ImportedFromIB2 + 208.IBPluginDependency + 208.ImportedFromIB2 + 209.IBPluginDependency + 209.ImportedFromIB2 + 210.IBPluginDependency + 210.ImportedFromIB2 + 211.IBPluginDependency + 211.ImportedFromIB2 + 212.IBPluginDependency + 212.ImportedFromIB2 + 212.editorWindowContentRectSynchronizationRect + 213.IBPluginDependency + 213.ImportedFromIB2 + 214.IBPluginDependency + 214.ImportedFromIB2 + 215.IBPluginDependency + 215.ImportedFromIB2 + 216.IBPluginDependency + 216.ImportedFromIB2 + 217.IBPluginDependency + 217.ImportedFromIB2 + 218.IBPluginDependency + 218.ImportedFromIB2 + 219.IBPluginDependency + 219.ImportedFromIB2 + 220.IBPluginDependency + 220.ImportedFromIB2 + 220.editorWindowContentRectSynchronizationRect + 221.IBPluginDependency + 221.ImportedFromIB2 + 23.IBPluginDependency + 23.ImportedFromIB2 + 236.IBPluginDependency + 236.ImportedFromIB2 + 239.IBPluginDependency + 239.ImportedFromIB2 + 24.IBPluginDependency + 24.ImportedFromIB2 + 24.editorWindowContentRectSynchronizationRect + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect + 295.IBPluginDependency + 296.IBPluginDependency + 296.editorWindowContentRectSynchronizationRect + 297.IBPluginDependency + 298.IBPluginDependency + 346.IBPluginDependency + 346.ImportedFromIB2 + 348.IBPluginDependency + 348.ImportedFromIB2 + 349.IBPluginDependency + 349.ImportedFromIB2 + 349.editorWindowContentRectSynchronizationRect + 350.IBPluginDependency + 350.ImportedFromIB2 + 351.IBPluginDependency + 351.ImportedFromIB2 + 354.IBPluginDependency + 354.ImportedFromIB2 + 371.IBEditorWindowLastContentRect + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 371.editorWindowContentRectSynchronizationRect + 371.windowTemplate.maxSize + 372.IBPluginDependency + 375.IBPluginDependency + 376.IBEditorWindowLastContentRect + 376.IBPluginDependency + 377.IBPluginDependency + 378.IBPluginDependency + 379.IBPluginDependency + 380.IBPluginDependency + 381.IBPluginDependency + 382.IBPluginDependency + 383.IBPluginDependency + 384.IBPluginDependency + 385.IBPluginDependency + 386.IBPluginDependency + 387.IBPluginDependency + 388.IBEditorWindowLastContentRect + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 392.IBPluginDependency + 393.IBPluginDependency + 394.IBPluginDependency + 395.IBPluginDependency + 396.IBPluginDependency + 397.IBPluginDependency + 398.IBPluginDependency + 399.IBPluginDependency + 400.IBPluginDependency + 401.IBPluginDependency + 402.IBPluginDependency + 403.IBPluginDependency + 404.IBPluginDependency + 405.IBPluginDependency + 406.IBPluginDependency + 407.IBPluginDependency + 408.IBPluginDependency + 409.IBPluginDependency + 410.IBPluginDependency + 411.IBPluginDependency + 412.IBPluginDependency + 413.IBPluginDependency + 414.IBPluginDependency + 415.IBPluginDependency + 416.IBPluginDependency + 417.IBPluginDependency + 418.IBPluginDependency + 419.IBPluginDependency + 450.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 465.IBPluginDependency + 466.IBPluginDependency + 467.IBPluginDependency + 468.IBPluginDependency + 5.IBPluginDependency + 5.ImportedFromIB2 + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 58.IBPluginDependency + 58.ImportedFromIB2 + 72.IBPluginDependency + 72.ImportedFromIB2 + 73.IBPluginDependency + 73.ImportedFromIB2 + 74.IBPluginDependency + 74.ImportedFromIB2 + 75.IBPluginDependency + 75.ImportedFromIB2 + 77.IBPluginDependency + 77.ImportedFromIB2 + 78.IBPluginDependency + 78.ImportedFromIB2 + 79.IBPluginDependency + 79.ImportedFromIB2 + 80.IBPluginDependency + 80.ImportedFromIB2 + 81.IBPluginDependency + 81.ImportedFromIB2 + 81.editorWindowContentRectSynchronizationRect + 82.IBPluginDependency + 82.ImportedFromIB2 + 83.IBPluginDependency + 83.ImportedFromIB2 + 92.IBPluginDependency + 92.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilderKit + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{596, 852}, {216, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{522, 812}, {146, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{436, 809}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {275, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{187, 434}, {243, 243}} + 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 + + {{608, 612}, {167, 43}} + 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 + + {{608, 612}, {241, 103}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{525, 802}, {197, 73}} + {{143, 285}, {478, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{6, 978}, {478, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{475, 832}, {234, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{608, 612}, {215, 63}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{83, 84}, {491, 363}} + {{83, 84}, {491, 363}} + + {{33, 99}, {480, 360}} + {3.40282e+38, 3.40282e+38} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{437, 242}, {86, 43}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{523, 2}, {178, 283}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{155, 102}, {245, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{23, 794}, {245, 183}} + 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 + + {{145, 474}, {199, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + YES + + + YES + + + + + YES + + YES + + + YES + + + + 488 + + + + YES + + AppController + + theWindow + NSWindow + + + IBUserSource + + + + + + 0 + ../adsfsdf.xcodeproj + 3 + + diff --git a/TableCibTest/Resources/spinner.gif b/TableCibTest/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/TableCibTest/Resources/spinner.gif differ diff --git a/TableCibTest/index-debug.html b/TableCibTest/index-debug.html new file mode 100644 index 000000000..218ae015c --- /dev/null +++ b/TableCibTest/index-debug.html @@ -0,0 +1,69 @@ + + + + + + + + TableCibTest + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/TableCibTest/index.html b/TableCibTest/index.html new file mode 100644 index 000000000..41eca60ef --- /dev/null +++ b/TableCibTest/index.html @@ -0,0 +1,68 @@ + + + + + + + + TableCibTest + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/TableCibTest/main.j b/TableCibTest/main.j new file mode 100755 index 000000000..af6279da3 --- /dev/null +++ b/TableCibTest/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/TableTest/AppController.j b/TableTest/AppController.j index b5687c015..1030e9403 100644 --- a/TableTest/AppController.j +++ b/TableTest/AppController.j @@ -2,8 +2,8 @@ @import @import -@import -@import +@import +@import CPLogRegister(CPLogConsole); @@ -21,7 +21,7 @@ CPLogRegister(CPLogConsole); [view setBackgroundColor:[CPColor whiteColor]]; [view enterFullScreenMode:nil withOptions:nil]; - tableView = [[NEWCPTableView alloc] initWithFrame:CGRectMake(0.0, 0.0, 500.0, 500.0)];//[view bounds]]; + tableView = [[CPTableView alloc] initWithFrame:CGRectMake(0.0, 0.0, 500.0, 500.0)];//[view bounds]]; [tableView setAllowsMultipleSelection:YES]; @@ -31,7 +31,7 @@ CPLogRegister(CPLogConsole); [iconView setImageScaling:CPScaleNone]; - var iconColumn = [[NEWCPTableColumn alloc] initWithIdentifier:"icons"]; + var iconColumn = [[CPTableColumn alloc] initWithIdentifier:"icons"]; [iconColumn setWidth:32.0]; [iconColumn setDataView:iconView]; @@ -46,7 +46,7 @@ CPLogRegister(CPLogConsole); for (var i = 1; i <= 10; i++) { - var column = [[NEWCPTableColumn alloc] initWithIdentifier:String(i)]; + var column = [[CPTableColumn alloc] initWithIdentifier:String(i)]; [[column headerView] setStringValue:"Number "+i]; [[column headerView] sizeToFit]; diff --git a/Tools/nib2cib/NSTableColumn.j b/Tools/nib2cib/NSTableColumn.j index 608ddbf34..2e67fd7c9 100644 --- a/Tools/nib2cib/NSTableColumn.j +++ b/Tools/nib2cib/NSTableColumn.j @@ -28,25 +28,23 @@ - (id)NS_initWithCoder:(CPCoder)aCoder { self = [self init]; - + if (self) { _identifier = [aCoder decodeObjectForKey:@"NSIdentifier"]; - - var template = [[CPTableColumn alloc] ] - + //var dataViewCell = [aCoder decodeObjectForKey:@"NSDataCell"]; - + _dataView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()]; [_dataView setValue:[CPColor whiteColor] forThemeAttribute:"text-color" inState:CPThemeStateHighlighted]; - + //_headerView = [aCoder decodeObjectForKey:@"NSHeaderCell"]; _headerView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()]; - + _width = [aCoder decodeFloatForKey:@"NSWidth"]; _minWidth = [aCoder decodeFloatForKey:@"NSMinWidth"]; _maxWidth = [aCoder decodeFloatForKey:@"NSMaxWidth"]; - + _resizingMask = [aCoder decodeBoolForKey:@"NSIsResizable"]; }