D "Swing"

Jacob Carlborg doob at me.com
Mon Dec 24 03:59:30 PST 2012


On 2012-12-23 22:03, Chris wrote:
> There exist some GUI Toolkits for D, however, they are more or less all
> based on bindings to native toolkits.
>
> Is anyone working on or are there plans to develop a pure Swing-like GUI
> Framework for D? While bindings have the advantage of using native
> widgets, they tend to lack behind as native widgets toolkits evolve and
> improve from version to version. Also, the full use of native features
> is not always easily accomplished (cf. SWT/JFace). A self-contained
> framework (like Swing) that could be extended as needed by a small set
> of native bindings - to implement os specific tasks - might be worth
> looking into.

Am one of those who prefer to use native widgets compared to something 
like GTK. But as you say they don't all provide all features. I think a 
good idea is the use a cross-platform GUI library for the common widgets 
that exists on all platforms, i.e. buttons and windows. There's not 
reason to use the native API for those. Then extend that with platform 
specif code using the native API, i.e. unified tool bar, sheets and so 
on, that is found on Mac OS X.

> D would have the benefit of hindsight in avoiding mistakes made in other
> GUI toolkits (such as Swing and SWT/JFace), and while this may sound
> like reinventing the wheel, catering for cross-platform bindings
> (Windows, Linux and OS X) is an endless race, and might not be real
> cross-platform after all, because either a whole platform is not (yet)
> catered for (cf. DWT), or some features are not yet implemented for one
> platform or another.

I agree that it would be really nice to have a cross-platform GUI 
framework written explicitly for D. But as you say that would be an 
enormous task to do.

I'm working on the Mac OS X port of DWT. It all compiles but a lot is 
not working. Some snippets are working:

https://github.com/d-widget-toolkit/dwt-mac

Any help is appreciated.

> Programmers have to make practical decisions and from my own experience
> I know that nothing is worse than betting on the wrong horse, and at
> present I could not decide on a GUI toolkit for D.
>
> Your comments and advice are more than welcome.


-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list