1XEROXLispLibraryPackagesIMAGEOBJECTSINTRODUCINGOBJECTSINTODOCUMENTSImageObjectsisageneral-purposeinterfacethatenablesyoutoincludegraphicsindocuments.Moregenerally,itenablesyoutoincludeonekindofimage,withitsownsemantics,layoutrules,andeditingparadigms,insideanotherkindofimage.Onesidecanbeimplementedbyimageuserswhowanttoincludeotherimages,andtheothersidecanbeimplementedbyimageproducers,whocreateimagesforuse,say,indocuments.Imagesareencapsulatedinsideauniformbarrier--theIMAGEOBJdatatype.Fromtheoutside,youcommunicatetotheimagebycallingastandardsetoffunctions.Forexample,callingonefunctiontellsyouhowbigtheimageis;callinganothercausestheimageobjecttobedisplayedwhereyoutellit,andsoon.AnyonewhowantstocreateimagesforgeneralusecanimplementhisownbrandofIMAGEOBJ.IMAGEOBJshavealreadybeenimplementedformenus,bitmaps,annotations,andgraphs.Similarly,anyimagingsystemthatwantstouseotherkindsofimageshasonlytoimplementtheconsumersideoftheinterfaceandneedn'tworryaboutinternaldetails.ImageObjectsforTEditallowsobjectstoexistinTEditdocumentsandbeeditedwiththeirowneditor.Italsoprovidesafacilityinwhichobjectscanbeshift-selected(or"copy-selected")betweenTEditandnon-TEditwindows.Forexample,theImageObjectsinterfaceallowsyoutocopy-selectgraphsfromaGrapherwindowintoaTEditwindow.Youcanalsoperformmorecomplicatedcopy-selections,suchascopy-selectingtextfromaDEditwindowintoaTEditwindowtopreserveitsstructure,whilecopy-selectingitintoatypescriptwindowtotreatitasatype-in.Thesourcewindow(wheretheobjectcomesfrom)doesnothavetoknowwhatsortofwindowthedestinationwindow(wheretheobjectisinserted)is,andthedestinationdoesnothavetoknowwheretheinsertioncomesfrom.Anewdatatype,IMAGEOBJ,containsthedataandtheproceduresnecessarytomanipulateanobjectthatistobepartofadocument.IMAGEOBJsarecreatedwiththefunctionIMAGEOBJCREATE.Anothernewdatatype,IMAGEFNS,isavectoroftheproceduresnecessarytodefinethebehaviorofatypeofIMAGEOBJ.Groupingtheoperationsinaseparatedatatypeallowsmultipleinstances q?` p` q?` g_p`+o5q`X+o5,45 f frafnGJjeJjJje_x_x^^^B^B]]a6]66]66]] \#6] 66] #tZ*t`i)1Z*Xs`#Xw#6X66X66X66XWW6W66W Uu`X @f!B*UqU**U Q*vQ*qQ*_$#")9,%14g6!;JAOB JJQ* NT  L!O&z)^,.L36$8;? BFJJN L^ $'&(-k0x3{6:84 @BFJJL JC!$H&*S-I/1 :s0EYGJJ= ;!1n@$(.U2S3% <(>D0FJJ; 9 9 5 B2"'&f()*.24{9AoG&JJ) & " # -0Y344&v&8D&q&8=@AA&v&E(&q&EJJ& $ - `h )*4,. 49;>?ABGJJ$ "l"&*.s146:> A&BHgJJ"l 9 (~ $&#,N.F1:3 ;`?AE:GJJ 9 - ? ? , 6'J%F'+$.0 8w?zAB HJJ, ,P[!X#9+,75:8d>VBE.JJ  P"$5%c)+p- 5BtDJJ  9e$%!$a +- .L497i:>DTJJ q?`2XEROXLispLibraryPackagesofthesametypeofimageobjecttoshareprocedurevectors.ThedataandprocedurefieldsofanIMAGEOBJhaveauniforminterfacethroughthefunctionIMAGEOBJPROP.IMAGEFNSarecreatedwiththefunctionIMAGEFNSCREATE.(IMAGEFNSCREATEDisplayFnImageBoxFnPutFnGetFnCopyFnButtonEventInFnCopyButtonEventInFnWhenMovedFnWhenInsertedFnWhenDeletedFnWhenCopiedFnWhenOperatedOnFnPrePrintFn)[Function]returnsanIMAGEFNSthatcontainsthefunctionsnecessarytodefinethebehaviorofanIMAGEOBJ.Theargumentsareasfollows:DisplayFnisappliedtotheargumentsImageObjandImageStream.ItiscalledtodisplaytheobjectatthecurrentpositiononImageStream.Thetypeofstreamindicateswhetherthedeviceisthedisplayorsomeotherimagestream.ImageBoxFnisappliedtotheargumentsImageObj,ImageStream,CurrentX,andRightMargin.Itreturnsthesizeoftheobjectasalist.Thelist'sfirstandsecondelementsarethewidthandheightoftheobjectimage;itsthirdandfourthelementsarethepositionoftheleftedgeandbaselineoftheimagerelativetowhereyouwanttopositionit.Forcharacters,thethirdelementisthedescent(heightofthedescender)andthefourthelementiszerobecauseTEditdoesn'tsupportleftkerning.TheImageBoxFnreturnstheRECORDIMAGEBOX,whichisadatastructurethatdescribestheimagelaiddownwhenanIMAGEOBJisdisplayedintermsofwidth,height,anddescenderheight.Itisprovidedwithfourfields:XSIZE,YSIZE,YDESC,andXKERN.TheImageBoxFnlooksatthetypeofthestreamtodeterminetheoutputdeviceiftheobject'ssizechangesfromdevicetodevice.(Forexample,abit-mapobjectmayspecifyascalefactorthatisignoredwhenthebitmapisdisplayedonthescreen.)TheCurrentXandRightMarginfieldsallowanobjecttotakeaccountofitsenvironmentwhendecidinghowbigitis.Ifthesefieldsarenotavailable,theyareNIL.PutFnisappliedtotheargumentsImageObjandFileStream.Itiscalledtosavetheobjectonafile.ItprintsadescriptiononFileStreamthat,whenreadbyGetFn(seebelow),regeneratestheTEditobject.(TEdittakescareofwritingoutthenameoftheGetFn.)GetFnisappliedtotheargumentsFileStreamandTextStream.Itiscalledwhentheobjectisencounteredonthefileduringinput.ItreadsthedescriptionthatwaswrittenbythePutFnandreturnsanIMAGEOBJ.CopyFnisappliedtotheargumentImageObjandreturnsacopyofImageObj.TheCopyFniscalledduringacopy-selectoperation.J gq`X+o5,45 f frafnGJjeJjJje ^q`X <y@ "&-33s6P9&),.39?B%FHgJJF2 Cb"pC @%v @%q@%&b&b@%v@%-u 6=@%q@%=?@%v@%@m II@%q@%IJJ@% =j%!%#V$&*3,/4:=i?CFlJJ= ; )e2v 5$_*u,/74678:>gA&FHfJJ; 9P)!#)*+M- 58<;ACBE\JKK9 7Ye^ !%=*, /1447Yv7Y867Yq7Y8=BE9JJ7Y 5&5&v5& 5&q5&/L%\-2 348V>AHfJJ5& 2pJK#%_+-k1e3 7I<>F JKK2 0 }+$).175:0:00v0 B60q0BFHfJJ0 .:H!&w*,.y36<}?DFEJJ. ,Z5 #)*p.j257= A CEIaJJ,Z *'Q*'v*'$b*'q*'$'{'{*'v*' /@*'q*'/3U68=5>AG^HJJ*' ' x z"#%&'+*.13 9<?KA' $vC$q$+9!f!f$v$'$q$'**$v$ 1$q$2a359<:>1@DFH%JKK$ !  @!v! ""!q!&.* -Z.!v!/J3%!q!36;e<6< DG&G&!v!Ji!q!JJ! >vRqc$!$.&*e+.V.Vv21q3  vnq"_v# )q*v--v 57q5679>B&DIbJJ  (E#$J%&*, 417:>@C]C]vGGqHJJ tweVVt vwq17+!!v'q("*/04V55v<~q<=0??vDqE8FJJ g (  Mgb q?``3XEROXLispLibraryPackagesButtonEventInFnisappliedtotheargumentsImageObj,WindowStream,Selection,RelX,RelY,Window,TextStream,andButton.ButtonEventInFniscalledwhenyoupressamousebuttoninsidetheobject.TheButtonEventInFndecideswhetherornottohandlethebutton,totrackthecursorinparallelwithmousemovement,andtoinvokeselectionsoreditssupportedbytheobject(butseeCopyButtonEventInFnbelow).IfButtonEventInFnreturnsNIL,TEdittreatsthebuttonpressasaselectionatitslevel.Notethatwhenthisfunctionisfirstcalled,abuttonisdown.TheButtonEventInFnshouldalsosupportthebutton-downprotocoltodescendinsideofanycompositeobjectswithinit.Inmostcases,theButtonEventInFnrelinquishescontrol(i.e.,RETURNs)whenthecursorleavesitsobject'sregion.CopyButtonEventInFnisappliedtotheargumentsImageObjandWindowStream.Itiscalledwhenyoubuttoninsideanobjectandholddownacopy(shift)key.ManyofthecommentsaboutButtonEventInFnapplyheretoo.Also,seethediscussionbelowaboutcopy-selectingobjects.WhenMovedFnisappliedtotheargumentsImageObj,TargetWindowStream,SourceTextStream,andTargetTextStream.ItprovideshooksbywhichtheobjectisnotifiedwhenTEditperformsanoperation(MOVEing)onthewholeobject.Itallowsobjectstohavesideeffects.WhenInsertedFnisappliedtotheargumentsImageObj,TargetWindowStream,SourceTextStream,andTargetTextStream.ItprovideshooksbywhichtheobjectisnotifiedwhenTEditperformsanoperation(INSERTing)onthewholeobject.Itallowsobjectstohavesideeffects.WhenDeletedFnisappliedtotheargumentsImageObj,TargetWindowStream,SourceTextStream,andTargetTextStream.ItprovideshooksbywhichtheobjectisnotifiedwhenTEditperformsanoperation(DELETEing)onthewholeobject.Itallowsobjectstohavesideeffects.WhenCopiedFnisappliedtotheargumentsImageObj,TargetWindowStream,SourceTextStream,andTargetTextStream.ItprovideshooksbywhichtheobjectisnotifiedwhenTEditperformsanoperation(COPYing)onthewholeobject.WhenCopiedFniscalledinadditionto(andafter)theCopyFnabove.Itallowsobjectstohavesideeffects.WhenOperatedOnFnisappliedtotheargumentsImageObj,WindowStream,HowOperatedOn,Selection,andTextStream.Itprovidesahookforeditoperations.ThevaluesofHowOperatedOnareSELECTED,DESELECTED,HIGHLIGHTED,andUNHILIGHTED.TheWhenOperatedOnFndiffersfromtheButtonEventInFnbecauseitiscalledwhenyouextendaselectionthroughtheobject.Thatis,theobjectistreatedintotoasaTEditcharacter.HIGHLIGHTEDreferstotheselectionbeinghighlightedonthescreen,andUNHIGHLIGHTEDmeansthatthehighlightingisbeingturnedoff.Mg gq`X+o5,45 f frafnGJjeJjJje ^v`X^q^k` >")^v^*H1y <" CGJJ^ \ ^\q\g\v\!\q\"L"#\v\ -\q\.'.0r48;@AjFKJJ\ ZkB{``ZkvZk%k%kZkqZk*0o2745,6;>CDHfJJZk X8 %(*|/ 57;.BDFxJJX8 VVvVwVqV %V%'c'cVvV1VqV27::VvV>7VqV>?tCFKJJV SxXO/ R#&*r-#24=7;<AeBG!GGJJS Qv+QqQ41#u% .H35;g?A*CJJQ Ol~&\!$ $ OlvOl.OlqOl/$ 7_JJA >qrr>v>>q>4|"g&(,/n34N5;>>>v>B0>q>BHJJ> <NH!&m&''u(,1369>?3?3< 8v tt8q8!@(|(|8v8/>JJ8 6rE6q64|"g&(,/n34N5;>>6v6B06q6BHJJ6 4y IC"'h'((p)-24}7:?@.@.4y 0v //0q0!"(i(i0v0/y>JJ0 .lqrr.lv.lE.lq.l4|"g&(,/n34N5;>>.lv.lB0.lq.lBHJJ.l ,9 #'((p().F3?488;.@.@@,9 (_v Z(_q(_vu!(S(S(_v(_/n>Jj(_q(_JJ(_ &,rr&,v&,&,q&,4|"g&(,/n34N5;>>&,v&,B0&,q&,BHJJ&, #f}"0&'l''#v# 22#q#24 8R9?A<DHfJJ# !vw!q!e; 4!%-(#-#-{-{! vqsF "%-)-)v4 ?Y JKK  XXq--v QQq$&)+. 6?69>??v JiqJJ Q +R.i 89:3=U=UvJiqJJ S.ZZSvS!!SqS'(*/36;:>AS IaJJ {a V q?`4XEROXLispLibraryPackagesPrePrintFnisappliedtotheargumentImageObj.Itiscalledtoconverttheobjectintosomethingthatcanbeprintedforinclusionindocuments.Itreturnsanobjectthatthereceivingwindowcanprint(usingeitherPRIN1orPRIN2,itschoice)toobtainacharacterrepresentationoftheobject.IfPrePrintFnisNIL,theOBJECTDATUMitselfisused.TEditusesthisfunctionwhenyouindicatethatyouwanttoprintthecharactersfromanobjectratherthantheobjectitself(presumablyusingPRIN1case).IDENTIFYINGLEGITIMATEGETFNSEachlegitimateGetFnneedstobeknowntothesystem,topreventvariousTrojan-horseproblemsandtoallowtheautomaticloadingofthesupportingcodeforinfrequentlyusedIMAGEOBJs.Tothisend,thereisagloballist,IMAGEOBJGETFNs,thatcontainsanentryforeachGetFn.TheexistenceoftheentrymarkstheGetFnaslegitimate;theentryitselfisapropertylist(PList),whichcanholdinformationabouttheGetFn(seethefollowingsection).NoactionneedstobetakenforGetFnsthatarecurrentlyinuse:thefunctionIMAGEFNSCREATEautomaticallyaddsitsGetFnargumenttothelist.However,packagesthatsupportobsoleteversionsofobjectsmayneedtoexplicitlyaddtheobsoleteGetFns.Forexample,TEditsupportsbit-mapIMAGEOBJs.Recently,achangewasmadeintheformatinwhichobjectsarestored;toretaincompatibilitywiththeoldobjectformat,therearenowtwoGetFns.ThecurrentGetFnisautomaticallyonthelist,courtesyofIMAGEFNSCREATE.However,thecodefilethatsupportstheoldbit-mapobjectscontainstheclause:(ADDVARS(IMAGEOBJGETFNS(OldGetFnName))),whichaddstheoldGetFntoIMAGEOBJGETFNS.ForagivenGetFn,theentryonIMAGEOBJGETFNSmaybeapropertylistofinformation.CurrentlytheonlypossiblepropertyisFILE.FILEisthenameofthefilethatcanbeLOADediftheGetFnisn'tdefined.ThisfilealsodefinesalltheotherfunctionsneededtosupportthatkindofIMAGEOBJ.Forexample,thebit-mapIMAGEOBJsimplementedbyTEditusetheGETFNBMOBJ.GETFN2.Itsentryis(BMOBJ.GETFN2FILEIMAGEOBJ),indicatingthatthesupportcodeforbit-mapimageobjectsresidesonthefileIMAGEOBJ,andthattheGetFnforthemisBMOBJ.GETFN2.ThismakesitpossibletohaveentriesforGetFnswhosesupportingcodeisn'tloaded--youmight,forinstance,haveyourinitfileaddentriestoIMAGEOBJGETFNSforthekindsofimageobjectsyoucommonlyuse.Thesystem'sdefaultreadingmethodwillautomaticallyloadthecodewhennecessary. gq`X+o5,45 f frafnGJjeJjJje ^v`X D^q^En($:$:^v^*^w`i^+X+X^q`X^+-!.249D5g "2 **+027+: <~BHJJ\x ZEER#(*.0.6 @aB DuI1IJJZE Xv DXqXE $ 'c(,,036x FJJU SS Ou 6 :#OqO$M$MOvO$MO Kq> KvKKqK_ "&(N*/16; D|JJK Iu.u<"p$)& .13 ;?~ HBHJJI GpQ,-s0z68<}>BBGvGGbGbGqGGJJG E_(  E_vE_$ZE_qE_$& -0 3789?AFJJE_ C,Fi YYC,vC,#4C,qC,#&(/ 4C, ?R 419, ` `?Rv?R$?Rq?R%\(>*02s58= JJ?R = =v==q=`&4(/*-.5K<(?UDJJ= :n4]7 '*,22:v:7y:q:8:@DJJ: 8  !'*./2#68_<ADGI,JJ8 6 e# %+*9.03666v6;6q6<:<?Dj6v6DIbIb6q6JJ6 4S dgZ!8" /4Sv4S0V0V4Sq4S017m9=^?BqHfJJ4S 2 TR"V#(o0S>R>R2 v2 I2 q2 JJ2 /!|/v//q/*/ ,7,v,@,q, ,/128m:<0 D.DJKK, ) E!J) &Z^"$*+.&.&&v&2&q&2k5}; ;v>@CHJJ& # #&)+82# 6o9$ -J/H/Hv2q358I=h HJJ e  H ( /25~:>A$FJJ {u #&)++v/q02*57 B Y[$g&&v*~q+0B 7;B>d FwJJ  9j!&`' 5709=M>CHJJ SNB %+803 <@JCFJJS  n m q?`5XEROXLispLibraryPackagesUSINGTHEBUILT-INSUPPORTFUNCTIONS(IMAGEFNSPX)[Function]returnsXifXisanIMAGEFNS,NILotherwise.(IMAGEOBJCREATEObjectDatumImageFns)[Function]returnsanIMAGEOBJthatcontainstheobjectdatumObjectDatumandtheoperationsvectorIMAGEFNS.ObjectDatumcanbearbitrarydata.(IMAGEOBJPX)[Function]returnsXifXisanIMAGEOBJ,NILotherwise.(IMAGEOBJPROPImageObjectPropertyNewValue)[Function]accessesandsetsthepropertiesofanIMAGEOBJ.ItcanbeusedonthesystempropertiesOBJECTDATUM,DISPLAYFN,IMAGEBOXFN,PUTFN,GETFN,COPYFN,BUTTONEVENTINFN,COPYBUTTONEVENTINFN,WHENOPERATEDONFN,andPREPRINTFN.Additionally,itcanbeusedtosavearbitrarypropertiesonanIMAGEOBJ.READINGANDWRITINGIMAGEOBJSONFILESIMAGEOBJscanbewrittenouttofilesusingHPRINTandreadbackusingREAD.Thismethodusesthefollowingfunctions,whichcanalsobeusedinusercode:(WRITEIMAGEOBJImageObjStream)[Function]PRIN2sacalltoREADIMAGEOBJ,thencallsthePUTFNforImageObjtowriteitontoStream.Duringinput,then,thecalltoREADIMAGEOBJisreadandevaluated;itinturnreadsbacktheobject'sdescription,usingtheappropriateGetFn.(READIMAGEOBJStreamGetFnNoError)[Function]readsanIMAGEOBJfromStream,startingatthecurrentfileposition.UsesthefunctionGetFnaftervalidatingit(andloadingsupportcode,ifnecessary).IftheGetFncan'tbevalidatedorisn'tdefined,READIMAGEOBJreturnsanIMAGEOBJthatisasafeencapsulation:Itdisplaysasarectanglethatsays,"UnknownIMAGEOBJType"andliststheGetFn'sname.However,ifNOERRORisnon-NIL,READIMAGEOBJreturnsNILifitcan'tsuccessfullyreadtheobject.n gq`X+o5,45 f frafnGJjeJjJje ^u`Xg!*f^q^**^ Z ttZvZZZqZC JjZ WwwWvW]WqWWvWWqWp^B! (YW SC--SCvSC !(#SCqSCC JjSC Oi$-&+z0$0$OivOi 9797OiqOi FmJJOi M6wM6vM6 5M6qM6@!.&* M6 I\ I\vI\gI\qI\C JjI\ EwwEvE]EqEEvEEqEp^O! (fE CO vvCOvCO %[COqCO%%COvCO, COqCOC JjCO ?u'9u# "G$0&p./_0369<->C JKK?u =B %  *L/5<JJ=B ;.1 ;G; DkEHJJ; 8 `"Z$H+8 5u%(H,X5q5,,5 1(  "M%j)p/25o9=AB]EJJ1( .<U "$')-.15P. + i+v+#!+q+C Jj+ 'AL$ # &|*,14141'Av'A:_'Aq'A:<@AErFX'Av'AJ'Aq'AJKK'A %ri +9,0F3A :a;=v@DHgJJ% "  &&"v"*" q kkvX %qC Jj ''v'!'q'"'v'""'q''),N1~39:>2@FF'v'Ji'q'JJ'  @$() 123V5Yv59q:=?EGJJ Z "2$k,D/W12i5 ?A AGIJJ g!W)c. 1]477v;q=HBBIJJ [G %|*`,./"2 :>@\D[ q?`6XEROXLispLibraryPackagesSelectinganencapsulatedIMAGEOBJwiththemousecausesanotherattempttoreadtheobjectfromthefile;thisissoyoucanloadanynecessarysupportcodeandthengettotheobject.NB:YoucannotsaveanencapsulatedIMAGEOBJonafilebecausethereisn'tenoughinformationtoallowcopyingthedescriptiontothenewfilefromtheoldone.COPY-SELECTINGBETWEENWINDOWSThegeneralideabehindcopyingbetweenwindowsisthatthesourcewindowbuildsanimageobjectofwhatyouhaveselectedandcallsasystemfunction.ThesystemfunctionfindsthecurrentTTYwindowandcallsafunctionassociatedwithitthatknowshowtoinsertimageobjects.Forinstance,BKSYSBUFisusedtocopystringsbyhavingthesystemfunctioncallBKSYSBUFonthePREPRINTFNoftheimageobjectifthetargetwindowdoesn'thaveaninsertfunction.Thefollowingnewfunctionshavebeenaddedtothesystemtoimplementcopy-selectingimageobjectsbetweenwindows.COPYBUTTONEVENTFN[Windowproperty]iscalled(ifitexists)whenabuttoneventoccursandacopykeyisdown.IfnoCOPYBUTTONEVENTFNexists,theBUTTONEVENTFNiscalled.COPYINSERTFN[Windowproperty]iscalledbyCOPYINSERT(seebelow)whenthesourcewindowwantstoinsertsomethingintothedestinationwindowasaresultofacopy-select.Itsargumentsaretheobjecttobeinsertedandthedestinationwindow.Theobjecttobeinsertedcanbeacharacterstring,anIMAGEOBJ,oralistofIMAGEOBJsandcharacterstrings.Asaconvention,COPYINSERTFNscallBKSYSBUFiftheobjecttheyaretoinsertisacharacterstring.ForTEditwindows,theCOPYINSERTFNisafunctionthatcallsTEDIT.INSERTifgivenastringandTEDIT.INSERT.OBJECTifgivenaTEditobject.(COPYINSERTImageObject)[Function]isappliedtotheargumentImageObject.ItinsertsImageObjectintothewindowthatcurrentlyhastheTTY.ItfirstfindsthewindowthathastheTTY(sayTTYWindow).IfTTYWindowhasaCOPYINSERTFN,thisiscalled,passingitImageObject.IfnoCOPYINSERTFNexistsandifImageObjectisanimageobject,theresultofcallingitsPREPRINTFNonitisBKSYSBUFed;otherwiseImageObjectisBKSYSBUFed.(ThedefaultBKSYSBUFusesPRINT2withareadtabletakenfromtheprocessassociatedwiththeTTYwindow.AwindowthatwishestousePRIN1oradifferentreadtablecanprovideitsownCOPYINSERTFNthatdoesthis.)ThustheD[ gq`X+o5,45 f frafnGJjeJjJje ^q`X &$'*u/24/9>@CFyJJ^ \s0qk6 #B&,2R58<%>@XBGHJJ\ Zk !)+-/^5<9489=B9GHCJJL5 J$V s#(*/(16^;>FaHgJJJ G 3! "($(-2698'<AG C" %*f,2.35< FJJC AJ7A =>ND<JjJj= :  "~',K15H7);[>@EFHJJ: 7 <" .0[47 4 >DJj4 0' D1 $T(/*/k48:>EHfJJ0' - 6 1  ! )*[,;3b55--84<>$@EHfHf--JJ- + ++++  u"$),F.;/_5::FHgJJ) '[cV{#(V(+;+;'[v'[.~'[q'[.5*7 BD E.JJ'[ %([ Wt ;!X%K( 78<==%(v%(A@A@%(q%(EFCFC%( !N NN!Nv!N s!Nq!NC JjJj!N t 2^tvt %rtqt%'-++tvt 4{4{tqt7W9? BH#JJt AJ D_+#r&),I/2FAvA2:AqA<#<>\>\AvAEAqAFIJJA  q}J!B&'v( 11q24*6 BFxIJJ v qn+w "$)+/2 ;=?SA JJ ;;v `q^ &2&*.6:9?BCGIJJ uM "% '*0T02"7k:I? @CmGIJJu B,$ &* 6:)>vBDHfJJB q?`7XEROXLispLibraryPackagesCOPYBUTTONEVENTFNforawindowallowsyoutoselectanobjectandthencallsCOPYINSERTonanimageobjectbuilt(viaIMAGEOBJCREATE)fromtheselectedobjectand13functionsthatdefineitsbehavior.EndNotes1.TEditcallstheIMAGEBOXFNonlyduringlineformatting,thencachestheimageboxas(IMAGEOBJPROPobj'BOUNDBOX).ThisavoidstheneedtocallIMAGEBOXFNwhenincompletepositionandmargininformationisavailable.2.WhentheButtonEventInFniscalled,thewindow'sclippingregionandoffsetshavebeenchangedsothatthelower-leftcorneroftheobject'simageisat(0,0),andonlytheobject'simagecanbechanged.Theselectionisavailableforchangingtofityourneeds;themousebuttonwentdownat(relX,relY)withintheobject'simage.YoucanaffecthowTEdittreatstheselectionbyreturningoneofseveralvalues.IfyoureturnNIL,TEditforgetsthatyouselectedanobject;ifyoureturntheatomDON'T,TEditdoesn'tpermittheselection;ifyoureturntheatomCHANGED,TEditupdatesthescreen.UseCHANGEDtosignalTEditthattheobjecthaschangedsizeorwillhavesideeffectsonotherpartsofthescreenimage.3.AswiththeButtonEventInFn,theoffsetandclippingregionsforthedisplayaresetsotheobject'simageisat(0,0),andonlythatimageareacanbemodified.JB gq`X+o5,45 f frafnGJjeJjJje ^q`X@$(+,-138':>/A JJ^ \ (,b/2P8+<?AGJJ\ ZkZk X8 X8 VuVqVV R+ R+vR+R+qR+` "m%*. 59>AHJJR+ O  #}#' +.13F5 ?Cb JJO M !w ''M I hv((IvIIqI n!"'*e16;>CG=JJI Gp C#%(-13R48;>AFJJG E^d9 J!'*0h236;> BG^JJE CRm qh%)*l-0477CRvCR;7CRqCR;?BHJJCR APF ' !$(++AvA/~/~AqA/47:b@'B)FHJJA >H#(M* 1F2v539z;?G'G'>v>JJ> A/C EfJJ6 4y'I #&1(*04yf q?` HELVETICA  HELVETICA  HELVETICA  HELVETICA  HELVETICA XLOGO  HELVETICA ~GACHA < n  (m/ s8=j/@>|oP3{ERIS}INTERMEZZO>LIBRARY>IMAGEOBJECTS.PRESS;1JAMES 4-Apr-85 14:36:38