Next: , Previous: , Up: CLIM—Common Lisp Interface Manager   [Contents][Index]


5.14.4.2 McCLIM

“An implementation of the Common Lisp Interface Manager, version II”

McCLIM is Mike McDonald’s Free and portable implementation of CLIM, the Common Lisp ueber-GUI toolkit.

The current release is 0.9.7 (Imbolc), released 2018-02-16. Using Quicklisp is a preferred way to run McCLIM.

McCLIM is available on Quicklisp. McCLIM can be installed by entering the following in your REPL:

(ql:quickload "mcclim")

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

(ql:quickload "clim-examples")   ; Load the system with examples.
(clim-demo:demodemo)             ; Run the example browser application.
  1. An Example
    1. Quickload McCLIM by running (ql:quickload "mcclim").
    2. Put the following code in a file example.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)))
    
    1. Load the file and run:
      (app:app-main)
      

Next: Franzinc clim2, Previous: CLIM II Specification, Up: CLIM—Common Lisp Interface Manager   [Contents][Index]