• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Where is plus arrow cursor?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is plus arrow cursor?


  • Subject: Re: Where is plus arrow cursor?
  • From: Gwynne <email@hidden>
  • Date: Mon, 28 Feb 2005 11:01:24 -0500

On Feb 28, 2005, at 10:47 AM, Sean McBride wrote:
Don't you get this "for free" when you indicate that a drag operation
is a NSDragOperationCopy?
Exactly!  So isn't it strange that NSCursor does not provide it, since
Cocoa itself uses it? :)

Yes. File a bug. I did :).

Cocoa is missing kThemeContextualMenuArrowCursor, kThemeAliasArrowCursor,
kThemeCopyArrowCursor, and kThemeNotAllowedCursor, all of which the HIG
says should be used. See:


<http://developer.apple.com/documentation/UserExperience/Conceptual/
OSXHIGuidelines/XHIGCursors/chapter_6_section_2.html>

Just for the record, when I needed the contextual menu cursor in a custom NSView, I worked around this limitation with a tracking rect:


// in @interface
NSTrackingRectTag			tracking_tag;
NSCursor					*save_cursor;

// in @implementation
- (void)viewDidMoveToWindow
{
tracking_tag = [self addTrackingRect:NSMakeRect( 0, 0, [self frame].size.width, [self frame].size.height ) owner:self userData:nil assumeInside:NO];
}


- (void)mouseEntered:(NSEvent *)anEvent
{
	if ( [self isEnabled] )
	{
		save_cursor = [[NSCursor currentCursor] retain];
		SetThemeCursor( kThemeContextualMenuArrowCursor );
	}
}

- (void)mouseExited:(NSEvent *)anEvent
{
	if ( save_cursor )
	{
		[save_cursor set];
		[save_cursor release];
		save_cursor = nil;
	}
}

- (void)setFrame:(NSRect)frameRect
{
[self removeTrackingRect:tracking_tag];
tracking_tag = [self addTrackingRect:NSMakeRect( 0, 0, frameRect.size.width, frameRect.size.height ) owner:self userData:nil assumeInside:NO];
}


- (void)setBounds:(NSRect)aRect
{
[self removeTrackingRect:tracking_tag];
tracking_tag = [self addTrackingRect:NSMakeRect( 0, 0, aRect.size.width, aRect.size.height ) owner:self userData:nil assumeInside:NO];
}


-- Gwynne, key to the Code
Email: email@hidden
Website: http://musicimage.plasticchicken.com/
"This whole world is an asylum for the incurable."

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Where is plus arrow cursor? (From: j o a r <email@hidden>)
 >Re: Where is plus arrow cursor? (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: How do I make a panel come out of the title bar
  • Next by Date: Re: Where is plus arrow cursor?
  • Previous by thread: Re: Where is plus arrow cursor?
  • Next by thread: Re: Where is plus arrow cursor?
  • Index(es):
    • Date
    • Thread