Added some more keyed decoding.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20116 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2004-09-23 23:12:54 +00:00
parent d3f517e16b
commit a52e330d25
3 changed files with 32 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2004-09-24 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSView.m (-initWithCoder:): Added keyed decoding of
"hidden" flag.
* Source/NSCell.m (-initWithCoder:): Added the first bit of
keyed flags decoding. Values provided by Adrian Robert
<arobert@cogsci.ucsd.edu>.
2004-09-23 22:33 Alexander Malmberg <alexander@malmberg.org>
* Source/NSTableView.m (-mouseDown:): Fix the check that detects

View file

@ -2007,17 +2007,37 @@ static NSColor *shadowCol;
{
NSString *contents = [aDecoder decodeObjectForKey: @"NSContents"];
NSFont *support = [aDecoder decodeObjectForKey: @"NSSupport"];
int cFlags;
int cFlags2;
if ([aDecoder containsValueForKey: @"NSCellFlags"])
{
int cFlags;
cFlags = [aDecoder decodeIntForKey: @"NSCellFlags"];
// This bit flag is the other way around!
[self setWraps: ((cFlags & 0x40) != 0x40)];
[self setContinuous: ((cFlags & 0x80000) == 0x80000)];
[self setScrollable: ((cFlags & 0x100000) == 0x100000)];
// Strange that this is not a simple bit flag
[self setSelectable: ((cFlags & 0x200001) == 0x200001)];
[self setBezeled: ((cFlags & 0x400000) == 0x400000)];
[self setBordered: ((cFlags & 0x800000) == 0x800000)];
[self setEditable: ((cFlags & 0x10000000) == 0x10000000)];
// This bit flag is the other way around!
[self setEnabled: ((cFlags & 0x20000000) != 0x20000000)];
[self setHighlighted: ((cFlags & 0x40000000) == 0x40000000)];
// FIXME
}
if ([aDecoder containsValueForKey: @"NSCellFlags2"])
{
int cFlags2;
cFlags2 = [aDecoder decodeIntForKey: @"NSCellFlags2"];
[self setAllowsMixedState: ((cFlags2 & 0x1000000) == 0x1000000)];
[self setRefusesFirstResponder: ((cFlags2 & 0x2000000) == 0x2000000)];
[self setImportsGraphics: ((cFlags2 & 0x20000000) == 0x20000000)];
[self setAllowsEditingTextAttributes: ((cFlags2 & 0x40000000) == 0x40000000)];
// FIXME
}

View file

@ -3790,7 +3790,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
// We are lucky here, Apple use the same constants
// in the lower bits of the flags
[self setAutoresizingMask: vFlags & 0x3F];
[self setHidden: vFlags & (1 << 32)];
[self setAutoresizesSubviews: ((vFlags & 0x100) == 0x100)];
[self setHidden: ((vFlags & 0x80000000) == 0x80000000)];
}
}
else