Re: Draw NSView over QTMovieView
Re: Draw NSView over QTMovieView
- Subject: Re: Draw NSView over QTMovieView
- From: douglas welton <email@hidden>
- Date: Tue, 20 Jan 2009 20:12:19 -0500
moving the entire content view may be the equivalent of killing a gnat
with a bazooka. ;^) all that may be required is moving the
QTMovieView. This is basic stuff supported by NSView's methods like -
addSubview: and -removeFromSuperview: (make sure you retain and
release appropriately)
If you're gonna go the route of multiple windows, then IMHO the
easiest thing to do use two windows (one with a frame, the other
borderless - both having identical content layouts) and migrate the
QTMovie back and forth between the various displaying views using -
setMovie: I did this with several projects (pre-Leopard). Works like
a charm and doesn't involve any actions of mucking with the view
hierarchy
On Jan 20, 2009, at 7:10 PM, Andy Lee wrote:
Every window has a top-level view called the content view, explained
here: <http://developer.apple.com/documentation/Cocoa/Conceptual/WinPanel/Concepts/HowWindowsWork.html
>.
Everything you put in the window is actually put into the content
view. My idea was to move the content view of one window into the
other window.
For example, if you're switching to fullscreen mode, it would be
something like:
NSView *contentView = [[[regularWindow contentView] retain]
autorelease];
[regularWindow setContentView:nil];
[fullscreenWindow setContentView:contentView];
I'm not sure if you really have to remove the content view from one
window to move it to the other -- it just seems safer to do so.
--Andy
On Jan 20, 2009, at 6:58 PM, Mr. Gecko wrote:
still can't find out how to move it...
On Jan 20, 2009, at 5:20 PM, Andy Lee wrote:
Does -[NSWindow setContentView:] not work for the kind of stuff
you're doing? Sorry, I don't know much about multimedia stuff.
--Andy
On Jan 20, 2009, at 6:12 PM, Mr. Gecko wrote:
I could do that, but how can I move the content?
On Jan 20, 2009, at 5:10 PM, Andy Lee wrote:
How about having two windows with different styles, and moving
the content view from one to the other when you switch between
fullscreen and regular modes?
--Andy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden