Skip to content

Instantly share code, notes, and snippets.

@moratori
Created July 12, 2014 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moratori/7efd914aa8b2dba12f3d to your computer and use it in GitHub Desktop.
Save moratori/7efd914aa8b2dba12f3d to your computer and use it in GitHub Desktop.
clim app2
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
(in-package :app)
(define-application-frame main-frame ()
()
(:pointer-documentation t)
(:panes
(app :application :display-time nil :height 400 :width 600)
(int :interactor :height 200 :width 600))
(:layouts
(default (vertically () app int))))
(defun main ()
(run-frame-top-level
(make-application-frame
'main-frame)))
(define-main-frame-command (com-quit :name t) ()
(frame-exit *application-frame*))
(define-main-frame-command (com-parity :name t) ((number 'integer))
(format t "~A is a ~A~%" number
(if (oddp number) "odd" "even")))
(main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment