Add the 10.5 coordinate transformation methods.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31755 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2010-12-22 17:06:35 +00:00
parent de9abfb7ee
commit 4abc4ac83b
3 changed files with 43 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2010-12-22 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSView.h,
* Source/NSView.m: Add the 10.5 coordinate transformation methods.
2010-12-22 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSDragging.h,

View file

@ -239,6 +239,14 @@ PACKAGE_SCOPE
fromView: (NSView*)aView;
- (NSSize) convertSize: (NSSize)aSize
toView: (NSView*)aView;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
- (NSPoint) convertPointFromBase: (NSPoint)aPoint;
- (NSPoint) convertPointToBase: (NSPoint)aPoint;
- (NSRect) convertRectFromBase: (NSRect)aRect;
- (NSRect) convertRectToBase: (NSRect)aRect;
- (NSSize) convertSizeFromBase: (NSSize)aSize;
- (NSSize) convertSizeToBase: (NSSize)aSize;
#endif
/*
* Notifying Ancestor Views

View file

@ -1844,6 +1844,36 @@ convert_rect_using_matrices(NSRect aRect, NSAffineTransform *matrix1,
return new;
}
- (NSPoint) convertPointFromBase: (NSPoint)aPoint
{
return [self convertPoint: aPoint fromView: nil];
}
- (NSPoint) convertPointToBase: (NSPoint)aPoint
{
return [self convertPoint: aPoint toView: nil];
}
- (NSRect) convertRectFromBase: (NSRect)aRect
{
return [self convertRect: aRect fromView: nil];
}
- (NSRect) convertRectToBase: (NSRect)aRect
{
return [self convertRect: aRect toView: nil];
}
- (NSSize) convertSizeFromBase: (NSSize)aSize
{
return [self convertSize: aSize fromView: nil];
}
- (NSSize) convertSizeToBase: (NSSize)aSize
{
return [self convertSize: aSize toView: nil];
}
/**
* Sets whether the receiver should post NSViewFrameDidChangeNotification
* when its frame changed.