[vtkusers] Fwd: How to subclass RenderWindow for use with gtk

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Tue Nov 12 11:57:22 EST 2002


>>>>> "MT" == mista tapas <mista.tapas at gmx.net> writes:

    MT> I am wondering, which steps are necessary to subclass
    MT> vtkRenderWindow to make it work in another gui-toolkit..
    MT> 
    MT> I was thinking about integrating a vtk-View into a
    MT> Gtk-Application.. I know there is solutions out there for Qt,
    MT> but those, that some of my fellow students tried, are often
    MT> buggy.. There`s problems with threads, etc..  Besides Qt is
    MT> very heavy and the moc-thingy can complicate matters when it
    MT> comes to namespaces and stuff..
    MT> 
    MT> Any hints? The doc is very sparse on this issue (or i idin`t
    MT> look right).  Anyone have any Pointers on how to start?

I'd suggest that you take a look at either Charl's vtkFlRenderWindow

 http://cpbotha.net/vtkFlRenderWindowInteractor.html 

or the wxVTKWindow classes.  I am not sure which is the latest version
of the wxVTKWindow but look at these:

 http://www.google.com/search?q=wxvtkwindow

vtkFlRenderWindow is actively maintained.

Writing a class to support GTK+ should not be too hard if you get the
hang of how the others do it.  Its a little too long since I looked at
this so I can't give more details off hand.  However, if it does help
maybe you could look at the implementation for the PyGTK VTK widgets
that are in the Wrapping/Python/vtk/gtk directory.  These work well
and should give you a general idea of how to go about things.  AFAIK
PyGTK is similar to GTK-- not entirely sure though.

cheers,
prabhu



More information about the vtkusers mailing list