initial import
Annotate for file src/painter.lisp
2009-04-05 tobias 1 (in-package :qt)
17:56:16 ' 2
' 3 (defmacro with-painter ((painter paint-device) &body body)
' 4 "Binds a PAINTER instance for PAINT-DEVICE to PAINTER
' 5 during the evaulation of BODY.
' 6
' 7 Makes sure the painter ends after BODY; thus prevening problems with
' 8 still active and not yet garbage collected painters."
' 9 `(let ((,painter (make-instance 'painter :args (list ,paint-device))))
' 10 (assert (cxx:is-active ,painter)
' 11 (,painter)
' 12 "Painter ~A for ~A is not active"
' 13 ,painter ,paint-device)
' 14 (unwind-protect
' 15 (progn ,@body)
' 16 (cxx:end ,painter))))