(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP") (FILECREATED "18-Aug-88 16:25:21" {QV}<NOTECARDS>1.3LNEXT>PMIPATCH101.;2 6142 changes to%: (FNS NC.DeletedLinkImageBoxFn NC.DeletedLinkDisplayFn) (VARS PMIPATCH101COMS) previous date%: " 2-Aug-88 15:59:12" {QV}<NOTECARDS>1.3LNEXT>PMIPATCH101.;1) (* " Copyright (c) 1988 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT PMIPATCH101COMS) (RPAQQ PMIPATCH101COMS ( (* ;;; "New file") (DECLARE%: DONTCOPY (PROPS (PMIPATCH101 MAKEFILE-ENVIRONMENT) (PMIPATCH101 FILETYPE))) (* ;; "pmi 8/18/88: Now allows Deleted link icons to be hardcopied, instead of ignored.") (* ;; "Changed in NCLINKS") (FNS NC.DeletedLinkDisplayFn NC.DeletedLinkImageBoxFn))) (* ;;; "New file") (DECLARE%: DONTCOPY (PUTPROPS PMIPATCH101 MAKEFILE-ENVIRONMENT (:PACKAGE "INTERLISP" :READTABLE "INTERLISP")) (PUTPROPS PMIPATCH101 FILETYPE :BCOMPL) ) (* ;; "pmi 8/18/88: Now allows Deleted link icons to be hardcopied, instead of ignored.") (* ;; "Changed in NCLINKS") (DEFINEQ (NC.DeletedLinkDisplayFn [LAMBDA (ImageObj ImageStream ImageStreamType HostStream) (* ; "Edited 18-Aug-88 16:19 by pmi") (* ;; "pmi 8/18/88: Completely rewrote so that Deleted icons would hardcopy. They were being skipped entirely.") (DECLARE (GLOBALVARS NC.LinkIconSpaceInnerX NC.LinkIconSpaceOuterX NC.LinkIconSpaceInnerY NC.LinkIconSpaceOuterY NC.LinkIconFont)) (LET ((Scale (DSPSCALE NIL ImageStream)) (Font NC.LinkIconFont) ImageBox FontDescent ScaledSpaceOuterX ScaledSpaceOuterY Bottom Left BoxWidth BoxHeight Bitmap BitmapDSP) (* ;; "TEdit will call this function with ImageStreamType set. Here we take advantage of the fact that TEdit always recalculates the BOUNDBOX of an imageobj, so it is safe to use the value stored as the BOUNDBOX property. Otherwise, we must claculate it ourselves to be on the safe side.") (SETQ ImageBox (if ImageStreamType then (OR (IMAGEOBJPROP ImageObj 'BOUNDBOX) (NC.DeletedLinkImageBoxFn ImageObj ImageStream)) else (NC.DeletedLinkImageBoxFn ImageObj ImageStream))) (SETQ FontDescent (FONTDESCENT Font)) (SETQ ScaledSpaceOuterX (TIMES Scale NC.LinkIconSpaceOuterX)) (SETQ ScaledSpaceOuterY (TIMES Scale NC.LinkIconSpaceOuterY)) (SETQ Bottom (PLUS (DIFFERENCE (DSPYPOSITION NIL ImageStream) (fetch (IMAGEBOX YDESC) of ImageBox)) ScaledSpaceOuterY)) (SETQ Left (PLUS (DSPXPOSITION NIL ImageStream) ScaledSpaceOuterX)) (* ;; "BoxHeight and BoxWidth are used to make a bitmap of the deleted icon, and therefore shouldn't be scaled.") (SETQ BoxHeight (IPLUS NC.LinkIconSpaceInnerY NC.LinkIconSpaceInnerY (FONTASCENT Font) FontDescent)) (SETQ BoxWidth (IPLUS NC.LinkIconSpaceInnerX NC.LinkIconSpaceInnerX (STRINGWIDTH "Deleted" Font))) (SETQ Bitmap (BITMAPCREATE BoxWidth BoxHeight)) (SETQ BitmapDSP (DSPCREATE Bitmap)) (* ;; "Move to the appropriate place in the bitmap to print the text.") (DSPXOFFSET NC.LinkIconSpaceInnerX BitmapDSP) (DSPYOFFSET (PLUS NC.LinkIconSpaceInnerY FontDescent) BitmapDSP) (DSPFONT Font BitmapDSP) (PRIN1 "Deleted" BitmapDSP) (* ;; "Shade the bitmap so that the text is white and the background is black.") [BLTSHADE BLACKSHADE Bitmap NIL NIL NIL NIL (COND ((EQ (DSPOPERATION NIL ImageStream) 'ERASE) 'ERASE) (T 'INVERT] (* ;; "Send the deleted icon, in the form of a bitmap, to the image stream.") (BITBLT Bitmap 0 0 ImageStream Left Bottom]) (NC.DeletedLinkImageBoxFn [LAMBDA (ImageObj ImageStream CurrentX RightMargin) (* ; "Edited 18-Aug-88 16:18 by pmi") (* ;; "pmi 8/18/88: Completely rewrote so that Deleted icons would hardcopy. They were being skipped entirely.") (DECLARE (GLOBALVARS NC.LinkIconSpaceInnerX ScaledSpaceOuterX NC.LinkIconSpaceInnerY NC.LinkIconSpaceOuterY NC.LinkIconFont)) (LET ((Scale (DSPSCALE NIL ImageStream)) (Font NC.LinkIconFont)) (create IMAGEBOX XSIZE ← (TIMES Scale (PLUS NC.LinkIconSpaceInnerX NC.LinkIconSpaceInnerX NC.LinkIconSpaceOuterX NC.LinkIconSpaceOuterX (STRINGWIDTH "Deleted" Font))) YSIZE ← (TIMES Scale (PLUS NC.LinkIconSpaceInnerY NC.LinkIconSpaceInnerY NC.LinkIconSpaceOuterY NC.LinkIconSpaceOuterY (FONTASCENT Font) (FONTDESCENT Font))) YDESC ← (COND (RightMargin (* ;; "This is in a TEdittextstream .") (TIMES Scale (PLUS (FONTDESCENT Font) NC.LinkIconSpaceInnerY NC.LinkIconSpaceOuterY))) (T 0)) XKERN ← 0]) ) (PUTPROPS PMIPATCH101 COPYRIGHT ("Xerox Corporation" 1988)) (DECLARE%: DONTCOPY (FILEMAP (NIL (1340 6059 (NC.DeletedLinkDisplayFn 1350 . 4540) (NC.DeletedLinkImageBoxFn 4542 . 6057)) ))) STOP