CLIM mail archive


Re: Presentation typep and subtypep

    Date: Thu, 29 Oct 1992 10:54 EST
    From: (Jeff Close)

    I'd desperately want that presentation-typep patch that Brian has
    talked about -- are you all referring to the
    identity-translator-applicable-p code that you included in your

Yes.  Here it is again, for CLIM 1.1.

(in-package :clim)
(defun identity-translator-applicable-p (presentation context-type)
  (let* ((type (presentation-type presentation))
	 (type-name (presentation-type-name type))
	 (object (presentation-object presentation)))
    (with-presentation-type-decoded (context-name context-parameters) context-type
      (if (eq type-name 'blank-area)
	  (eq context-name 'blank-area)
	;; Let MENU-ITEM-IDENTITY take care of pure menu items
	(unless (and (eq type-name 'menu-item)
		     (eq context-name 'menu-item))
	  ;; Either the types definitely match, or the types nominally match
	  ;; and the object must be validated.
	  (or (presentation-subtypep type context-type)
	      (and (not (null context-parameters))
		   (presentation-typep object context-type))))))))

Main Index | Thread Index