Re: Change NSCursor globally

2017-02-20 Thread Uli Kusterer
On 15 Feb 2017, at 11:24, Colas B wrote: > thanks for your answer. > I want to do the former: when the user enables a mode in the application, the > cursor changes, exactly in the way you described (the shape changes). The > user should be able to use this custom cursor over a PDFView, a UIScrol

Re: Change NSCursor globally

2017-02-15 Thread Colas B
pdate                                                       owner:self                                                    userInfo:nil];    }        return self;} (...) - (NSCursor *)cursorForIPhone6{    if (!_cursorForIPhone6)    {        NSImage *image = [NSImage imageNamed:@"cursorIPhone6"];                N

Re: Change NSCursor globally

2017-02-11 Thread Uli Kusterer
On 6 Feb 2017, at 18:57, Colas wrote: > I am developing an application with several windows and views (NSTextView, > etc.). > I would like to change the cursor globally in my application, so that even if > the cursor enters the trackingRect of (for instance) an NSTextView it does > not change.

Change NSCursor globally

2017-02-06 Thread Colas
Dear Cocoa Devs, I am developing an application with several windows and views (NSTextView, etc.). I would like to change the cursor globally in my application, so that even if the cursor enters the trackingRect of (for instance) an NSTextView it does not change. Is this possible? I need also t

Re: NSCursor tracking areas

2014-07-24 Thread Quincey Morris
On Jul 24, 2014, at 14:35 , Cody Garvin wrote: > I think I’ll try your’s and Edward’s suggestion on attempt mouseEntered / > mouseMoved with a single tracking area. From one point of view, I would recommend *not* taking this approach, since it comes near to flailing, and that’s never a good wa

Re: NSCursor tracking areas

2014-07-24 Thread Cody Garvin
this because in the future the object itself will use another cursor >> for dragging it around. Then use [[NSCursor pointingHandCursor] set]. > > It's not clear to me if you have 4 tracking areas that cover only the > drag-handles, or if the tracking area(s) cover more than

Re: NSCursor tracking areas

2014-07-24 Thread Cody Garvin
> On Jul 24, 2014, at 7:40 AM, Ken Thomases wrote: > > On Jul 24, 2014, at 8:37 AM, Cody Garvin wrote: > >> I use updateTrackingAreas to remove all the tracking areas, then adding new >> ones (same rects as the drag points) with the options: >> NSTrackingActiveInActiveApp | NSTrackingCursorU

Re: NSCursor tracking areas

2014-07-24 Thread Ken Thomases
On Jul 24, 2014, at 8:37 AM, Cody Garvin wrote: > I use updateTrackingAreas to remove all the tracking areas, then adding new > ones (same rects as the drag points) with the options: > NSTrackingActiveInActiveApp | NSTrackingCursorUpdate | NSTrackingAssumeInside Why are you including NSTrackin

Re: NSCursor tracking areas

2014-07-24 Thread edward taffel
On Jul 24, 2014, at 10:30 AM, Cody Garvin wrote: > >> >> ah, well, i had a similar problem, but the opposite. have you tried doing >> the set in mouseEntered? >> > > I have not tried mouseEntered yet. If I go that route, should I dispose of > cursorUpdate? > > - Cody of course, you’ll ne

Re: NSCursor tracking areas

2014-07-24 Thread Cody Garvin
> > ah, well, i had a similar problem, but the opposite. have you tried doing the > set in mouseEntered? > I have not tried mouseEntered yet. If I go that route, should I dispose of cursorUpdate? - Cody ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: NSCursor tracking areas

2014-07-24 Thread edward taffel
On Jul 24, 2014, at 10:18 AM, Cody Garvin wrote: >> >> is it set (enter), reset (exit), or both that sometimes do not work as >> intended? >> > > Setting it, resetting seems to always work. ah, well, i had a similar problem, but the opposite. have you tried doing the set in mouseEntered?

Re: NSCursor tracking areas

2014-07-24 Thread Cody Garvin
> > is it set (enter), reset (exit), or both that sometimes do not work as > intended? > Setting it, resetting seems to always work. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to th

Re: NSCursor tracking areas

2014-07-24 Thread edward taffel
On Jul 24, 2014, at 9:37 AM, Cody Garvin wrote: > Tried to send this yesterday with code, but I guess it was too big. > > This is on Xcode 6 Beta 4 / OS X 10.10. The app is built for 10.10, so > perhaps a bug. > > I’m getting some randomness with updating the cursor. Sometimes works as > int

Re: NSCursor tracking areas

2014-07-24 Thread Cody Garvin
selected objects that can be resized. In these 4 areas the cursor is supposed to change to a “draggable cursor”, and reset when it exits that area. As well, the entire object is draggable, so I wanted an open hand cursor to indicate that when over the main objects. It seems NSCursor and the way

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-12 Thread Sean McBride
On Thu, 11 Apr 2013 18:56:24 -0500, Ken Thomases said: >Was anything written to the console log at this point? When the >frameworks abort, they often write a log message. Nothing in console. :( >Given that the abort is happening when attempting to obtain the >connection to the window server, is

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-12 Thread Andy Lee
On Apr 11, 2013, at 2:57 PM, Sean McBride wrote: > I have an executable which runs fine on 10.7.5, but when run in 10.8.3 > crashes as below. This repros 100% on several machines. The cursor is > created plainly: [NSCursor pointingHandCursor], it happens with [NSCursor > crosshai

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-11 Thread Jens Alfke
On Apr 11, 2013, at 11:57 AM, Sean McBride wrote: > 2 libsystem_c.dylib 0x7fff88fb2dce abort + 143 > 3 com.apple.CoreGraphics0x7fff920db242 CGSConnectionByID + > 232 Did CGS write anything to the console before calling abort()? Looks like it’s complaini

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-11 Thread Ken Thomases
On Apr 11, 2013, at 1:57 PM, Sean McBride wrote: > I have an executable which runs fine on 10.7.5, but when run in 10.8.3 > crashes as below. This repros 100% on several machines. The cursor is > created plainly: [NSCursor pointingHandCursor], it happens with [NSCursor > crosshai

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-11 Thread Sean McBride
On Thu, 11 Apr 2013 18:29:00 -0400, Jon Gary said: >At the risk of suggesting the obvious, did you test with the zombie >instrument to see of you have a memory management bug unrelated to cursors? Instrument's zombie tool has no complaints. I also tried my usual arsenal, specifically, I set the

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-11 Thread Jon Gary
xecutable which runs fine on 10.7.5, but when run in 10.8.3 >> crashes as below. This repros 100% on several machines. The cursor is >> created plainly: [NSCursor pointingHandCursor], it happens with >> [NSCursor crosshairCursor] too, but not with IBeamCursor nor arrowCursor! &

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-11 Thread Sean McBride
On Thu, 11 Apr 2013 14:52:48 -0700, Quincey Morris said: >> I have an executable which runs fine on 10.7.5, but when run in 10.8.3 >crashes as below. This repros 100% on several machines. The cursor is >created plainly: [NSCursor pointingHandCursor], it happens with >[NSCursor

Re: Anyone seen [NSCursor set] crash by calling abort()?

2013-04-11 Thread Quincey Morris
On Apr 11, 2013, at 11:57 , Sean McBride wrote: > I have an executable which runs fine on 10.7.5, but when run in 10.8.3 > crashes as below. This repros 100% on several machines. The cursor is > created plainly: [NSCursor pointingHandCursor], it happens with [NSCursor > crosshai

Anyone seen [NSCursor set] crash by calling abort()?

2013-04-11 Thread Sean McBride
Hi all, I have an executable which runs fine on 10.7.5, but when run in 10.8.3 crashes as below. This repros 100% on several machines. The cursor is created plainly: [NSCursor pointingHandCursor], it happens with [NSCursor crosshairCursor] too, but not with IBeamCursor nor arrowCursor! Any

Re: How to create NSCursor from CGBitmap?

2011-10-28 Thread Howard Moon
all, > > I've got several .png files that I want to use as custom cursors in my > app. I'm loading them into CGBitmap objects, and have written code that > creates NSImage objects using them, via initWithCGImage:size:. I then use > those NSImage objects to cr

Re: How to create NSCursor from CGBitmap?

2011-10-28 Thread Graham Cox
On 27/10/2011, at 4:17 AM, Howard Moon wrote: > Unfortunately, I just noticed that the NSImage function initWithCGImage:size: > is not supported until OS X 10.6, and I need to support 10.5 as well. How > can I create my NSCursor objects from my CGBitmap objects, in a manner t

How to create NSCursor from CGBitmap?

2011-10-28 Thread Howard Moon
Hi all, I've got several .png files that I want to use as custom cursors in my app. I'm loading them into CGBitmap objects, and have written code that creates NSImage objects using them, via initWithCGImage:size:. I then use those NSImage objects to create my NSCursor o

Re: NSCursor - ignore previous (was incomplete)

2011-05-22 Thread Andy Lee
On May 22, 2011, at 7:43 PM, Graham Cox wrote: > Cursors can be tricky, for sure. They are typically associated with an area > of the screen - the cursor is set on entry to that area. This area might be a > view or part of a view and the easiest and most reliable mechanism for > getting notified

Re: NSCursor - ignore previous (was incomplete)

2011-05-22 Thread Graham Cox
On 23/05/2011, at 3:26 AM, Adam Gerson wrote: > I am not sure exactly where this code belongs or how to keep the > cursor set this way. When I begin my animation I set the cursor, but > it very quickly goes back to the "arrow". I believe this is happening > when some of my views are getting redra

NSCursor - ignore previous (was incomplete)

2011-05-22 Thread Adam Gerson
I am trying to understand NSCursor better. I have an animation that takes place in my view and I don't want to allow any mouse or keyboard interaction while the animation is running. That is easy to do. While this is happening I want to display some kind of custom "waiting" curs

NSCursor

2011-05-22 Thread Adam Gerson
I am trying to understand NSCursor better. I have an animation that takes place in my view and I dont want to allow any mouse or keyboard interaction while the animation is running. That is easy to do. While this is happening I want to display some kind of custom "waiting" cursor which I

Re: Maintaining NSCursor outside of app window

2011-01-14 Thread Corbin Dunn
On Jan 14, 2011, at 1:00 AM, Uli Kusterer wrote: > On 14.01.2011, at 01:37, Corbin Dunn wrote: >> - (void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint >> >> Then do something like this (after converting the screen point to window >> coords): >> >> NSPoint windowPoint = [

Re: Maintaining NSCursor outside of app window

2011-01-14 Thread Uli Kusterer
On 14.01.2011, at 01:37, Corbin Dunn wrote: > - (void)draggedImage:(NSImage *)draggedImage movedTo:(NSPoint)screenPoint > > Then do something like this (after converting the screen point to window > coords): > >NSPoint windowPoint = [[view window] mouseLocationOutsideOfEventStream]; >NSP

Re: Maintaining NSCursor outside of app window

2011-01-13 Thread Quincey Morris
coords): >> >>NSPoint windowPoint = [[view window] mouseLocationOutsideOfEventStream]; >>NSPoint localPoint = [view convertPoint:windowPoint fromView:nil]; >>if (![view mouse:localPoint inRect:[view visibleRect]]) { >>[[NSCursor disappearingItemCursor] set];

Re: Maintaining NSCursor outside of app window

2011-01-13 Thread Markus Spoettl
tsideOfEventStream]; > NSPoint localPoint = [view convertPoint:windowPoint fromView:nil]; > if (![view mouse:localPoint inRect:[view visibleRect]]) { > [[NSCursor disappearingItemCursor] set]; > } Fantastic, thanks so much Corbin! Regards Markus -- ___

Re: Maintaining NSCursor outside of app window

2011-01-13 Thread Corbin Dunn
convertPoint:windowPoint fromView:nil]; if (![view mouse:localPoint inRect:[view visibleRect]]) { [[NSCursor disappearingItemCursor] set]; } corbin On Jan 13, 2011, at 4:11 PM, Markus Spoettl wrote: > Hello, > > I have a drag-n-drop UI where I use the [NSCursor disappearingItemC

Maintaining NSCursor outside of app window

2011-01-13 Thread Markus Spoettl
Hello, I have a drag-n-drop UI where I use the [NSCursor disappearingItemCursor] to indicate that if you drop now, you're going to remove the item being dragged. I do this by setting the cursor when my dragging destination receives a -draggingExited: message (the dragging destinatio

Re: [NSCursor] White Arrow?

2008-09-02 Thread I. Savant
rsor with CoreImage and applying an "invert" affect to turn it white with black edges, then using *that* resulting image as the NSCursor image they set. Just an idea ... -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

[NSCursor] White Arrow?

2008-09-02 Thread Stéphane Sudre
In Apple Remote Desktop, when you are in observe mode, the cursor is set to a white arrow. This is pretty nice to show that you can't click somewhere you're usually able to. As far as I can tell, this cursor is not set from a picture. Is the white arrow cursor a system cursor not documented