Make _frame in -gui the window frame always. Add methods for converting to/from screen frames.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19855 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2004-08-09 12:59:53 +00:00
parent d52db5f427
commit 8a4361bbae
7 changed files with 124 additions and 19 deletions

View file

@ -609,6 +609,26 @@ static NSNotificationCenter *nc = nil;
styleMask: aStyle];
}
+ (NSRect) screenRectForFrameRect: (NSRect)aRect
styleMask: (unsigned int)aStyle
{
if (!windowDecorator)
windowDecorator = [GSWindowDecorationView windowDecorator];
return [windowDecorator screenRectForFrameRect: aRect
styleMask: aStyle];
}
+ (NSRect) frameRectForScreenRect: (NSRect)aRect
styleMask: (unsigned int)aStyle
{
if (!windowDecorator)
windowDecorator = [GSWindowDecorationView windowDecorator];
return [windowDecorator frameRectForScreenRect: aRect
styleMask: aStyle];
}
+ (float) minFrameWidthWithTitle: (NSString *)aTitle
styleMask: (unsigned int)aStyle
{
@ -773,13 +793,12 @@ many times.
_gstate = GSDefineGState(context);
DPSgrestore(context);
if (NSIsEmptyRect([_wv frame]))
{
NSRect frame = _frame;
frame.origin = NSZeroPoint;
[_wv setFrame: frame];
}
[_wv setNeedsDisplay: YES];
{
NSRect frame = _frame;
frame.origin = NSZeroPoint;
[_wv setFrame: frame];
[_wv setNeedsDisplay: YES];
}
/* Ok, now add the drag types back */
if (dragTypes)