mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 13:50:37 +00:00
More keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18603 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fb0c973e48
commit
0fba15f09b
6 changed files with 132 additions and 10 deletions
|
@ -429,5 +429,33 @@ framework intact.
|
|||
return NSPointInRect(aPoint, _containerRect);
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
//NSLayoutManager *manager = [aDecoder decodeObjectForKey: @"NSLayoutManager"];
|
||||
NSTextView *view = [aDecoder decodeObjectForKey: @"NSTextView"];
|
||||
NSSize size = NSZeroSize;
|
||||
|
||||
if ([aDecoder containsValueForKey: @"NSWidth"])
|
||||
{
|
||||
size.width = [aDecoder decodeFloatForKey: @"NSWidth"];
|
||||
}
|
||||
self = [self initWithContainerSize: size];
|
||||
if ([aDecoder containsValueForKey: @"NSTCFlags"])
|
||||
{
|
||||
// FIXME
|
||||
//int flags = [aDecoder decodeIntForKey: @"NSTCFlags"];
|
||||
}
|
||||
// No need to set manager as the decoding of the layout manager does it
|
||||
[self setTextView: view];
|
||||
return self;
|
||||
}
|
||||
else
|
||||
{
|
||||
return self;
|
||||
}
|
||||
}
|
||||
|
||||
@end /* NSTextContainer */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue