Files
cappuccino/Tools/nib2cib/NSTableColumn.j
T

70 lines
1.9 KiB
Plaintext

/*
* NSTableColumn.j
* nib2cib
*
* Created by Thomas Robinson.
* 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 <AppKit/CPTableColumn.j>
@implementation CPTableColumn (NSCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
{
self = [self init];
if (self)
{
_identifier = [aCoder decodeObjectForKey:@"NSIdentifier"];
//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"];
}
return self;
}
@end
@implementation NSTableColumn : CPTableColumn
{
}
- (id)initWithCoder:(CPCoder)aCoder
{
return [self NS_initWithCoder:aCoder];
}
- (Class)classForKeyedArchiver
{
return [CPTableColumn class];
}