anchor.diff:  (defclass canvas-pane (application-pane)
     ((first-point-x :initform nil)
      (first-point-y :initform nil)))
  +
  +(defclass clim-fig-move-event ()
  +  ((record :initarg :record :reader record :initform (error "clim-fig-move-event needs a record"))
  +   (delta-x :initarg :delta-x :reader delta-x :initform 0)
  +   (delta-y :initarg :delta-y :reader delta-y :initform 0)))
  +
  +(defmethod print-object ((object clim-fig-move-event) stream)
  +  (print-unreadable-object (object stream :type T)
  +   (format stream "moving ~a by (~D,~D)>"
  +           (record object) (delta-x object) (delta-y object))))
   
   (defun set-status-line (string)
     (setf (gadget-value (clim-fig-status *application-frame*))
  
positive.code:               (values x1 y1)
                (tracking-pointer (pane)
                  (:pointer-motion (&key window x y)
                                   (declare (ignore window))
                                   (set-status-line (format nil "~:(~A~) from (~D,~D) to (~D,~D)"
                                                            (slot-value *application-frame*
                                                                        'drawing-mode)
                                                            (round x1) (round y1)
                                                            (round x) (round y)))
                                   (with-output-recording-options (pane :record nil)
                                     (copy-from-pixmap canvas-pixmap 0 0 pixmap-width pixmap-height pane 0 0)
                                     (draw-figure pane
                                                  x1 y1 x y
                                                  :fastp t
  						:cp-x1 cp-x1 :cp-y1 cp-y1
  						:cp-x2 cp-x2 :cp-y2 cp-y2)))
  		(:pointer-button-release (&key event x y)
                                           (when (= (pointer-event-button event)
                                                    +pointer-left-button+)
                                             (return-from processor (values x y))))
                  (:pointer-button-press (&key event x y)
  				       (cond
  					 ((= (pointer-event-button event)
  					     +pointer-right-button+)
  					   (setf cp-x1 x cp-y1 y))
  					 ((= (pointer-event-button event)
  					     +pointer-middle-button+)
  					   (setf cp-x2 x cp-y2 y)))))))
        (set-status-line " ")
        (copy-from-pixmap canvas-pixmap 0 0 pixmap-width pixmap-height pane 0 0)
        (deallocate-pixmap canvas-pixmap)
        (let ((new-record (with-output-to-output-record (*standard-output*)
                            (draw-figure pane x1 y1 x y
  		                       :cp-x1 cp-x1 :cp-y1 cp-y1
  		                       :cp-x2 cp-x2 :cp-y2 cp-y2))))
          (push new-record (clim-fig-undo-list *application-frame*))
          (with-output-as-presentation (pane nil 'figure)
              (stream-add-output-record *standard-output* new-record))
          (replay new-record *standard-output* (bounding-rectangle new-record)))
        (setf (clim-fig-redo-list *application-frame*) nil))))
  
  (defun handle-move-object (pane figure first-point-x first-point-y)
    (tracking-pointer (pane)
      (:pointer-button-release (&key event x y)
        (when (= (pointer-event-button event) +pointer-right-button+)
          (multiple-value-bind (old-x old-y)
              (output-record-position figure)
            (setf (output-record-position figure)
                  (values (+ old-x (- x first-point-x))
                          (+ old-y (- y first-point-y)))))
          (window-refresh pane)
          (return-from handle-move-object)))))
  
  (defun clim-fig ()
    (run-frame-top-level (make-application-frame 'clim-fig)))
  
negative.code: 
     (undo :push-button
           :label "Undo"
           :active nil
           :activate-callback #'(lambda (x)
                                  (declare (ignore x))
                                  (com-undo)))
     (redo :push-button
           :label "Redo"
           :active nil
           :activate-callback #'(lambda (x)
                                  (declare (ignore x))
                                  (com-redo)))
     (clear :push-button
            :label "Clear"
            :active nil
            :activate-callback #'(lambda (x)
                                   (declare (ignore x))
                                   (com-clear)))
  