[Maxima] Maxima GUI in Common Lisp
ziga.lenarcic at gmail.com
Fri Jul 10 13:20:16 CDT 2009
> Unless all the CL implementations have open-GL bindings, this
> proposal will be vetoed by some people. I do not share this view
> that everything has to work everywhere this way.
> I personally have written programs that do things like input
> directed graphs and edit them with a mouse and keyboard, all in
> Lisp, with the potential to hook them up to Maxima. But I wrote
> using Allegro common lisp (free trial, not open source), on Windows.
> Getting a superb GUI on Windows for a particular Lisp would
> probably cover 90% of Maxima users or more. (According to Gartner
> group, 95% of all PCs run Windows, 3% MacOS, 2% Linux)
I think Allegro has some custom bindings to Win32 API to enable
working with native windows widgets in a simple manner...
Actually making a crossplatform GUI is not hard at all with OpenGL.
Cffi bindings work on all lisps worth mentioning (excluding GCL) and
allows calling arbitrary C libraries with the same code on all lisps.
Every lisp implementation usually has it's own FFI, but CFFI hides
the differences and makes them all look the same.
So cl-opengl bindings (which are written with CFFI) work on all lisps
and on all operating systems. OpenGL library allows you to talk
directly to graphics card hardware, so that means you have to basicly
draw everything (buttons, other widgets, text, expressions..) with
primitives (textured or not). Also the GUI logic has to be made by
hand (handling mouse clicks, keyboard input)...
From my experience with wxMaxima (which uses native widgets on
various platforms through wxWidgets), OpenGL is not a bad idea -
since the central element of Maxima's GUI is displaying 2d math
expressions and following some custom logic that does not translate
nicely into what Windows offer. Besides buttons, menu and dialogs,
the whole gui logic in wxMaxima (editing the document, drawing/
selecting expressions, copying, pasting..) is done 'by hand'. The
only 'tools' needed are keyboard input, mouse input, basic drawing
capabilities (lines, rectangles..) and text drawing... these can be
provided by the win32 api or X11 or OpenGL.. ofcourse OpenGL is the
most portable and probably the fastest.
Ofcourse, on the other hand, displaying a HTML in OpenGL is very
hard, while with win32 API there are a number of preprogramed
More information about the Maxima