Making a window transparent to some events, but not others
Making a window transparent to some events, but not others
- Subject: Making a window transparent to some events, but not others
- From: James Bucanek <email@hidden>
- Date: Sat, 23 Sep 2006 12:26:11 -0700
Greetings,
Here's scenario:
- Transparent child window covering a regular window with NSOutlineView and other regular controls.
- Child window draws overlay graphics and some animation.
- Child window implements some controls (think the transparent controls that pop-up in slide show or the new DVD player).
My original plan was to process the mouse events first in the child window, then pass on any that aren't a hit on to the parent window.
The event handling docs give a good description of how to how to handle mouse events in a window, or not handle mouse events at all. However I've found no description, either in the docs or the list archives, of how to hand-off an event received in one window to another window.
My initial guess would be to override the sendEvent: message in the child NSWindow. Test the event, and if it's not one that the child window handles, create a new event with the same information (but different window) and call [parentWindow sendEvent:]. I can find no example code anywhere that does this, but I also can't think of any other way of doing it.
--
James Bucanek
_______________________________________________
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