• 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
Custom window w/close
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom window w/close


  • Subject: Custom window w/close
  • From: Dave Hersey <email@hidden>
  • Date: Thu, 04 Mar 2004 18:04:41 -0500

I have a custom borderless window with a (substitute) close box, and I need
to my close box act like a regular one.

Specifically, I need to highlight the close box if the mouse goes over it,
and un-highlight the box if the mouse moves out, *whether or not* the app
is front-most. If the user clicks on the highlighted close box, *even from
another app*, I need to close the window.

Question #1:
------------
Should I be delegating mouseMoved whenever the window is open, or is there a
more system-friendly way to do the highlighting? I'm not even sure if a
window's mouseMoved delegate gets called when the app is not front-most...?

Question #2:
------------
How do I get the click that activated me and make it go to my window's close
handler? Right now, the app just comes forward. I see the
NSApplicationDidBecomeActiveNotification, but that doesn't include
information about how the app became active.

Thanks,

- Dave
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Custom window w/close
      • From: Andreas Mayer <email@hidden>
    • Re: Custom window w/close
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: PDF viewing (like Preview)
  • Next by Date: Re: SFAuthorizationView - again...
  • Previous by thread: Re: Switching out an NSTextField's NSTextStorage
  • Next by thread: Re: Custom window w/close
  • Index(es):
    • Date
    • Thread