mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 11:51:17 +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>
|
Thu Jul 15 6:55:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Headers/AppKit/NSAttributedString.h: new file
|
* Headers/AppKit/NSAttributedString.h: new file
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include <AppKit/NSView.h>
|
#include <AppKit/NSView.h>
|
||||||
#include <AppKit/NSSpellProtocol.h>
|
#include <AppKit/NSSpellProtocol.h>
|
||||||
#include <Foundation/NSRange.h>
|
#include <Foundation/NSRange.h>
|
||||||
#include <AppKit/NSStringDrawing.h>
|
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSData;
|
@class NSData;
|
||||||
|
@ -44,7 +43,6 @@
|
||||||
@class NSColor;
|
@class NSColor;
|
||||||
@class NSFont;
|
@class NSFont;
|
||||||
|
|
||||||
#if GNUSTEP
|
|
||||||
typedef enum _NSTextAlignment {
|
typedef enum _NSTextAlignment {
|
||||||
NSLeftTextAlignment,
|
NSLeftTextAlignment,
|
||||||
NSRightTextAlignment,
|
NSRightTextAlignment,
|
||||||
|
@ -63,7 +61,8 @@ enum {
|
||||||
NSUpTextMovement = 0x15,
|
NSUpTextMovement = 0x15,
|
||||||
NSDownTextMovement = 0x16
|
NSDownTextMovement = 0x16
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
#include <AppKit/NSStringDrawing.h>
|
||||||
|
|
||||||
// these definitions should migrate to NSTextView when implemented
|
// these definitions should migrate to NSTextView when implemented
|
||||||
|
|
||||||
|
|
|
@ -1754,6 +1754,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
||||||
{
|
{
|
||||||
GSTrackingRect *m;
|
GSTrackingRect *m;
|
||||||
|
|
||||||
|
aRect = [self convertRect: aRect toView: nil];
|
||||||
m = [rectClass allocWithZone: NSDefaultMallocZone()];
|
m = [rectClass allocWithZone: NSDefaultMallocZone()];
|
||||||
m = [m initWithRect: aRect
|
m = [m initWithRect: aRect
|
||||||
tag: 0
|
tag: 0
|
||||||
|
@ -1991,8 +1992,8 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
userData: (void*)data
|
userData: (void*)data
|
||||||
assumeInside: (BOOL)flag
|
assumeInside: (BOOL)flag
|
||||||
{
|
{
|
||||||
NSTrackingRectTag t;
|
NSTrackingRectTag t;
|
||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
GSTrackingRect *m;
|
GSTrackingRect *m;
|
||||||
|
|
||||||
t = 0;
|
t = 0;
|
||||||
|
@ -2005,6 +2006,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
||||||
}
|
}
|
||||||
++t;
|
++t;
|
||||||
|
|
||||||
|
aRect = [self convertRect: aRect toView: nil];
|
||||||
m = [[rectClass alloc] initWithRect: aRect
|
m = [[rectClass alloc] initWithRect: aRect
|
||||||
tag: t
|
tag: t
|
||||||
owner: anObject
|
owner: anObject
|
||||||
|
|
|
@ -1206,7 +1206,6 @@ static NSRecursiveLock *windowsLock;
|
||||||
{
|
{
|
||||||
GSTrackingRect *rects[count];
|
GSTrackingRect *rects[count];
|
||||||
NSPoint loc = [theEvent locationInWindow];
|
NSPoint loc = [theEvent locationInWindow];
|
||||||
BOOL flipped = ((NSViewPtr)theView)->_rFlags.flipped_view;
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
[tr getObjects: rects];
|
[tr getObjects: rects];
|
||||||
|
@ -1218,9 +1217,9 @@ static NSRecursiveLock *windowsLock;
|
||||||
GSTrackingRect *r = rects[i];
|
GSTrackingRect *r = rects[i];
|
||||||
|
|
||||||
/* Check mouse at last point */
|
/* Check mouse at last point */
|
||||||
last = NSMouseInRect(last_point, r->rectangle, flipped);
|
last = NSMouseInRect(last_point, r->rectangle, NO);
|
||||||
/* Check mouse at current point */
|
/* Check mouse at current point */
|
||||||
now = NSMouseInRect(loc, r->rectangle, flipped);
|
now = NSMouseInRect(loc, r->rectangle, NO);
|
||||||
|
|
||||||
if ((!last) && (now)) // Mouse entered event
|
if ((!last) && (now)) // Mouse entered event
|
||||||
{
|
{
|
||||||
|
@ -1297,22 +1296,15 @@ static NSRecursiveLock *windowsLock;
|
||||||
NSPoint loc = [theEvent locationInWindow];
|
NSPoint loc = [theEvent locationInWindow];
|
||||||
NSPoint lastConv;
|
NSPoint lastConv;
|
||||||
NSPoint locConv;
|
NSPoint locConv;
|
||||||
BOOL flipped = ((NSViewPtr)theView)->_rFlags.flipped_view;
|
|
||||||
unsigned i;
|
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];
|
[tr getObjects: rects];
|
||||||
|
|
||||||
for (i = 0; i < count; ++i)
|
for (i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
GSTrackingRect *r = rects[i];
|
GSTrackingRect *r = rects[i];
|
||||||
BOOL last;
|
BOOL last;
|
||||||
BOOL now;
|
BOOL now;
|
||||||
|
|
||||||
if ([r isValid] == NO)
|
if ([r isValid] == NO)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1320,8 +1312,8 @@ static NSRecursiveLock *windowsLock;
|
||||||
/*
|
/*
|
||||||
* Check for presence of point in rectangle.
|
* Check for presence of point in rectangle.
|
||||||
*/
|
*/
|
||||||
last = NSMouseInRect(lastConv, r->rectangle, flipped);
|
last = NSMouseInRect(lastConv, r->rectangle, NO);
|
||||||
now = NSMouseInRect(locConv, r->rectangle, flipped);
|
now = NSMouseInRect(locConv, r->rectangle, NO);
|
||||||
|
|
||||||
// Mouse entered
|
// Mouse entered
|
||||||
if ((!last) && (now))
|
if ((!last) && (now))
|
||||||
|
|
Loading…
Reference in a new issue