www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - OS X GUI library

reply "Anton" <vizardx gmail.com> writes:
  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.
Feb 14 2014
next sibling parent reply "Anton" <vizardx gmail.com> writes:
Dammit, I meant to post this to D.learn. Oh well.
Feb 14 2014
parent reply "Craig Dillabaugh" <cdillaba cg.scs.carleton.ca> writes:
On Friday, 14 February 2014 at 18:32:07 UTC, Anton wrote:
 Dammit, I meant to post this to D.learn. Oh well.
Perhaps you could also look at DWT: https://github.com/d-widget-toolkit/dwt
Feb 14 2014
parent Jacob Carlborg <doob me.com> writes:
On 2014-02-14 19:37, Craig Dillabaugh wrote:

 Perhaps you could also look at DWT:

 https://github.com/d-widget-toolkit/dwt
Unfortunately it doesn't support OS X yet. I have an incomplete support written in D1 here: https://github.com/d-widget-toolkit/dwt-mac Also, it doesn't have much of documentation in D, besides the snippets. -- /Jacob Carlborg
Feb 14 2014
prev sibling next sibling parent reply Russel Winder <russel winder.org.uk> writes:
On Fri, 2014-02-14 at 18:17 +0000, Anton wrote:
[…]
 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.
GTK on anything other than Linux remains a real pain.
 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.
Qt is the most portable of frameworks other than wxWidgets. With Qt5 there is the whole QML thing which is really quite good. There was some effort to try and get QtD restarted, but it has stalled a bit. I have to admit I departed D + QtD for Go + goqml since the former needs effort and the latter has got it. However I have conflict with this as I much prefer D over Go.
 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)?
I suspect not. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Feb 14 2014
parent reply "Anton" <vizardx gmail.com> writes:
On Friday, 14 February 2014 at 18:50:21 UTC, Russel Winder wrote:
 I have to
 admit I departed D + QtD for Go + goqml since the former needs 
 effort
 and the latter has got it. However I have conflict with this as 
 I much
 prefer D over Go.
Yeah, I would hate to have to leave D for something like Go because D doesn't have a decent OS X GUI library. I'll take a look at the links everyone here has posted, thanks.
Feb 14 2014
parent reply "Nikos" <jna mail.gr> writes:
On Saturday, 15 February 2014 at 01:43:20 UTC, Anton wrote:
 On Friday, 14 February 2014 at 18:50:21 UTC, Russel Winder 
 wrote:
 I have to
 admit I departed D + QtD for Go + goqml since the former needs 
 effort
 and the latter has got it. However I have conflict with this 
 as I much
 prefer D over Go.
Yeah, I would hate to have to leave D for something like Go because D doesn't have a decent OS X GUI library. I'll take a look at the links everyone here has posted, thanks.
D is good language, but when I'm trying to write something more complex like GtkD virtual data table view, I realize that I can't do it in D. That is, if I want to learn D, I must learn C first. Which is nonsense. So, D needs a good GUI library written in D. And a good IDE too. VisualD is not good enough.
Mar 24 2014
parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 24 March 2014 at 16:07:33 UTC, Nikos wrote:
 On Saturday, 15 February 2014 at 01:43:20 UTC, Anton wrote:
 On Friday, 14 February 2014 at 18:50:21 UTC, Russel Winder 
 wrote:
 I have to
 admit I departed D + QtD for Go + goqml since the former 
 needs effort
 and the latter has got it. However I have conflict with this 
 as I much
 prefer D over Go.
Yeah, I would hate to have to leave D for something like Go because D doesn't have a decent OS X GUI library. I'll take a look at the links everyone here has posted, thanks.
D is good language, but when I'm trying to write something more complex like GtkD virtual data table view, I realize that I can't do it in D. That is, if I want to learn D, I must learn C first. Which is nonsense. So, D needs a good GUI library written in D. And a good IDE too. VisualD is not good enough.
I agree that these improvmements would be good. When you say "I can't do it in D" do you mean that you literally need to use C itself, or do you just mean using the C GTK API from D? Bear in mind that D includes many concepts and a lot of syntax C. In order to understand all of D, you will by definition end up learning a lot of C-like things, even if you don't use them very often in your real D code.
Mar 24 2014
prev sibling next sibling parent reply "Gary Willoughby" <dev nomad.so> writes:
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
Feb 14 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-02-14 20:15, Gary Willoughby wrote:

 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 would say that anything using X11 on OS X is unacceptable. -- /Jacob Carlborg
Feb 14 2014
next sibling parent Russel Winder <russel winder.org.uk> writes:
On Fri, 2014-02-14 at 23:58 +0100, Jacob Carlborg wrote:
 On 2014-02-14 20:15, Gary Willoughby wrote:
 
 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 would say that anything using X11 on OS X is unacceptable.
Agreed. All Python folk doing cross-platform work use Qt AFAIK Tkinter is ancient and shows it, despite the make over a few years back. There are some adherents (because it comes standard with all Python distributions), but most people treat it as unusable legacy. There is an attempt to create a replacement for the turtle package (*) based on direct OpenGL rendering, but sadly the energy generated during the sprint at PyConUK 2014 has petered out a bit and progress is now slow. (*) which is really the last useful thing based on Tkinter. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Feb 14 2014
prev sibling parent reply "Gary Willoughby" <dev nomad.so> writes:
On Friday, 14 February 2014 at 22:58:10 UTC, Jacob Carlborg wrote:
 On 2014-02-14 20:15, Gary Willoughby wrote:

 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 would say that anything using X11 on OS X is unacceptable.
Actually looking at this link I may be able to remove that dependency too. Which is nice. http://www.python.org/getit/mac/tcltk/
Feb 15 2014
parent reply Jacob Carlborg <doob me.com> writes:
On 2014-02-15 12:14, Gary Willoughby wrote:

 Actually looking at this link I may be able to remove that dependency
 too. Which is nice.
 http://www.python.org/getit/mac/tcltk/
Aqua Cocoa Tk is the way to go. -- /Jacob Carlborg
Feb 15 2014
parent "Gary Willoughby" <dev nomad.so> writes:
On Saturday, 15 February 2014 at 12:44:00 UTC, Jacob Carlborg 
wrote:
 On 2014-02-15 12:14, Gary Willoughby wrote:

 Actually looking at this link I may be able to remove that 
 dependency
 too. Which is nice.
 http://www.python.org/getit/mac/tcltk/
Aqua Cocoa Tk is the way to go.
Yep. It seems new versions of Tcl/Tk on Mac defaults to remove the dependency on x11. Which is awesome, no more x11 needed!
Feb 15 2014
prev sibling next sibling parent Xavier Bigand <flamaros.xavier gmail.com> writes:
Le 14/02/2014 19:17, Anton a écrit :
   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 am working on DQuick (like QtQuick but in D) with a friend, but it doesn't seems able to fit your needs as it's still a prototype. Development is really slow at this moment cause of to few time, but the great news is Bruno have some ideas to put property bindings on the D side too!!! https://github.com/D-Quick/DQuick
Feb 14 2014
prev sibling next sibling parent reply "Kapps" <opantm2+spam gmail.com> writes:
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.
A rather different approach would be to use something like Awesomium. I remember evilrat made bindings for it http://forum.dlang.org/thread/azrwqdorulvwhjcmmrxx forum.dlang.org#post-azrwqdorulvwhjcmmrxx:40forum.dlang.org I haven't used them yet though, so I'm unsure of how complete and such they are.
Feb 14 2014
parent "evilrat" <evilrat666 gmail.com> writes:
On Saturday, 15 February 2014 at 00:37:11 UTC, Kapps wrote:
 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.
A rather different approach would be to use something like Awesomium. I remember evilrat made bindings for it http://forum.dlang.org/thread/azrwqdorulvwhjcmmrxx forum.dlang.org#post-azrwqdorulvwhjcmmrxx:40forum.dlang.org I haven't used them yet though, so I'm unsure of how complete and such they are.
it was C++ wrapper, would work for minimal stuff but i won't recommend using awesomium at all. for me it looks almost dead now(both forums and update rate), and pretty much the same can be achieved with webkit. awesomium just adds offscreen rendering and JS event handling, but it is commercial software so for most people here it would be unacceptable.
Feb 14 2014
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2014-02-14 19:17, 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.
Do you need it to be cross-platform? Otherwise you could use Cocoa directly. Although it currently is a bit of a pain to do so. -- /Jacob Carlborg
Feb 15 2014
parent reply "Anton" <vizardx gmail.com> writes:
 Do you need it to be cross-platform? Otherwise you could use 
 Cocoa directly. Although it currently is a bit of a pain to do 
 so.
I don't care about cross-platform compatibility for now. I've found dstep, but haven't looked into it yet. It does look like it could be somewhat painful to use, though, especially considering that I'm not too comfortable with ObjC. I also don't really care for how pretty it looks at the moment. Right now it's for myself, so I just want something that lets me build a GUI in a relatively straightforward way, even if the result is a bit on the ugly side. Obviously, if what I'm doing goes anywhere, I will look into other options, but I need whatever I can get to work to start with.
Feb 15 2014
parent Jacob Carlborg <doob me.com> writes:
On 2014-02-15 18:26, Anton wrote:

 I don't care about cross-platform compatibility for now. I've found
 dstep, but haven't looked into it yet. It does look like it could be
 somewhat painful to use, though, especially considering that I'm not too
 comfortable with ObjC.
Yes, it's quite painful to use without language support.
 I also don't really care for how pretty it looks at the moment. Right
 now it's for myself, so I just want something that lets me build a GUI
 in a relatively straightforward way, even if the result is a bit on the
 ugly side. Obviously, if what I'm doing goes anywhere, I will look into
 other options, but I need whatever I can get to work to start with.
If you don't care how it looks then you could basically use any framework. Gtk+ seems to be best supported from D, but you already tried that ... -- /Jacob Carlborg
Feb 16 2014