Created
July 12, 2014 14:43
-
-
Save moratori/381b249c02cfcf4171b1 to your computer and use it in GitHub Desktop.
clim app3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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