• 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: Mouse cursors and overlapping sibling NSViews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse cursors and overlapping sibling NSViews


  • Subject: Re: Mouse cursors and overlapping sibling NSViews
  • From: edward taffel <email@hidden>
  • Date: Wed, 23 Apr 2014 13:16:03 -0400

if i understand you correctly: you want to adjust the cursor in your view based on state, but embedded controls should set the cursor independently. you might try subclassing the controls in question, register a tracking area (for controls that do not already have one, only) & define mouseEntered (set the cursor here) for each. i’ve done similar w/ custom views but your results may vary w/ stock controls.

hope this helps.


On Apr 23, 2014, at 9:48 AM, Sean McBride <email@hidden> wrote:

> Hi all,
>
> I'm trying to determine how to manage the mouse cursor in the case of overlapping sibling views.
>
> I have a custom NSView that needs to change its cursor depending on mouse position and internal state.  The sibling views (which all draw on top of my view, thus appearing sorta like subviews) are simple standard Cocoa controls (ex: push buttons, popup menus).  Since those siblings views are always 'on top', I want them to decide the mouse cursor if the cursor is above them, but Cocoa still calls my mouseMoved: method, which I guess is not unreasonable since the cursor is in fact above several views at the same time.
>
> I haven't been able to find any docs about how cursor handling works with overlapping views, anyone know?
>
> Thanks,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 email@hidden
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Mouse cursors and overlapping sibling NSViews
      • From: edward taffel <email@hidden>
References: 
 >Mouse cursors and overlapping sibling NSViews (From: Sean McBride <email@hidden>)

  • Prev by Date: Re: Mouse cursors and overlapping sibling NSViews
  • Next by Date: Re: Memory Leaks and ARC
  • Previous by thread: Re: Mouse cursors and overlapping sibling NSViews
  • Next by thread: Re: Mouse cursors and overlapping sibling NSViews
  • Index(es):
    • Date
    • Thread