mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 14:30:38 +00:00
Correction for GSNibCompatibility. Added coding to classes for keyed archiving.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23225 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2998c54fed
commit
1a8528922e
11 changed files with 227 additions and 91 deletions
|
@ -479,12 +479,24 @@
|
|||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
[aCoder encodeObject: _cell];
|
||||
[aCoder encodeSize: _offsets];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSBorderType) at: &_border_type];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSTitlePosition) at: &_title_position];
|
||||
// NB: the content view is our (only) subview, so it is already
|
||||
// encoded by NSView.
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
[aCoder encodeObject: [self contentView] forKey: @"NSContentView"];
|
||||
[aCoder encodeObject: _cell forKey: @"NSTitleCell"];
|
||||
[aCoder encodeInt: [self borderType] forKey: @"NSBorderType"];
|
||||
[aCoder encodeInt: [self titlePosition] forKey: @"NSTitlePosition"];
|
||||
[aCoder encodeBool: NO forKey: @"NSTransparent"];
|
||||
[aCoder encodeSize: [self contentViewMargins] forKey: @"NSOffsets"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeObject: _cell];
|
||||
[aCoder encodeSize: _offsets];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSBorderType) at: &_border_type];
|
||||
[aCoder encodeValueOfObjCType: @encode(NSTitlePosition) at: &_title_position];
|
||||
// NB: the content view is our (only) subview, so it is already
|
||||
// encoded by NSView.
|
||||
}
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue