mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Better debug output plus minor improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29959 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c2610af4ff
commit
a61995b438
2 changed files with 50 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-03-15 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSView.m (-description): Add some useful output to the
|
||||
decription method.
|
||||
* Source/NSView.m (-initWithCoder:): Decode the NSBounds value.
|
||||
* Source/NSView.m (-beginPageInRect:atPlacement:): Avoid compiler warning.
|
||||
|
||||
2010-03-14 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSOpenGLView.m:
|
||||
|
|
|
@ -485,6 +485,31 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
return [self _subtreeDescriptionWithPrefix: @""];
|
||||
}
|
||||
|
||||
- (NSString*) _flagDescription
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
- (NSString*) _resizeDescription
|
||||
{
|
||||
return [NSString stringWithFormat: @"h=%c%c%c v=%c%c%c",
|
||||
(_autoresizingMask & NSViewMinXMargin) ? '&' : '-',
|
||||
(_autoresizingMask & NSViewWidthSizable) ? '&' : '-',
|
||||
(_autoresizingMask & NSViewMaxXMargin) ? '&' : '-',
|
||||
(_autoresizingMask & NSViewMinYMargin) ? '&' : '-',
|
||||
(_autoresizingMask & NSViewHeightSizable) ? '&' : '-',
|
||||
(_autoresizingMask & NSViewMaxYMargin) ? '&' : '-',
|
||||
nil];
|
||||
}
|
||||
|
||||
- (NSString*) description
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@ %@ %@ f=%@ b=%@",
|
||||
[self _flagDescription],
|
||||
[self _resizeDescription], [super description],
|
||||
NSStringFromRect(_frame), NSStringFromRect(_bounds), nil];
|
||||
}
|
||||
|
||||
/*
|
||||
* Class methods
|
||||
*/
|
||||
|
@ -4318,7 +4343,14 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
if (NSIsEmptyRect(aRect))
|
||||
{
|
||||
if ([dict objectForKey: @"NSPrintPaperBounds"])
|
||||
bounds = [[dict objectForKey: @"NSPrintPaperBounds"] rectValue];
|
||||
{
|
||||
bounds = [[dict objectForKey: @"NSPrintPaperBounds"] rectValue];
|
||||
}
|
||||
else
|
||||
{
|
||||
// FIXME: What should we use here?
|
||||
bounds = aRect;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4512,8 +4544,16 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
}
|
||||
}
|
||||
|
||||
_bounds.origin = NSZeroPoint; // Set bounds rectangle
|
||||
_bounds.size = _frame.size;
|
||||
// Set bounds rectangle
|
||||
if ([aDecoder containsValueForKey: @"NSBounds"])
|
||||
{
|
||||
_bounds = [aDecoder decodeRectForKey: @"NSBounds"];
|
||||
}
|
||||
else
|
||||
{
|
||||
_bounds.origin = NSZeroPoint;
|
||||
_bounds.size = _frame.size;
|
||||
}
|
||||
|
||||
_sub_views = [NSMutableArray new];
|
||||
_tracking_rects = [NSMutableArray new];
|
||||
|
|
Loading…
Reference in a new issue