Simple windowed application: Difference between revisions
Content added Content deleted
m (→{{header|C}}: gtk+ gtk) |
(→Common Lisp: new example) |
||
Line 174:
}
</lang>
=={{header|Common Lisp}}==
{{libheader|CLIM}}
{{works with|McCLIM}}
<lang e>(defpackage #:rcswa
(:use #:clim #:clim-lisp))
(in-package #:rcswa)
(define-application-frame simple-windowed-application ()
((clicks :initform 0
:accessor clicks-of))
(:panes
(the-label :text-editor
:value "There have been no clicks yet."
:editable-p nil
:nlines 2
:ncolumns 60)
(the-button :push-button
:label "Click Me"
:activate-callback
(lambda (button)
(declare (ignore button))
(incf (clicks-of *application-frame*))
(setf (gadget-value (find-pane-named *application-frame* 'the-label))
(format nil "There have been ~R click~:P."
(clicks-of *application-frame*))))))
(:layouts (default
(vertically (:equalize-width nil :align-x :center)
the-label
(spacing (:thickness 10) the-button)))))
(run-frame-top-level (make-application-frame 'simple-windowed-application))</lang>
=={{header|D}}==
|