Custom window w/close
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.