mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 14:01:55 +00:00
Small keyed decoding improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20768 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
137fe3a7cc
commit
381013343b
4 changed files with 63 additions and 7 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2005-02-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSCell.m (-initWithCoder):
|
||||||
|
* Source/NSButtonCell.m (-initWithCoder):
|
||||||
|
* Source/NSBrowser.m (-initWithCoder):
|
||||||
|
Small improvements on keyed decoding of flags.
|
||||||
|
|
||||||
2005-02-19 Fred Kiefer <FredKiefer@gmx.de>
|
2005-02-19 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSSavePanel.m (-_setDefaultDirectory): New method to get
|
* Source/NSSavePanel.m (-_setDefaultDirectory): New method to get
|
||||||
|
|
|
@ -2408,7 +2408,17 @@ static NSTextFieldCell *titleCell;
|
||||||
if ([aDecoder containsValueForKey: @"NSBrFlags"])
|
if ([aDecoder containsValueForKey: @"NSBrFlags"])
|
||||||
{
|
{
|
||||||
flags = [aDecoder decodeIntForKey: @"NSBrFlags"];
|
flags = [aDecoder decodeIntForKey: @"NSBrFlags"];
|
||||||
// FIXME
|
|
||||||
|
[self setHasHorizontalScroller: (flags & 0x10000)];
|
||||||
|
[self setAllowsEmptySelection: !(flags & 0x20000)];
|
||||||
|
[self setSendsActionOnArrowKeys: (flags & 0x40000)];
|
||||||
|
[self setAcceptsArrowKeys: (flags & 0x100000)];
|
||||||
|
[self setSeparatesColumns: (flags & 0x4000000)];
|
||||||
|
[self setTakesTitleFromPreviousColumn: (flags & 0x8000000)];
|
||||||
|
[self setTitled: (flags & 0x10000000)];
|
||||||
|
[self setReusesColumns: (flags & 0x20000000)];
|
||||||
|
[self setAllowsBranchSelection: (flags & 0x40000000)];
|
||||||
|
[self setAllowsMultipleSelection: (flags & 0x80000000)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([aDecoder containsValueForKey: @"NSNumberOfVisibleColumns"])
|
if ([aDecoder containsValueForKey: @"NSNumberOfVisibleColumns"])
|
||||||
|
|
|
@ -1313,8 +1313,6 @@
|
||||||
if ([aDecoder allowsKeyedCoding])
|
if ([aDecoder allowsKeyedCoding])
|
||||||
{
|
{
|
||||||
//NSControl *control = [aDecoder decodeObjectForKey: @"NSControlView"];
|
//NSControl *control = [aDecoder decodeObjectForKey: @"NSControlView"];
|
||||||
int bFlags;
|
|
||||||
int bFlags2;
|
|
||||||
int delay = 0;
|
int delay = 0;
|
||||||
int interval = 0;
|
int interval = 0;
|
||||||
|
|
||||||
|
@ -1343,14 +1341,17 @@
|
||||||
}
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSButtonFlags"])
|
if ([aDecoder containsValueForKey: @"NSButtonFlags"])
|
||||||
{
|
{
|
||||||
|
int bFlags;
|
||||||
int highlights = 0;
|
int highlights = 0;
|
||||||
int show_state = NSNoCellMask;
|
int show_state = NSNoCellMask;
|
||||||
|
|
||||||
bFlags = [aDecoder decodeIntForKey: @"NSButtonFlags"];
|
bFlags = [aDecoder decodeIntForKey: @"NSButtonFlags"];
|
||||||
|
|
||||||
|
[self setTransparent: (bFlags & 0x8000)];
|
||||||
// FIXME
|
// FIXME
|
||||||
if ((bFlags & 0x800000) == 0x800000)
|
if ((bFlags & 0x800000) == 0x800000)
|
||||||
{
|
{
|
||||||
[self setBezelStyle: NSRegularSquareBezelStyle];
|
[self setBordered: YES];
|
||||||
}
|
}
|
||||||
if ((bFlags & 0x6000000) == 0x6000000)
|
if ((bFlags & 0x6000000) == 0x6000000)
|
||||||
{
|
{
|
||||||
|
@ -1378,10 +1379,47 @@
|
||||||
}
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSButtonFlags2"])
|
if ([aDecoder containsValueForKey: @"NSButtonFlags2"])
|
||||||
{
|
{
|
||||||
bFlags2 = [aDecoder decodeIntForKey: @"NSButtonFlags2"];
|
int bFlags2;
|
||||||
// FIXME
|
|
||||||
}
|
|
||||||
|
|
||||||
|
bFlags2 = [aDecoder decodeIntForKey: @"NSButtonFlags2"];
|
||||||
|
[self setShowsBorderOnlyWhileMouseInside: (bFlags2 & 0x8)];
|
||||||
|
|
||||||
|
// FIXME
|
||||||
|
switch (bFlags2 & 0x7)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
[self setBezelStyle: NSRoundedBezelStyle];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
[self setBezelStyle: NSRegularSquareBezelStyle];
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
[self setBezelStyle: NSThickSquareBezelStyle];
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
[self setBezelStyle: NSThickerSquareBezelStyle];
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
//[self setBezelStyle: NSDisclosureBezelStyle];
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
[self setBezelStyle: NSShadowlessSquareBezelStyle];
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
[self setBezelStyle: NSCircularBezelStyle];
|
||||||
|
break;
|
||||||
|
/*
|
||||||
|
case 32:
|
||||||
|
[self setBezelStyle: NSTexturedSquareBezelStyle];
|
||||||
|
break;
|
||||||
|
case 33:
|
||||||
|
[self setBezelStyle: NSHelpButtonBezelStyle];
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ([aDecoder containsValueForKey: @"NSPeriodicDelay"])
|
if ([aDecoder containsValueForKey: @"NSPeriodicDelay"])
|
||||||
{
|
{
|
||||||
delay = [aDecoder decodeIntForKey: @"NSPeriodicDelay"];
|
delay = [aDecoder decodeIntForKey: @"NSPeriodicDelay"];
|
||||||
|
|
|
@ -2047,6 +2047,7 @@ static NSColor *shadowCol;
|
||||||
int cFlags2;
|
int cFlags2;
|
||||||
|
|
||||||
cFlags2 = [aDecoder decodeIntForKey: @"NSCellFlags2"];
|
cFlags2 = [aDecoder decodeIntForKey: @"NSCellFlags2"];
|
||||||
|
[self setSendsActionOnEndEditing: (cFlags2 & 0x400000)];
|
||||||
[self setAllowsMixedState: ((cFlags2 & 0x1000000) == 0x1000000)];
|
[self setAllowsMixedState: ((cFlags2 & 0x1000000) == 0x1000000)];
|
||||||
[self setRefusesFirstResponder: ((cFlags2 & 0x2000000) == 0x2000000)];
|
[self setRefusesFirstResponder: ((cFlags2 & 0x2000000) == 0x2000000)];
|
||||||
if ((cFlags2 & 0x4000000) == 0x4000000)
|
if ((cFlags2 & 0x4000000) == 0x4000000)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue