home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / source / oodleutl.cpt / oodles-of-utils / objects-of-desire / room-with-a-view / WMgr-view.lisp < prev   
Encoding:
Text File  |  1992-06-15  |  1.1 KB  |  37 lines

  1. (in-package :oou)
  2. (oou-provide :WMgr-view)
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4. ;; WMgr-view.Lisp
  5. ;;
  6. ;; Copyright ⌐ 1991 Northwestern University Institute for the Learning Sciences
  7. ;; All Rights Reserved
  8. ;;
  9. ;; author: Michael S. Engber
  10. ;;
  11. ;; Provides a view based on the Window Manager port
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13.  
  14. (export '(*WMgr-view*))
  15.  
  16. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  17.  
  18. (defclass WMgr-view (simple-view) ())
  19.  
  20. (defmethod view-origin ((sv  WMgr-view)) (declare (ignore sv)) #@(0 0))
  21.  
  22. (defmethod view-clip-region ((sv WMgr-view))
  23.   (pref (wptr sv) :CGrafPort.visRgn))
  24.  
  25. (defmethod wptr ((sv WMgr-view))
  26.   (if (pointerp (slot-value sv 'wptr))
  27.     (slot-value sv 'wptr)
  28.     (setf (slot-value sv 'wptr)
  29.           (rlet ((pp :pointer))
  30.             (if *color-available*
  31.               (#_GetCWMgrPort pp)
  32.               (#_GetWMgrPort pp))
  33.             (%get-ptr pp)))))
  34.  
  35. (defvar *WMgr-view* (make-instance 'WMgr-view))
  36.  
  37. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;