1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
xgcl is an interface from Gnu Common Lisp to the X library, Xlib.
This software provides a lightweight and fairy easy-to-use way to:
* Draw diagrams from Lisp
* Create interactive graphical interfaces
* Make the interactive Lisp interfaces available via the Web
Beginning with release 2.6.8, xgcl is built into the make of GCL.
There is a "raw" interface to the Xlib, and an "easy-to-use"
interface built on top of it; we will only discuss the "easy-to-use"
version.
To use xgcl, start GCL and enter: (xgcl)
This will load xgcl and print a message inviting you to try (xgcl-demo).
(xgcl-demo) will create a small window and draw some examples in it.
You can try (wtestc), (wtestd), ... (wtestk) to try some other things.
The xgcl files are located in the directory xgcl-2/ relative to the
GCL directory.
The file gcl_dwtest.lsp contains the test examples; one way to
get started quickly is by using this file for examples.
There is also documentation:
dwdoc.tex
dwdoc.dvi
dwdoc.html http://www.cs.utexas.edu/users/novak/dwdoc.html
dwdoc.pdf
dwdoc.ps
To use the basic xgcl, you only need to invoke (xgcl).
To use some of the more advanced features such as menu-set, described
below, also load the file gcl_dwimportsb.lsp immediately after
invoking (xgcl), to import symbols.
Additional files that may be useful:
gcl_menu-set.lsp Source and some comments for menu-set
gcl_menu-settrans.lsp menu-set translated to Common Lisp
gcl_pcalc.lsp Pocket calculator example
gcl_draw-gates.lsp Draw boolean gate symbols
gcl_draw.lsp Interactive drawing program source
gcl_drawtrans.lsp Drawing program translated to Common Lisp
gcl_dwindow.lsp Easy-to-use interface source with comments
gcl_dwtrans.lsp Easy-to-use interface translated to Common Lisp
gcl_editors.lsp Editors for colors etc.
gcl_editorstrans.lsp Editors translated to Common Lisp
gcl_ice-cream.lsp Example created using Draw
lispserver.lsp Example web demo: a Lisp server
lispservertrans.lsp Lisp server translated to Common Lisp
Xakcl.paper Documentation on the "raw" Xlib interface
Xakcl.example.lsp some PRIMITIVE examples
This software provides a way to interface Lisp programs to the Web; see:
http://www.cs.utexas.edu/users/novak/dwindow.html
There are two ways to accomplish a Web interface.
The first uses X directly, and requires that the user have an X server;
this is reliable and fast, but it only works for the Linux/Mac/Cygwin
subset of the world. There can also be firewall issues.
The other option uses WeirdX, an X server written in Java.
The WeirdX interface is often slow, and sometimes doesn't work at all,
but when it works, it works with any web browser, even on Windows.
The WeirdX interface tends to leave "mouse droppings" on interactive
drawings.
There are numerous examples of these web interfaces at:
http://www.cs.utexas.edu/users/novak/
The Draw demo is a good one to try.
|