/[mcclim]/mcclim/input-editing-drei.lisp
ViewVC logotype

Diff of /mcclim/input-editing-drei.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by thenriksen, Wed Jan 30 21:21:43 2008 UTC revision 1.10 by thenriksen, Wed Jan 30 22:29:07 2008 UTC
# Line 124  activated with GESTURE")) Line 124  activated with GESTURE"))
124      (setf (stream-cursor-position real-stream)      (setf (stream-cursor-position real-stream)
125            (values 0 (nth-value 3 (input-editing-stream-bounding-rectangle stream))))))            (values 0 (nth-value 3 (input-editing-stream-bounding-rectangle stream))))))
126    
 (defgeneric invoke-with-input-editing  
     (stream continuation input-sensitizer initial-contents class))  
   
127  (defmethod invoke-with-input-editing :around ((stream extended-output-stream)  (defmethod invoke-with-input-editing :around ((stream extended-output-stream)
128                                                continuation                                                continuation
129                                                input-sensitizer                                                input-sensitizer
# Line 153  activated with GESTURE")) Line 150  activated with GESTURE"))
150                                        input-sensitizer                                        input-sensitizer
151                                        initial-contents                                        initial-contents
152                                        class)                                        class)
153    (let ((editing-stream (make-instance class    (let ((editing-stream (make-instance class :stream stream)))
154                           :stream stream)))      (unwind-protect (with-input-editing (editing-stream
155      (if (stringp initial-contents)                                           :input-sensitizer input-sensitizer
156          (replace-input editing-stream initial-contents)                                           :initial-contents initial-contents
157          (presentation-replace-input editing-stream                                           :class class)
158                                      (first initial-contents)                        (funcall continuation editing-stream))
                                     (second initial-contents)  
                                     (stream-default-view editing-stream)))  
     (unwind-protect  
          (loop  
           (block rescan  
             (handler-bind ((rescan-condition  
                             #'(lambda (c)  
                                 (declare (ignore c))  
                                 (reset-scan-pointer editing-stream)  
                                 (return-from rescan nil))))  
               (return-from invoke-with-input-editing  
                 (funcall continuation editing-stream)))))  
159        (finalize editing-stream input-sensitizer))))        (finalize editing-stream input-sensitizer))))
160    
161  (defmethod immediate-rescan ((stream standard-input-editing-stream))  (defmethod immediate-rescan ((stream standard-input-editing-stream))

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.5