home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / oodleutl.cpt / oodles-of-utils / patches / focus-view-patch.lisp < prev    next >
Encoding:
Text File  |  1992-04-24  |  835 b   |  25 lines

  1. (in-package :ccl)
  2.  
  3. (let ((*warn-if-redefine-kernel* nil))
  4.  
  5. (defmethod focus-view ((view simple-view) &optional font-view &aux wptr)
  6.   (without-interrupts
  7.    ;; reset the origin of the last wptr (this is a concession to gwviews).
  8.    ;; assumption is that they are all originally 0 based.
  9.    ;; doesn't hurt for windows.
  10.    ;(#_setorigin :long #@(0 0))
  11.    (if (setq wptr (wptr view))
  12.      (let* ((org (view-origin view)))
  13.        (set-gworld wptr)
  14.        (#_SetOrigin :long org)
  15.        (let ((vcr (view-clip-region view)))
  16.          (and vcr (#_SetClip :ptr vcr)))
  17.        (when font-view
  18.          (multiple-value-bind (ff ms) (view-font-codes font-view)
  19.            (when ff
  20.              (set-wptr-font-codes wptr ff ms))))
  21.        (setq *current-font-view* font-view)
  22.        (setq *current-view* view))
  23.      (focus-view nil font-view))))
  24.  
  25. )