[vtkusers] wxVTKWindow on wxGTK 2.3.X with gtk+-2.X

Tomomasa OHKUBO tohkubo at es.titech.ac.jp
Sun Dec 22 08:11:37 EST 2002


Hello vtkusers,

I used wxVTKWindow on wxGTK 2.2.9. It worked very good.
But I updated wxGTK 2.3.4 (using gtk+-2.0) today, then wxVTKWindow doesn't
handle mouse and key event.
# Off course drowing and resize etc. can be done correctly.

In gtk+-2.0, GdkWindowPrivate can't user, so I changed as  below

-  GdkWindowPrivate* bwin = (GdkWindowPrivate *) GTK_PIZZA(m_wxwindow)->bin_window;
-  static_cast<vtkXOpenGLRenderWindow *>( RenderWindow )->SetParentId( bwin->xwindow );
-  static_cast<vtkXOpenGLRenderWindow *>( RenderWindow )->SetDisplayId( bwin->xdisplay );

+  static_cast<vtkXOpenGLRenderWindow *>( RenderWindow )->SetParentId(GDK_WINDOW_XID(m_wxwindow->window));
+  static_cast<vtkXOpenGLRenderWindow *>( RenderWindow )->SetDisplayId(GDK_WINDOW_XDISPLAY(m_wxwindow->window));

using  this patch, I can compile but doesn't handle mouse or key event.
Is this wrong way?

Do anyone can use wxVTKWindow on wxGTK 2.3.X on gtk+-2.X ?
Is this problem of VTK or gtk+?

Thank you.

-- 
Tomomasa Ohkubo <tohkubo at es.titech.ac.jp>



More information about the vtkusers mailing list