[GRASS-dev] Python GUI toolkits
Glynn Clements
glynn at gclements.plus.com
Thu Jun 8 16:09:59 EDT 2006
Michael Barton wrote:
> Ideally, we should be able to write one piece of GUI code that will run on
> all platforms, without x11 on Windows and preferably running under aqua on a
> Mac.
>
> Does anyone looking into either wxPython or pyGTK know if this can be done
> with either of these platforms?
>
> The whole idea of not requiring x11 for GRASS is kind of lost if it is
> required for the GUI. By the same token, it would be difficult to maintain 3
> different versions of the GUI (unless the differences were very minimal).
wxPython uses wxWidgets, which uses the platform's native widgets.
This provides a more native look-and-feel, but is harder to code for,
as there tend to be subtle differences between the behaviour of
similar widgets on different platforms.
wxGTK uses GTK; whether or not that requires an X server depends upon
whether you use the platform's native GTK port or the X11 version.
On Unix systems (other than MacOSX), the X11 version /is/ the native
version.
On Windows, there is a mature native version, while Cygwin offers an
X11-based GTK package. You would only use the Cygwin version if you
require an especially high degree of compatibility, e.g. because the
application directly uses X11 functions in addition to GTK functions.
On MacOSX, the native port appears to be at an alpha stage (based upon
the "todo" list on the web site). Also, running Unix/X11 applications
isn't as problematic on OSX as it is on Windows, as you don't need a
Cygwin-style compatibility layer.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list