mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
182 lines
6.1 KiB
Plaintext
182 lines
6.1 KiB
Plaintext
/*
|
|
* _CPCibObjectData.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 <Foundation/CPArray.j>
|
|
import <Foundation/CPObject.j>
|
|
import <Foundation/CPString.j>
|
|
|
|
|
|
@implementation _CPCibObjectData : CPObject
|
|
{
|
|
CPArray _namesKeys;
|
|
CPArray _namesValues;
|
|
|
|
CPArray _accessibilityConnectors;
|
|
CPArray _accessibilityOidsKeys;
|
|
CPArray _accessibilityOidsValues;
|
|
|
|
CPArray _classesKeys;
|
|
CPArray _classesValues;
|
|
|
|
CPArray _connections;
|
|
|
|
id _fontManager;
|
|
|
|
CPString _framework;
|
|
|
|
int _nextOid;
|
|
|
|
CPArray _objectsKeys;
|
|
CPArray _objectsValues;
|
|
|
|
CPArray _oidKeys;
|
|
CPArray _oidValues;
|
|
|
|
CPCustomObject _rootObject;
|
|
|
|
CPSet _visibleWindows;
|
|
}
|
|
/*
|
|
- (CPArray)topLevelObjects
|
|
{
|
|
var count = [_objectsValues count];
|
|
|
|
while (count--)
|
|
{
|
|
var eachObject = _objectsValues[count];
|
|
|
|
if(eachObject == _fileOwner)
|
|
{
|
|
var anObject = _objectsKeys[count];
|
|
|
|
if (anObject != _fileOwner)
|
|
topLevelObjects.push(anObject);
|
|
}
|
|
}
|
|
|
|
return topLevelObjects;
|
|
}
|
|
*/
|
|
|
|
@end
|
|
|
|
var _CPCibObjectDataNamesKeysKey = @"_CPCibObjectDataNamesKeysKey",
|
|
_CPCibObjectDataNamesValuesKey = @"_CPCibObjectDataNamesValuesKey",
|
|
|
|
_CPCibObjectDataAccessibilityConnectorsKey = @"_CPCibObjectDataAccessibilityConnectors",
|
|
_CPCibObjectDataAccessibilityOidsKeysKey = @"_CPCibObjectDataAccessibilityOidsKeys",
|
|
_CPCibObjectDataAccessibilityOidsValuesKey = @"_CPCibObjectDataAccessibilityOidsValues",
|
|
|
|
_CPCibObjectDataClassesKeysKey = @"_CPCibObjectDataClassesKeysKey",
|
|
_CPCibObjectDataClassesValuesKey = @"_CPCibObjectDataClassesValuesKey",
|
|
|
|
_CPCibObjectDataConnectionsKey = @"_CPCibObjectDataConnectionsKey",
|
|
|
|
_CPCibObjectDataFontManagerKey = @"_CPCibObjectDataFontManagerKey",
|
|
|
|
_CPCibObjectDataFrameworkKey = @"_CPCibObjectDataFrameworkKey",
|
|
|
|
_CPCibObjectDataNextOidKey = @"_CPCibObjectDataNextOidKey",
|
|
|
|
_CPCibObjectDataObjectsKeysKey = @"_CPCibObjectDataObjectsKeysKey",
|
|
_CPCibObjectDataObjectsValuesKey = @"_CPCibObjectDataObjectsValuesKey",
|
|
|
|
_CPCibObjectDataOidKeysKey = @"_CPCibObjectDataOidKeysKey",
|
|
_CPCibObjectDataOidValuesKey = @"_CPCibObjectDataOidValuesKey",
|
|
|
|
_CPCibObjectDataRootObjectKey = @"_CPCibObjectDataRootObjectKey",
|
|
_CPCibObjectDataVisibleWindowsKey = @"_CPCibObjectDataVisibleWindowsKey";
|
|
|
|
@implementation _CPCibObjectData (CPCoding)
|
|
|
|
- (id)initWithCoder:(CPCoder)aCoder
|
|
{
|
|
self = [super init];
|
|
|
|
if (self)
|
|
{
|
|
_namesKeys = [aCoder decodeObjectForKey:_CPCibObjectDataNamesKeysKey];
|
|
_namesValues = [aCoder decodeObjectForKey:_CPCibObjectDataNamesValuesKey];
|
|
|
|
//CPArray _accessibilityConnectors;
|
|
//CPArray _accessibilityOidsKeys;
|
|
//CPArray _accessibilityOidsValues;
|
|
|
|
_classesKeys = [aCoder decodeObjectForKey:_CPCibObjectDataClassesKeysKey];
|
|
_classesValues = [aCoder decodeObjectForKey:_CPCibObjectDataClassesValuesKey];
|
|
|
|
_connections = [aCoder decodeObjectForKey:_CPCibObjectDataConnectionsKey];
|
|
|
|
//id _fontManager;
|
|
|
|
_framework = [aCoder decodeObjectForKey:_CPCibObjectDataFrameworkKey];
|
|
|
|
_nextOid = [aCoder decodeIntForKey:_CPCibObjectDataNextOidKey];
|
|
|
|
_objectsKeys = [aCoder decodeObjectForKey:_CPCibObjectDataObjectsKeysKey];
|
|
_objectsValues = [aCoder decodeObjectForKey:_CPCibObjectDataObjectsValuesKey];
|
|
|
|
_oidKeys = [aCoder decodeObjectForKey:_CPCibObjectDataOidKeysKey];
|
|
_oidValues = [aCoder decodeObjectForKey:_CPCibObjectDataOidValuesKey];
|
|
|
|
_rootObject = [aCoder decodeObjectForKey:_CPCibObjectDataRootObjectKey];
|
|
|
|
// CPSet _visibleWindows;
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)encodeWithCoder:(CPCoder)aCoder
|
|
{
|
|
[aCoder encodeObject:_namesKeys forKey:_CPCibObjectDataNamesKeysKey];
|
|
[aCoder encodeObject:_namesValues forKey:_CPCibObjectDataNamesValuesKey];
|
|
|
|
//CPArray _accessibilityConnectors;
|
|
//CPArray _accessibilityOidsKeys;
|
|
//CPArray _accessibilityOidsValues;
|
|
|
|
[aCoder encodeObject:_classesKeys forKey:_CPCibObjectDataClassesKeysKey];
|
|
[aCoder encodeObject:_classesValues forKey:_CPCibObjectDataClassesValuesKey];
|
|
|
|
[aCoder encodeObject:_connections forKey:_CPCibObjectDataConnectionsKey];
|
|
|
|
//id _fontManager;
|
|
|
|
[aCoder encodeObject:_framework forKey:_CPCibObjectDataFrameworkKey];
|
|
|
|
[aCoder encodeInt:_nextOid forKey:_CPCibObjectDataNextOidKey];
|
|
|
|
[aCoder encodeObject:_objectsKeys forKey:_CPCibObjectDataObjectsKeysKey];
|
|
[aCoder encodeObject:_objectsValues forKey:_CPCibObjectDataObjectsValuesKey];
|
|
|
|
[aCoder encodeObject:_oidKeys forKey:_CPCibObjectDataOidKeysKey];
|
|
[aCoder encodeObject:_oidValues forKey:_CPCibObjectDataOidValuesKey];
|
|
|
|
[aCoder encodeObject:_rootObject forKey:_CPCibObjectDataRootObjectKey];
|
|
// CPCustomObject _fileOwner;
|
|
|
|
// CPSet _visibleWindows;
|
|
}
|
|
|
|
@end
|