D2 GUI Libs

Eldar Insafutdinov e.insafutdinov at gmail.com
Sat Dec 12 08:46:15 PST 2009


dsimcha Wrote:

> I'm thinking of giving another try to writing a plotting library for D.  I'm
> trying to decide what GUI library to use.  Here's what's important to me, in
> order of importance.  Someone who's more familiar with the GUI library
> situation than I am please make a recommendation.
> 
> 1.  Good D2 support.  I don't want something that's going to take forever to
> be usable in D2 even after the spec is stable.
> 
> 2.  Performance.  If a scatter plot with 50,000 points takes a few seconds to
> redraw when the window is resized, it's too slow.  I'm frankly sick of using
> slow plotting libraries in other languages.
> 
> 3.  Licensing.  I prefer something permissive like BSD or Boost.  LGPL is
> acceptable, though annoying and sometimes ambiguous.  If it's GPL I just plain
> won't use it because I want the license to the plotting library to be
> reasonably permissive.
> 
> 4.  Simplicity of API.  I don't want a library that requires tons of
> boilerplate to do simple things.
> 
> 5.  Platform support.  Windows XP, Vista and 7 and x86 Linux are a must.  I
> don't care so much about macs or some of the more esoteric platforms, or about
> ancient versions of Windows.
> 
> What isn't very important:
> 
> 1.  Lots of features/flexibility.  I'm thinking the plotting lib will be a
> minimalist library, focused on "just working", simplicity of API and
> performance rather than on lots of bells and whistles and extensibility.
> Therefore, I don't need lots of bells and whistles in my GUI library.
> 
> 2.  Native look and feel.  IMHO this is very overrated.  I've never found that
> a Java-ish or GTK-ish or whatever look and feel instead of a native Win32 look
> and feel got in the way of me using a program effectively.
> 
> 3.  Stable ABI.  The plotting library will never have a stable ABI, only a
> stable source-level API.  Most of the API will probably be templates anyhow.
> Therefore, I don't care if the GUI library has no stable ABI, only a stable
> source-level API.

Right now we are working on a next QtD version. We dropped support for D1, it is D2 only. I believe Qt suits all your requirements very well. It's performant - we try to emulate as many C++ types using D structs as possible, for drawing purposes. So types like QPoint - are D structs and for drawing lines you can pass D array directly. No perfromance hit. But of course we cannot avoid all of them, it is still a binding. Regarding the license, Qt itself is LGPLed, QtD is boost. you don't have to put any attribution.
About stability of APIs - Qt4 is stable within the major version. At the moment we are working on signals/slots implementation. It is mostly complete, but syntax may change. It will hopefully change once and stay forever.

I would say that QtD is in the state close to that of D2, almost there, but not quite ready yet. But we intend to release the next version, which will be ready to use earlier than D2 anyway, I would say within a month.

As for plotting, there is a nice Qt library called Qwt. We can include bindings for it as a part of QtD, but it requires some work. But that's not necessary, you can use pure Qt to write your own widgets, you can even port Qwt code to D.

Thanks,

Eldar.




More information about the Digitalmars-d mailing list