OS X GUI library

Gary Willoughby dev at nomad.so
Fri Feb 14 11:15:08 PST 2014


On Friday, 14 February 2014 at 18:17:15 UTC, Anton wrote:
>  From searching this forum I know that the question of which GUI
> library to use comes up every once in a while, but I don't want
> to bump old threads, especially since many of them seem to have
> strayed off into quasi-philosophical discussions of whatever (as
> is perfectly normal on this Internet).
>
> I am an OS X user and pretty much beginner in D who wants to
> write a simple application with a GUI. I know that GtkD is the
> most stable cross-platform GUI library out there, but for
> whatever reason after a full day of doing all sorts of things
> with it I can't get it to work on my Mac. I was going to post a
> question on the GtkD forums, but seeing that the latest post on
> there was from May of last year discouraged me from doing that.
>
> QtD seems to have been abandoned. Most other libraries either
> have little support for OS X (it seems that OS X users of D are
> practically non-existent, which I suppose is too bad for me), or
> have been left to wither away, too.
>
> Is there a more or less stable GUI library with decent support
> for OS X, with good documentation and/or examples *in D* (that
> is, not C, C++, or Java)?
>
> Thanks.

I'm working on a cross-platform GUI toolkit for D based on 
Tcl/TK.[1] So far it works nicely on Windows, Linux and MacOS. 
It's not very complete (only a few widgets implemented so far) 
but it shouldn't take more than a few months to finish. :)
Here's the repo:

https://github.com/nomad-software/tkd

The example can be built using dub:

     dub --config=example

dub will then pull in the following dependencies:

https://github.com/nomad-software/tcltk
https://github.com/nomad-software/x11

tcltk on Windows depends on ActiveTcl[2] being installed, but i'm 
going to compile my own DLLs to avoid this in future (Linux and 
Mac already have this installed). And x11 on MacOS depends on 
XQuartz[3] being installed which is unavoidable. (Linux uses this 
as default and on Windows the Win32 API is used instead.)

I decided to base it on Tcl/Tk purely because it's completely 
cross-platform, simple to use and learn. The downside is that the 
GUI libraries aren't that uber so don't expect to create the next 
Photoshop using it. The Tk widget library is complete though, so 
for simple GUI's it's brilliant. It's basically Python's 
Tkinter[4] ported to D.

I'm trying to get it done as fast as my girlfriend allows! ;D

[1]: http://www.tcl.tk/
[2]: http://www.activestate.com/activetcl
[3]: http://xquartz.macosforge.org/landing/
[4]: https://wiki.python.org/moin/TkInter


More information about the Digitalmars-d mailing list