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/381b249c02cfcf4171b1 to your computer and use it in GitHub Desktop.
Save moratori/381b249c02cfcf4171b1 to your computer and use it in GitHub Desktop.
clim app3
(in-package :cl-user)
(ql:quickload :clx)
(ql:quickload :mcclim)
(defpackage app
(:use :clim
:clim-lisp))
(in-package :app)
(define-application-frame main-frame ()
((val
:initform 0
:accessor val))
(:pointer-documentation t)
(:panes
(app
:application
:display-function 'disp
:height 400
:width 600)
(int :interactor :height 200 :width 600))
(:layouts
(default (vertically () app int))))
(defun disp (frame pane)
(format pane "current number = ~A~%" (val frame))
)
(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))
(with-accessors ((val val)) *application-frame*
(setf val number)
))
(main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment