mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
Cursor changes, etc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11618 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6c04b107d2
commit
b4481e1c16
9 changed files with 45 additions and 22 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2001-12-02 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Model/GMAppKit.m ([NSMenuItem -initWithModelUnarchiver:]): Check
|
||||
if target is a menu.
|
||||
|
||||
* Source/NSCursor.m: Make class variables for arrow and ibeam
|
||||
cursor.
|
||||
|
||||
2001-11-30 Willem Rein Oudshoorn <woudshoo@xs4all.nl>
|
||||
|
||||
* Source/NSCursor.m (backgroundColorHint:): added FIXME comment
|
||||
|
||||
* Images/GNUmakefile (IMAGE_FILES): added DnD cursors
|
||||
|
||||
* Headers/gnustep/gui/NSBitmapImageRep.h (NSImageRep): removed
|
||||
unused instance variable
|
||||
|
||||
2001-12-03 Laurent Julliard <laurent@moldus.org>
|
||||
|
||||
* Source/NSTableHeaderView.m (-initWithCoder:, decodeWithCoder:):
|
||||
|
|
|
@ -70,11 +70,6 @@ typedef enum _NSBitmapImageFileType {
|
|||
BOOL _isPlanar;
|
||||
unsigned char **_imagePlanes;
|
||||
NSMutableData *_imageData;
|
||||
|
||||
// Reserved for back-end use
|
||||
// FIXME: This is used only for the method xPixmapMask in the shared X code.
|
||||
// If we change the dragging code, we can remove this method and the ivar!
|
||||
void *_back_end_reserved;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -92,6 +92,9 @@ common_Root_SGI.tiff \
|
|||
common_Root_Sparc.tiff \
|
||||
common_Root_Sparc2.tiff \
|
||||
common_Root_Apple.tiff \
|
||||
common_noCursor.tiff \
|
||||
common_copyCursor.tiff \
|
||||
common_linkCursor.tiff \
|
||||
GNUstep.tiff \
|
||||
GNUstepMenuImage.tiff \
|
||||
nsmapping.strings \
|
||||
|
|
BIN
Images/common_copyCursor.tiff
Normal file
BIN
Images/common_copyCursor.tiff
Normal file
Binary file not shown.
BIN
Images/common_linkCursor.tiff
Normal file
BIN
Images/common_linkCursor.tiff
Normal file
Binary file not shown.
BIN
Images/common_noCursor.tiff
Normal file
BIN
Images/common_noCursor.tiff
Normal file
Binary file not shown.
|
@ -849,7 +849,10 @@ void __dummy_GMAppKit_functionForLinking() {}
|
|||
{
|
||||
if ([self submenu] == nil)
|
||||
{
|
||||
[self setSubmenu: [self target]];
|
||||
if ([[self target] isKindOfClass: [NSMenu class]])
|
||||
[self setSubmenu: [self target]];
|
||||
else
|
||||
NSLog(@"Error decoding gmodel - submenu not an NSMenu");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -39,6 +39,9 @@ static NSCursor *gnustep_gui_current_cursor;
|
|||
static BOOL gnustep_gui_hidden_until_move;
|
||||
static Class NSCursor_class;
|
||||
|
||||
static NSCursor *arrowCursor = nil;
|
||||
static NSCursor *ibeamCursor = nil;
|
||||
|
||||
@implementation NSCursor
|
||||
|
||||
/*
|
||||
|
@ -141,15 +144,15 @@ static Class NSCursor_class;
|
|||
*/
|
||||
+ (NSCursor*) arrowCursor
|
||||
{
|
||||
NSCursor *cur;
|
||||
void *c;
|
||||
if (arrowCursor == nil)
|
||||
{
|
||||
void *c;
|
||||
|
||||
cur = AUTORELEASE([[NSCursor_class alloc] initWithImage: nil]);
|
||||
|
||||
DPSstandardcursor(GSCurrentContext(), GSArrowCursor, &c);
|
||||
[cur _setCid: c];
|
||||
|
||||
return cur;
|
||||
arrowCursor = [[NSCursor_class alloc] initWithImage: nil];
|
||||
DPSstandardcursor(GSCurrentContext(), GSArrowCursor, &c);
|
||||
[arrowCursor _setCid: c];
|
||||
}
|
||||
return arrowCursor;
|
||||
}
|
||||
|
||||
+ (NSCursor*) currentCursor
|
||||
|
@ -159,15 +162,15 @@ static Class NSCursor_class;
|
|||
|
||||
+ (NSCursor*) IBeamCursor
|
||||
{
|
||||
NSCursor *cur;
|
||||
void *c;
|
||||
if (ibeamCursor == nil)
|
||||
{
|
||||
void *c;
|
||||
|
||||
cur = AUTORELEASE([[NSCursor_class alloc] initWithImage: nil]);
|
||||
|
||||
DPSstandardcursor(GSCurrentContext(), GSIBeamCursor, &c);
|
||||
[cur _setCid: c];
|
||||
|
||||
return cur;
|
||||
ibeamCursor = [[NSCursor_class alloc] initWithImage: nil];
|
||||
DPSstandardcursor(GSCurrentContext(), GSIBeamCursor, &c);
|
||||
[ibeamCursor _setCid: c];
|
||||
}
|
||||
return ibeamCursor;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -199,6 +202,7 @@ foregroundColorHint:(NSColor *)fg
|
|||
backgroundColorHint:(NSColor *)bg
|
||||
hotSpot:(NSPoint)hotSpot
|
||||
{
|
||||
// FIXME: fg and bg should be set
|
||||
return [self initWithImage: newImage hotSpot: hotSpot];
|
||||
}
|
||||
|
||||
|
|
|
@ -688,6 +688,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
|||
aRect.origin.x += rect.origin.x;
|
||||
aRect.origin.y += rect.origin.y;
|
||||
rect = NSIntersectionRect(aRect, rect);
|
||||
|
||||
PScomposite(NSMinX(rect), NSMinY(rect), NSWidth(rect), NSHeight(rect),
|
||||
[[(NSCachedImageRep *)rep window] gState], aPoint.x, y, op);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue