So these (the window root and the content view) can be different?
When you are looking at things from the point of view of HIView, they
are different. That flexibility thing I was talking about earlier
comes into play.
The root of the HIView system is a view that is often called the
"structure view" of the window. The direct children of the structure
view includes things like the views that put the little colored dots in
the upper left hand corner (the close, collapse, and zoom boxes), a
view for the title bar, and the content view. The root view is also
the one that (presumably) draws the rounded corners of the window. When
you call HIViewGetRoot... you really get the ROOT of the window.
Contrast this with the classic control manager call GetRootControl.
This routine actually returns the same control as the content view in
the HIView hierarchy.
If you want to have some fun, set up some code that crawls the HIView
hierarchy staring at the root and prints out the class IDs of all the
controls it finds... that can be fun. Also, try installing a
kEventControlDraw event on the root view of a window and draw something
wacky into it. Geek Toys!
If you want to create a completely custom window, you can do so by
creating a custom subclass of HIView that implements all the drawing
for the root of your window. Your root view will also have to manage
things like creating and positioning the content view. Keeping the
origin for the port of the content view set up properly (if you are
using QuickDraw in that window) etc...
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden