mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 19:21:16 +00:00
Tidyup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4597 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2ecc33cce6
commit
ce9e2aa538
4 changed files with 20 additions and 19 deletions
|
@ -1,3 +1,11 @@
|
|||
Thu Jul 15 18:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSView.m: Make sure cursor and tracking rects are converted
|
||||
to window coordinate system before installing them.
|
||||
* Source/NSWindow.m: Don't convert cursor rects coordinates - done in
|
||||
nsview.
|
||||
* Headers/AppKit/NSText.h: Fix include order.
|
||||
|
||||
Thu Jul 15 6:55:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Headers/AppKit/NSAttributedString.h: new file
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <AppKit/NSView.h>
|
||||
#include <AppKit/NSSpellProtocol.h>
|
||||
#include <Foundation/NSRange.h>
|
||||
#include <AppKit/NSStringDrawing.h>
|
||||
|
||||
@class NSString;
|
||||
@class NSData;
|
||||
|
@ -44,7 +43,6 @@
|
|||
@class NSColor;
|
||||
@class NSFont;
|
||||
|
||||
#if GNUSTEP
|
||||
typedef enum _NSTextAlignment {
|
||||
NSLeftTextAlignment,
|
||||
NSRightTextAlignment,
|
||||
|
@ -63,7 +61,8 @@ enum {
|
|||
NSUpTextMovement = 0x15,
|
||||
NSDownTextMovement = 0x16
|
||||
};
|
||||
#endif
|
||||
|
||||
#include <AppKit/NSStringDrawing.h>
|
||||
|
||||
// these definitions should migrate to NSTextView when implemented
|
||||
|
||||
|
|
|
@ -1754,6 +1754,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
GSTrackingRect *m;
|
||||
|
||||
aRect = [self convertRect: aRect toView: nil];
|
||||
m = [rectClass allocWithZone: NSDefaultMallocZone()];
|
||||
m = [m initWithRect: aRect
|
||||
tag: 0
|
||||
|
@ -1991,8 +1992,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
userData: (void*)data
|
||||
assumeInside: (BOOL)flag
|
||||
{
|
||||
NSTrackingRectTag t;
|
||||
unsigned i, j;
|
||||
NSTrackingRectTag t;
|
||||
unsigned i, j;
|
||||
GSTrackingRect *m;
|
||||
|
||||
t = 0;
|
||||
|
@ -2005,6 +2006,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
}
|
||||
++t;
|
||||
|
||||
aRect = [self convertRect: aRect toView: nil];
|
||||
m = [[rectClass alloc] initWithRect: aRect
|
||||
tag: t
|
||||
owner: anObject
|
||||
|
|
|
@ -1206,7 +1206,6 @@ static NSRecursiveLock *windowsLock;
|
|||
{
|
||||
GSTrackingRect *rects[count];
|
||||
NSPoint loc = [theEvent locationInWindow];
|
||||
BOOL flipped = ((NSViewPtr)theView)->_rFlags.flipped_view;
|
||||
unsigned i;
|
||||
|
||||
[tr getObjects: rects];
|
||||
|
@ -1218,9 +1217,9 @@ static NSRecursiveLock *windowsLock;
|
|||
GSTrackingRect *r = rects[i];
|
||||
|
||||
/* Check mouse at last point */
|
||||
last = NSMouseInRect(last_point, r->rectangle, flipped);
|
||||
last = NSMouseInRect(last_point, r->rectangle, NO);
|
||||
/* Check mouse at current point */
|
||||
now = NSMouseInRect(loc, r->rectangle, flipped);
|
||||
now = NSMouseInRect(loc, r->rectangle, NO);
|
||||
|
||||
if ((!last) && (now)) // Mouse entered event
|
||||
{
|
||||
|
@ -1297,22 +1296,15 @@ static NSRecursiveLock *windowsLock;
|
|||
NSPoint loc = [theEvent locationInWindow];
|
||||
NSPoint lastConv;
|
||||
NSPoint locConv;
|
||||
BOOL flipped = ((NSViewPtr)theView)->_rFlags.flipped_view;
|
||||
unsigned i;
|
||||
|
||||
/*
|
||||
* Convert points from window to view coordinates.
|
||||
*/
|
||||
lastConv = [theView convertPoint: last_point fromView: nil];
|
||||
locConv = [theView convertPoint: loc fromView: nil];
|
||||
|
||||
[tr getObjects: rects];
|
||||
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
GSTrackingRect *r = rects[i];
|
||||
BOOL last;
|
||||
BOOL now;
|
||||
BOOL last;
|
||||
BOOL now;
|
||||
|
||||
if ([r isValid] == NO)
|
||||
continue;
|
||||
|
@ -1320,8 +1312,8 @@ static NSRecursiveLock *windowsLock;
|
|||
/*
|
||||
* Check for presence of point in rectangle.
|
||||
*/
|
||||
last = NSMouseInRect(lastConv, r->rectangle, flipped);
|
||||
now = NSMouseInRect(locConv, r->rectangle, flipped);
|
||||
last = NSMouseInRect(lastConv, r->rectangle, NO);
|
||||
now = NSMouseInRect(locConv, r->rectangle, NO);
|
||||
|
||||
// Mouse entered
|
||||
if ((!last) && (now))
|
||||
|
|
Loading…
Reference in a new issue