<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3502.5390" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>From: "Prabhu Ramachandran" <<A
href="mailto:prabhu@aero.iitm.ernet.in">prabhu@aero.iitm.ernet.in</A>><BR><BR>>
>>>>> "BR" == Benoit Regrain <<A
href="mailto:benoit.regrain@creatis.insa-lyon.fr">benoit.regrain@creatis.insa-lyon.fr</A>>
writes:<BR>><BR>> BR> I have made some tests
concerning reparenting. With the method<BR>> BR>
SetNextWindowId placed in vtkXOpenGLRenderWindow we can
change<BR>> BR> properly the drawing window id. To
use it in python, it is<BR>> BR> necessary to have
method SetNextWindowInfo, like we have<BR>> BR>
SetWindowInfo.<BR>><BR>> It is possible to add a SetNextWindowInfo method
to the<BR>> vtkXOpenGLRenderWindow class but the question is will this be a
cross<BR>> platform solution or an X-only solution? How would you
achieve<BR>> re-parenting under Win32 or Mac OS X? Or is that already
possible to<BR>> do? In any case I think since vtkXOpenGLRenderWindow
already provides<BR>> a SetNextWindowId method, adding a SetNextWindowInfo
should be fine.<BR>><BR>> The other issue is that VTK is due for a 4.2
release shortly and I am<BR>> not sure making this addition at this time is a
good idea (although I<BR>> don't see it introducing any new problems).
So maybe after the 4.2<BR>> release this can be added?<BR><BR>Concerning the
method SetNextWindowId, it exists for Win32, WinCE and X platforms.<BR>The
SetNextWindowInfo will only make the same work than SetNextWindowId, as
SetWindowInfo makes the same work than SetWindowId.<BR>The variable modified by
this method (variable this->NextWindowId) is afterused by WindowRemap,
only.<BR>Under Windows, it works perfectly without that mecanism. But under
linux, we must use it to supprim errors.<BR>Concerning Mac Carbon platform, the
WindowRemap exists, but generates an error... (I don't have Mac environement to
test it)<BR>Therefore, add the SetWindowInfo in vtkRenderWindow class will not
add problems.<BR>I think it can be made for the 4.2
release.<BR><BR>><BR>> BR> I would know why you
don't have write the method<BR>> BR>
SetNextWindowId in class vtkRenderWindow, and if you
could<BR>> BR> make that and add the method
SetNextWindowInfo. What must I<BR>> BR> make
or send to you to have these modifications in the
next<BR>> BR> VTK nightly ???<BR>><BR>>
Nothing really. In this case I think the change should be fairly
easy<BR>> to make. You just need to get the attention of one of
the<BR>> developers. :)<BR>><BR>> BR> I must
work a little to python class wxVTKRenderWindow to
have<BR>> BR> properly code.<BR>><BR>> The
wxVTKRenderWindow class and the Interactor class are not perfect.<BR>> Fixes
are most welcome. :)<BR>><BR>> cheers,<BR>> prabhu<BR><BR>To combine
with these little modifications, wxVTKRenderWindow must be modified :<BR> -
variable self.__Created is replaced by self.__Handle wich is the Handle id of
current window used.<BR> - test in Render method to verify the handle used
by VTK. It is made her because a reparent on an ancestor of vtkRenderWindow will
change Handle id<BR>I remenber you a change that I had made before concerning
the default size of vtkRenderWindow at creation of
vwVTKRenderWindow...<BR><BR>After some tests, I have found an other error which
is :<BR> - when I reparent a wx widget wich have more than one
vtkRenderWindow inside, I obtain a segmentation fault under linux (windows
didn't have problems).<BR> - the segmentation fault appears always in the
same case depending of position and order of displays (in the window).<BR>To
solve that (and I don't know if it's the best method because I'm a beginner in
XLib), I'm closing the display when the drawing context is
destroyed.<BR><BR><BR>I you can find files that I have modified and tested on
windows2000 and Linux :<BR> - vtkRenderWindow.h<BR> -
vtkXOpenGLRenderWindow.h<BR> - vtkXOpenGLRenderWindow.cxx<BR> -
vtkWin32OpenGLRenderWindow.h<BR> -
vtkWin32OpenGLRenderWindow.cxx<BR> - wxVTKRenderWindow.py</DIV>
<DIV>at the URL : <A
href="http://www.creatis.insa-lyon.fr/~regrain/VTK/patch">www.creatis.insa-lyon.fr/~regrain/VTK/patch</A><BR><BR>I
hope have omitted nothing. And if have any questions concerning that, I'm<BR>to
your disposal.<BR><BR>Greatings to consider that before the next release
:-D<BR><BR>Benoit Regrain<BR></DIV></BODY></HTML>