[GRASS-dev] v.digit: Qt or wxWidgets

Glynn Clements glynn at gclements.plus.com
Sat May 20 07:50:54 EDT 2006


John Gillette wrote:

> > AFAICT, the main obstacles are v.digit and NVIZ. v.digit 
> > needs a decision on a suitable toolkit (probably either Qt or 
> > wxWidgets) and a volunteer. NVIZ requires someone to update 
> > Togl to 1.7 and to conditionalise the GLX-specific code in do_zoom.c.
> 
> Glynn:
> (1) I'd like to see the code written in C, as opposed to C++. 
>     I think more developers and users are going to know C. This
>     lets users be able to trouble shoot and find bugs.
>     [full disclosure: I only know C.]

That would be nice. Unfortunately, both Qt and wxWidgets use a C++
API. GTK uses C, but the native MacOSX version is currently "alpha"
quality.

Actually, the MacOSX port seems a bit further along than I had
realised. In that case, GTK might be a viable option. If the native
MacOSX version isn't stable enough for normal use, the X11 version of
GTK can be used until the native version has matured.

The status page is here:

http://developer.imendio.com/wiki/Gtk_Mac_OS_X/Things_to_do

> (2) I looked at wxWidgets after the last time you mentioned it.
>     I assume you can use it with C?

No. The API is C++ (i.e. each widget is a C++ object).

> (3) I didn't understand the relationship between wxWidgets and GTK.
>     Can you explain some of this? 

wxWidgets provides a common interface to a variety of different GUI
toolkits: GTK, Motif, raw Xlib, Win32, and Mac (Carbon and
"non-Carbon").

The basic WX widgets are usually wrappers around the widgets provided
by the underlying toolkit. More complex widgets have to be implemented
by wxWidgets itself (as do all of the widgets for the raw Xlib
version).

The net result is a wxWidgets application should have a native look
and feel. Other GUI toolkits tend to implement all of the widgets
themselves, which mean that an application tends to look and behave
the same on all platforms.

> (4) GTK is not on your list. Can you explain your thinking about
>     which you prefer or which kit you would use?

I had excluded GTK because there didn't appear to be a usable native
version for MacOSX. If the native MacOSX version is likely to be
usable in the near future, then GTK would be a viable option (and the
fact that it's API is in C gives it an advantage over Qt and
wxWidgets).

> Perhaps by virtue of asking these questions it means I am not 
> qualified to work on v.digit but I get excited (and frustrated) 
> about the possibility of having a window based v.digit program. 
> 
> If we could discuss it a little and then have Glynn just make a 
> decision [1], I would run off and start learning that toolkit. I
> already learned some GTK.

It would be useful if someone with a Mac could provide feedback on the
current state of GTK on MacOSX.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list