Re: embedding/hosting Carbon/HIView in Cocoa/NSView? [slightly-OT]
Re: embedding/hosting Carbon/HIView in Cocoa/NSView? [slightly-OT]
- Subject: Re: embedding/hosting Carbon/HIView in Cocoa/NSView? [slightly-OT]
- From: "Ross Bencina" <email@hidden>
- Date: Wed, 12 May 2010 13:49:51 +1000
Kyle Sluder wrote:
I want to *embed* not *float*. I want the HIView inside a cropped
viewport
in a scrolling view -- *floating above* simply isn't going to cut it.
Since you would be putting the Carbon view inside a borderless
WindowRef-wrapping NSWindow, if you keep the window's frame in sync
with the visible content rect of your scrollview, you can take
advantage of Quartz's natural clipping behavior to get the effect you
want. Currently-shipping versions of OmniPlan and OmniOutliner use
this technique to great effect (though they aren't Carbon), as does
the operating system itself.
That's a great idea, and something I hadn't thought of. Unfortunately it is
rather more complicated in my case. Each plugin is embeded inside a
pseudo-window frame (an NSView), and all of these plugin frames can be
overlapping -- it's basically a custom implemented window manager inside a
scrolling view. So I would need non-rectangular clipping on the carbon
windows to simulate mixing z-order between carbon HIViews and NSViews --
sounds like a lot of work. On the other hand, given that some plugins seem
to assume they embedded in a very simple hierarchy it might be a very
compatible way to move forward.
So I have something like:
Main Window
-> Scrolling View
--> Plugin Frame 1
--->Plugin 1 HIView
--> Plugin Frame 2
--->Plugin 2 NSView
frames can overlap. and they have rounded corners.
Thanks.
Ross.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden