[vtk-developers] vtkCocoaRenderWindow qq
clinton at elemtech.com
clinton at elemtech.com
Wed Oct 1 13:29:46 EDT 2008
On Wednesday 01 October 2008 11:14:36 am Sean McBride wrote:
> On 10/1/08 10:54 AM, clinton at elemtech.com said:
> >I've looked a bit at vtkCocoaRenderWindow to see how to make it work
>
> with Qt,
>
> >and the first thing I noticed was that one sets a Cocoa view using
> >vtkCocoaRenderWindow::SetDisplayId, instead of
> >vtkCocoaRenderWindow::SetWindowId. Is there any reason its that way, as
> > it seems to deviate from how the other vtk*RenderWindow classes work?
> > Besides, "Display" is an X11 concept.
> >Can we change that to make it consistent, so I don't have to add #ifdefs
> > for the Cocoa case?
>
> The superclass has SetDisplayId/SetWindowId, and, as you say, this
> terminology does not map to Cocoa.
>
> It might have been me that implemented them like that. How do you
> expect each to work? The docs from the superclass are vague:
> <http://www.vtk.org/doc/nightly/html/classvtkWindow.html>
>
> In any case, these are documented public APIs, if we change them, we
> break API-backwards compatibility.
>
> Currently:
>
> vtkWindow concept Cocoa concept Carbon concept
> DisplayId NSView ?
> WindowId NSWindow ?
> ParentId unimplemented ?
>
> How is it in the Carbon case?
To add Carbon to your table:
vtkWindow concept Cocoa concept Carbon concept
DisplayId NSView -na-
WindowId NSWindow HIView
ParentId unimplemented HIView
RootWindow -na- Window
However, I assume the Cocoa support was there before HIViews were supported by
vtkCarbonRenderWindow.
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
Clint
More information about the vtk-developers
mailing list