Reputation: 440
I'm provided with a CALayer*
and would like to know if it's possible to dynamically create a NSWindow
and show it on the layer?
Thanks in advance!
Upvotes: 2
Views: 629
Reputation: 96323
I'm provided with a CALayer* and would like to know if it's possible to dynamically create a NSWindow …
Yes.
… and show it on the layer?
Nope.
You can make a layer that knows about the window or its content view and, when told to draw, tells the window's content view to draw, or you could take a screenshot of the window and set it as the layer's contents. But you can't put a window into a layer.
Upvotes: 4