[vtkusers] Which one to use?! Fltk? GTK? WxWidgets..?!
Sean McInerney
seanm at nmr.mgh.harvard.edu
Sat Jun 5 19:16:04 EDT 2004
> So I was thinking I should use Python, but then does this mean I would
> have to rewrite my entire c++ code (which is quite a bit of code) to
> python syntax?! OR can I wrap my c++ code to python..? But then I'm
> afraid that I wont be able to wrap everything because I use all kinds
> of data structures involving pointers, arrays, and I have several of
> my own classes etc..
It might not be a bad idea to abstract your structures a bit so that
they could be vtkObject subclasses. This way you can use VTK's own
wrapping facilities. An interesting, but slightly more Frankenstein
approach, would be to use other wrapper generators like Swig or Boost
Python.
> Or I heard that there is something called GTK or FLTK or wxWidgets?
>
> So I'm really not sure which route to take right now.. Would you have
> any suggestions, keeping in mind that I need to maintain
> platform-independence, and that my code has to be fast (real-time),
> and that I basically need to have an event-loop to be able to detect
> events from a keyboard, mouse, and motion-tracker?
I would definitely read the "GUI Toolkits for the X Window System.
Ignore the "X" in the title since most of the mentioned kits are, in
fact, cross platform. Find it at:
http://nic.nac.wdyn.de/~skypher/me/writings/fm-article-toolkits/article.html
Any of the bridges that you mention should do what you need ... you
could also check out Qt. This will mostly boil down to both your own
design aesthetic as well as the details of you project. Qt and wxWidgets
are by far the most full featured widget toolkits but both are also
massive. GTK is the middle weight contender, but is written in C with
its own tacked on object and inheritance mechanism. FLTK is the leanest
and meanest and will gain a great many long awaited widgets and features
when its 2.0 release finally arrives. I wrote vtkFLTK for my own
purposes and have included a whole bunch of examples that should provide
some insight into its possibilities for you. vtkFLTK uses CMake and
integrates pretty easily with VTK projects on all platforms. Building as
a shared library on Win32 is currently problematic, but it represents
such a small bit of code that I've always linked it in statically.
http://vtkfltk.sourceforge.net/
-Sean
More information about the vtkusers
mailing list