On 4/03/2015 7:43 a.m., Aram wrote:
Hi all
I've been thinking over a GUI framework for D for some time, and ended
up with idea expressed by Andrew Fedoniouk here:
http://www.digitalmars.com/d/archives/digitalmars/D/32633.html. That is,
having a separate drawing layer, and widgets built on top of it. But
since it has already been discussed 9 years ago, I wonder if such a
framework has ever been implemented.
In that duscussion many participants agreed that Qt would be a good
foundation, but had very restrictive license. Things have changed since
then, and Qt now is available under LGPL, which, to my undestanding,
makes it suitable for the purpose of standard GUI library (please
correct me if I am wrong on this). The license, of course, may change in
the future, preventing us from using their updates for our drawing
engine. But if we are able to start using the engine now, in the future
we can maintain the updates ourselves.
Now, how I envision the library's design:
The library will be mostly implemented in D, except for drawing engine
and event loop, which are system-dependent. Those two parts will be
extracted from Qt into a separate library which will be linked to by the
rest of framework either statically or dynamically. There will be
bindings for sending drawing instructions to drawing engine, as well as
for retrieving system and GUI events from event loop.
The system-independent part will mimic architecture of Qt. However, for
maximum flexibility and customizability, GUI will utilize QML+CSS
approach, and Qt's layout manager classes will be dropped completely.
Also there is no need to port classes that are available in D, such as
collections and strings.
If there is no standard GUI for D yet, and if LGPL license fits our
purpose, then I am looking for 2-3 Qt experts to join me and build the
framework.
Thanks,
Aram
Also, you can drop Qt almost completely for wanting its window creation
functionality.
http://github.com/Devisualization/window
I've got a bunch of other projects, image, model loading, scene graph.
Google Material design GUI toolkit but it is a LONG way off.
I also have started (locally) a new GUI toolkit that uses the Buffer2D
context instead of OpenGL.
And yes, Devisualization.Window works on the three big platforms.