I'm working on my first CL desktop application, something like a very tiny Maxima (or a very sophisticated calculator). I plan to have it multi-platform, but I'm mainly developing on OS X and Windows. As I want to have a good-looking user interface after having finished the application core, I wonder if there is a good CL binding for any modern toolkit around.
Qt5 does not seem to be a part of the Lisp world yet and it's unclear when that will happen, so I'm, more or less, stuck between two options:
- Tcl/Tk
The current Tk8.6 release does not seem to have wide support yet, I only found simple-tk to support it, but styling Tk's widgets feels weird to me, especially since its documentation doesn't even mention how I can do that.
- GTK+
It's good to know that there is working support for GTK+ 3, and while everything works like a charm on OS X, Windows has a "known issue" of freezing the complete environment when I try to move the window. The author seems to have disappeared by the end of 2014.
Can you help?
Re: Is there any decent GUI toolkit for MS Windows?
You could stick with Qt4 and use
CommonQt. The Qt5 support is obviously planned.
There exists
CAPI, it looks nice to me, but it's not open/free*.
*It should be noted that I don't mean exact definitions, but rather my feelings about that.
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of
CLHS (and the dark themed
version). Temporary mirrors of aferomentioned:
CLHS and a
dark version.
Re: Is there any decent GUI toolkit for MS Windows?
Having to stick with Qt4 for now implies a major rewrite "soon" (when Qt5 is integrated).
I could live with apprentice's premium if it wasn't so expensive just to start something.
*edit: Ah, I thought it was a part of the commercial LispWorks. I can live with unfree software, I don't plan to release mine as open source either. Does CAPI have features which TTk lacks?
Re: Is there any decent GUI toolkit for MS Windows?
I can't tell, I've only used CommonQt. But after one brief glimpse, the CAPI is lacking native dialogs (eg. file chooser) and simple-tk has it.
cl-2dsyntax is my attempt to create a Python-like reader. My mirror of
CLHS (and the dark themed
version). Temporary mirrors of aferomentioned:
CLHS and a
dark version.
Re: Is there any decent GUI toolkit for MS Windows?
Hmm, do you happen to know how to change the color of, let's say, the first two characters of a line in a text widget in simple-tk? It seems that this is everything I need to get started (for now). It's pretty easy in GTK.
Re: Is there any decent GUI toolkit for MS Windows?
you might also want to check qtools which seems to be fairly actively maintained and developed
https://shinmera.github.io/qtools/
This project builds on commonqt and tries to provide a layer on top of that.
Re: Is there any decent GUI toolkit for MS Windows?
The problem with qtools is the same; that its stack is not Qt5-ready yet.
Re: Is there any decent GUI toolkit for MS Windows?
^^
Fair enough. I still just use LTK (Tk based library) in a very rudimentary way so I am no GUI expert but GTK sounds like a good way to go. Good luck.
Re: Is there any decent GUI toolkit for MS Windows?
The correct question re: CAPI and TK/LTk is the following.
What is in CAPI that is not in TK/LTk?
BTW. With LW you have a choice of using the GTk-based version of CAPI.
Cheers
MA
Marco Antoniotti
Re: Is there any decent GUI toolkit for MS Windows?
Goheeca wrote:I can't tell, I've only used CommonQt. But after one brief glimpse, the CAPI is lacking native dialogs (eg. file chooser) and simple-tk has it.
CAPI has "native" dialogs (e.g., the File Chooser) everywhere. Look for CAPI:PROMPT-FOR-* (the * stands for pretty much everything).
Cheers
MA
Marco Antoniotti
Re: Is there any decent GUI toolkit for MS Windows?
Having to stick with Qt4 for now implies a major rewrite "soon" (when Qt5 is integrated).
This is a non issue: Qt5 didn't change the desktop widgets from Qt4, only very few functions are now named differently.
I must know because I ported a few apps from Qt4 to Qt5.
Just use CommonQt (or try EQL5 if you are a ECL user).
Paul
Re: Is there any decent GUI toolkit for MS Windows?
This could be my starting point with ECL, actually. Mind to elaborate?
Re: Is there any decent GUI toolkit for MS Windows?
ECL is obviously not the fastest Lisp (compared to SBCL), but compiled it's faster than I would have expected.
What I really like about ECL is that you can run e.g. EQL5 (ECL + Qt5) through a debugger (gdb in my case), so on crashes it's quite easy to find the offending code.
Even if there is some seg.fault in your Lisp/C integration, most of the time you can just :c (continue) from the break in the ECL debugger: it's not bringing down your whole application!
Since the EQL5 ECL/Qt5 integration is relatively low-level, it's quite fast (CommonQt with ECL is much slower; but CommonQt with SBCL is fast of course).
Additionally, EQL5 offers a QtWebkit/Lisp bridge, and better yet, a QML/Lisp bridge (which means, not only connecting QML and Qt signals and slots, which is possible in CommonQt, too), but convenient, direct(!) Lisp function calls from your QML code.
But that's just my small island where I live on (I mean both ECL and EQL5). Of course most people don't want to lock themselves to a single CL implementation...