summaryrefslogtreecommitdiff
path: root/README.md
blob: ab6754b9461a5b528376c7531e471aad7fd724cd (plain)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<h1 align="center"> <br> 
<a href="https://common-lisp.net/project/mcclim/">
<img src="https://common-lisp.net/project/mcclim/img/mcclim.png"
alt="McCLIM">
</a> 
<br> McCLIM 0.9.7 "Imbolc"
<br> </h1>

McCLIM, an implementation of the "[Common Lisp Interface Manager CLIM
II Specification](http://bauhh.dyndns.org:8000/clim-spec/index.html)",
is a portable and high-level user interface management system toolkit
for Common Lisp. It has a powerful presentation model which allows us
to directly link the visual representation of an object to its
semantics. It has several high-level programming capabilities that
enable us to develp a user interface conviniently; including formatted
output, graphics, windowing and commands that are invoked by typing
text, keyboard shortcuts or clicking a mouse button.

McCLIM works with Allegro CL, Clozure CL, CLISP, CMUCL, Embeddable CL,
the Scieneer CL Common-lisp, SBCL and the LispWorks implementations.
Right now the only backend supported by McCLIM is CLX, which ties it
to the Xserver on the host system. Any platform capable of running 
Xserver may run McCLIM applications.

### Installing McCLIM
McCLIM is available on
[`Quicklisp`](https://www.quicklisp.org/beta/). Make sure you have
installed a supported Common Lisp implementation and `Quicklisp` is
configured correctly. Then, McCLIM can be installed by entering the 
following in your REPL:

```lisp
(ql:quickload "mcclim")
```

To see if McCLIM works on your host you may load the system with examples
and run the example browser application:

```lisp
(ql:quickload "clim-examples")   ; Load the system with examples.
(clim-demo:demodemo)             ; Run the example browser application.
```

### An Example
1) Quickload McCLIM by running `(ql:quickload "mcclim")`.
2) Put the following code in a file `example.lisp`.
```lisp
(in-package :common-lisp-user)

(defpackage "APP"
  (:use :clim :clim-lisp)
  (:export "APP-MAIN"))

(in-package :app)

;;; Define a application-frame (a.k.a. application window in traditional GUI's).

(define-application-frame superapp ()
  ()
  ;; :panes section describes different parts of the
  ;; application-frame. This application has only one pane.
  (:panes
   (int :interactor :height 400 :width 600))

  ;; :layouts section describes how the panes are layed out.
  ;; This application has one layout named "default" which has a single pane.
  (:layouts
   (default int)))

;;; Following function launches an instance of "superapp" application-frame.
(defun app-main ()
  (run-frame-top-level (make-application-frame 'superapp)))
```
3) Load the file and run:
```lisp
(app:app-main)
```
![example.lisp](https://common-lisp.net/project/mcclim/static/media/cap-superapp.png)

### Documentation
You can access the McCLIM manual draft
[PDF](https://common-lisp.net/project/mcclim/static/documents/mcclim.pdf)
if you want, but it's still a work in progress. Several other CLIM 2
resources are listed on [CLiki](http://www.cliki.net/CLIM) and McCLIM
[homepage](https://common-lisp.net/project/mcclim/).

### Subdirectory Overview
 - **Apps** - sample applicatioins. This includes: 
   1) Apps/Debugger - Peter Mechleborg's debugger (similar to Slime's).
   2) Apps/Functional-Geometry - Frank Buss and Rainer Joswig's functional
	   geometry package for drawing "Escher" tiles.
   3) Apps/Inspector - Robert Strandh's inspector (similar to
   slime's).
   4) Apps/Listener - Andy Hefner's Lisp Listener.
   5) Scigraph - BBN's graphing package.
 - **Documentation** - Contains available documentation such as
   Documentation for Libraries `Drei` and `ESA`, A Guided Tour of
   CLIM, Specification in LATEX source and Manual in LATEX and texinfo
   sources (For the time being, texinfo manual contains some
   additional Documentation not found in LATEX version).
 - **Examples** - Sources for the examples in `clim-demo` and some
   additional examples. These are of varying quality and style; many
   of them date from when McCLIM was quite incomplete.
 - **Extensions** - Contains several extensions to CLIM 2 spec, such
   as fonts, additional layouts, bezier, images etc. Most
   of them are loaded automatically with McCLIM.
 - **Libraries** - Contains `Drei` and `ESA` Libraries. See
   Documentation for details.   
   
### Important Links
 - [Homepage](https://common-lisp.net/project/mcclim/)
 - [Mailing List](https://mailman.common-lisp.net/listinfo/mcclim-devel)
 - [IRC](http://webchat.freenode.net/?channels=clim)
 - [Wiki](https://github.com/robert-strandh/McCLIM/wiki)