[mcclim-cvs] CVS mcclim/Drei

thenriksen thenriksen at common-lisp.net
Sun Feb 3 18:49:56 UTC 2008


Update of /project/mcclim/cvsroot/mcclim/Drei
In directory clnet:/tmp/cvs-serv1041/Drei

Modified Files:
	drei-redisplay.lisp 
Log Message:
Export OUTPUT-RECORD-BASELINE from CLIM-EXTENSIONS.

Use OUTPUT-RECORD-BASELINE to make Drei more inteligent.


--- /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp	2008/02/03 07:16:49	1.59
+++ /project/mcclim/cvsroot/mcclim/Drei/drei-redisplay.lisp	2008/02/03 18:49:56	1.60
@@ -730,6 +730,7 @@
 region, which will be presented with its appropriate presentation
 type (found via `presentation-type-of') to generate output."
   (let (output-record
+        baseline
 	(widths (make-array 2 :initial-contents (list 0 0)))
 	(parts (list 0 1)))
     #'(lambda (stream view stroke cursor-x cursor-y
@@ -741,7 +742,8 @@
             (when (or (null output-record) (stroke-modified stroke))
               (setf output-record
                     (with-output-to-output-record (stream)
-                      (present object (presentation-type-of object) :stream stream))))
+                      (present object (presentation-type-of object) :stream stream))
+                    baseline (clim-extensions:output-record-baseline output-record)))
             ;; You will not believe this! If `cursor-x' is 0, it seems
             ;; like the changing position is ignored. So add some
             ;; minuscule amount to it, and all will be well. 0.1
@@ -749,14 +751,14 @@
             (let ((width (bounding-rectangle-width output-record))
                   (height (bounding-rectangle-height output-record)))
               (setf (output-record-position output-record)
-                    (values (+ cursor-x 0.1) (- cursor-y height)))
+                    (values (+ cursor-x 0.1) (- cursor-y baseline)))
               (when draw
                 (replay output-record stream))
 	      (setf (aref widths 1) width)
               (record-stroke stroke parts widths
                              cursor-x (- cursor-y height)
                              (+ width cursor-x) cursor-y
-                             draw height)))))))
+                             draw baseline)))))))
 
 (defmethod pump-state-for-offset ((view drei-buffer-view) (offset integer))
   "For a `drei-buffer-view' a pump-state is merely an offset into




More information about the Mcclim-cvs mailing list