Re: Child windows
Re: Child windows
- Subject: Re: Child windows
- From: David Aames <email@hidden>
- Date: Sun, 14 Jan 2007 17:20:58 +0000
Hi,
I'll show you what I mean with two example apps - one which
demonstrates the right behaviour (but doesn't use child windows) and
one which shows the buggy behaviour (uses child windows). The only
reason I'm doing this is to emulate the feel of Terminal's see-
through window - AFAIK several people tried to do it and no one
succeeded to perfectly replicate its see-through portions (I can go
as far as seeing through the window but the window shadow can still
be seen behind my transparent view which is not the case with Terminal).
So as someone suggested a few days ago to achieve this you use a
child window on top of your intended background window and disable
the shadow + titlebar + content view colour of the front window and
this creates the illusion that the controls actually belong to the
background window.
The way to test the apps is to just run them and activate Expose. In
the correct one you will see the inspector window (technically two
windows) fade out properly without moving its position. In the buggy
one you will see how the top window (the one with the contents)
actually moves its frame + fades out.
Example 1 (proper behaviour; no child windows; one NSPanel on top of
another) - http://www.mediamax.com/david_aames/Hosted/
MyOverlayWindow.zip
Example 2 (incorrect behaviour; top window is the child of the bottom
one) - http://www.mediamax.com/david_aames/Hosted/MyOverlayWindow %
28+ Bad Behaviour).zip
Thanks for looking into this,
David
PS. Should I report this to Apple as it seems to me that this is not
the intended behaviour?
On 14 Jan 2007, at 15:43, Uli Kusterer wrote:
Am 13.01.2007 um 19:41 schrieb David Aames:
But when I the top NSPanel as a child window of the bottom one and
activate Expose then contents of the top NSPanel slide away like a
normal window (and eventually fade out) but I can clearly see that
the NSPanel occupies space in Expose although nothing is shown there.
Vanna, I'd like to buy a verb ... ?
In short, adding an NSPanel as a child of another NSPanel makes it
behave like a normal window (the only difference is that it is not
visible in Expose). Has anyone else bumped into this?
Could you elaborate what you mean by child window? Cocoa currently
doesn't have the concept of child windows (Carbon does have window
groups, though). You can have nested views inside a window, and you
can have one sheet or several drawers attached to a window. Which
one are you referring to?
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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