[vtk-developers] vtkCocoaRenderWindow qq
Sean McBride
sean at rogue-research.com
Wed Oct 1 20:13:34 EDT 2008
On 10/1/08 12:28 PM, clinton at elemtech.com said:
>> >What I would have expected was something like
>> >vtkWindow concept Cocoa concept Carbon concept
>> >DisplayId -na- -na-
>> >WindowId NSView HIView
>> >ParentId NSView HIView
>> >RootWindow NSWindow Window
>>
>> In the Carbon column you have 2 HIViews. Are these the same? Do you
>> mean WindowId and ParentId are synonymous?
>
>They are not the same. The WindowId/HIView is a child of ParentId/HIView.
>That gives the user the option of only setting the ParentId, and let VTK
>create the child window/view, and manage it.
I'm not too familiar with HIViews... you seem to be describing some kind
of subview relationship...
Generally, in the Cocoa case, VTK creates both the NSView and NSWindow,
and it sets the NSView as the NSWindow's contentView. There isn't ever
another NSView.
I looked at the Carbon code, and I see it creates a WindowRef (stored in
RootWindow) and stores the WindowRef's contentView as the WindowId. The
ParentId is never set, but it is read. I guess I'm still not clear on
ParentId's purpose.
Anyway, this makes sense:
vtkWindow concept Cocoa concept Carbon concept
DisplayId n/a n/a
WindowId NSView HIViewRef
ParentId ? HIViewRef
RootWindow NSWindow WindowRef
What, if anything, would you envision ParentId doing in the Cocoa case?
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list