Inter-OfficeMemorandumToCedarInterestDateDecember21,1982FromScottMcGregorLocationPaloAltoSubjectTheViewersWindowPackageOrganizationPARC/ISLXEROXFiledon:[Indigo]Documentation>ViewerDoc.TiogaandViewerDoc.Press.Documents:[Indigo]Viewers>Viewers.df,asexportedbytheCedarbootfile.TheViewersWindowPackageDisclaimerThisdocumentiscurrentlyinprogressandhenceisincomplete(aswitnessedbyanumberofsectionsnotyetwritten).ItreflectsthestateoftheViewerspackageforCedarversion4.0.Youmaybeabletofindamorerecentversionon[Indigo]Viewers>ViewerDoc.tioga.IntroductionTheViewersWindowPackageisthearbiteroftheuserinputanddisplayhardwareintheCedarprogrammingenvironment.Itprovidestheillusiontotheprogrammerthatthereisaprivatedisplay,mouseandkeyboardassociatedwitheachapplication,whileallowingtheusertosimultaneouslyinteractwithmanysuchapplications.Thebasicobjectmanipulatedbyclientprogramsandvisibletotheuseristheviewer;arectangularareawitharbitrarycontentswhichmaybemadevisibleontheuserdisplay.AviewertakesitsnameinthatitallowsthehumanusertoviewandinteractwiththedataassociatedwithaCedarapplication.Theunderlyingapplicationssoftwarehascompletecontroloverthedisplayedcontentsofaviewerandhasavailablearichuserinterfaceforuserinput.Thescreenpositionandsizeofaviewermaybemodifiedbytheuseraswellasunderprogramcontrol.ThisdocumentationiswrittenfortheprogrammerintendingtousetheViewersWindowPackagetobuildanewapplication.ItisorganisedalongthebroadareasoffunctionalitythattheViewerssystemprovidesandattemptstoexplaindesigntheoryandsomepragmatics.Forexamplesofusage,seethereferenceswithineachsection,andforexactdetailsconsulttheinterfacesdirectly.Onepointofnotation:usedthroughoutthisdocument,clientreferstoaprogramcallingtheViewersinterfaces,whereasuserreferstothehumaninvokingViewersoperationswiththemouseandpqîdïa¸ î"ã pî Mï]Üîdï]Üî|î-ï]Üî7fï]Üî> î@Gî MïZîdïZîãî-ïZî7fïZî:î MïV$îdïV$î<î sî&î-ïV$ î7fïV$rî{ïN”pî MïD±îëîdïD±ð,î6Åî9|î Mï@Õ îdï@Õð"î.ˆî06î5òî7îî:Mî>eîA–sîçï8�î!uî)©î23tî ®ï3™ pîï0Jî î]î­înî î%Rî'íî+Éî- î4î6î<3î>î? îD0îEÍîï.£î˜îöî'î³î†î!úî%@î'î)‚î.Íî4$î6vî:£î?€îBÁîEåîHþîï,üîî¶î¤îÎîaî…î#Mî%Sð.tî ®ï(Ù pîï%ŠîýîIîîî!Rî"Ôî%Iî)Ðî+ î.î1%î4æî7´î<}îBœîD`îFÖîï#ã î‰ îDî £î&î(bî-(î.¿î1 î8Ñî;‡î>ùî@MîA_îEãîï";î”îwî« î"Cî%‰î(æ î0|î4\î: î<–î?ºîA” îï ”îîîéî îïîæîXîq î _î"Zî&î,,î.ãî31î4ßî7>î:7î;¢uî>ïî>›ïpîA ïîB�ïîCÆ îïqî,îlî6îÉî#üî'$î):î-î1’î3½î6Aî9_î?7î@èîErîIîïÊîãî¦î‰îôî6îªî#gî&uuî(9ïÊî(ÔïÊpî+RïÊî+øïÊî.î3)î6Yî8Íî;ç îBhîE˜îFÖîï# îýîÕ îÆ î'\î,Öî/Kî53î9æî=î?`îEîï{îÄîëîMîîsî +î!Rî$î'î,¶î.ðî1çî6gî9<î=sîB²îEfîHîIÅîïÔîsîwîhîDî@î!Ÿî$˜î&Fî)4î*âî.åî4sîïYî< î·î6î ýî#Nî% î-¸î3öî5¸î8Aî:µî?ÿîE¢îï±îÈîsî¨î¡ î¦î!(î"Ÿî(ßî,©î/î3î6Ÿî8d î@tîCMîE¸îï îvîòî–î î!®î&nî*ªî.æî1Šî5 î<¤î?<îE&îFËîïcîŠî î»î'î!€î&�î)|î+âî/“î4 î8ðî;x îAÊîGêîï »îÑî­î¸î î$dî'(uî.ï »î.¬ï »pî1ãï »î2hï »î5Üî7®î8ûî>­îC5îE¸îï  îÖuî^ï îï pî‰ï î ï î!¤î#˜î&>î+,î1!î6� î=‘î@òîC—îH7ÿ TVm$TVm$ keyboard.ScreenLayoutTheUserDesktopFromtheuserpointofview,theblackandwhitescreenisdividedintofourareas.Thetopquarterinchofthedisplayisusedforthemessagesandasmallsetofsystemcommandbuttons.Thebottomofthedisplayisavariableheightareareservedfordisplayingicons,whicharesmallpictorialrepresentationsofnormalviewersmadeiconictoconservescreenspace.Theremainderofthedisplayisdividedintoleftandrightcolumnswithamoveablepartitionbetweenthem.Theusermayoptionallyattachacolordisplay,whichisequivalenttoanadditionalcolorcolumn.Unlikemanywindowpackages,viewersdonotnormallyoverlap,butinsteadspreadouttocoverasmuchaspossibleoftheavailablespaceontheuserdisplay.Withinacolumn,theheightofaparticularviewerisdeterminedbysatisfyinganumberofconstraintssetbytheViewerssystem,theimplementingprogramandtheuser.Viewersconstraintsincludebalancingofthecolumns;i.e.viewerswillbeexpandedsothattheentirecolumnareaisused,andthatnoviewerissmallerthantheheightrequiredforthecaptionandcommandmenuatthetopofeachviewer.Aclientprogrammayspecifyaheighthintintheviewerinstance'sopenHeightfield,whichwillbehonoredifitdoesn'tconflictwithotherconstraints.Inaddition,theusermaysetaheighthintthatoverridestheopenHeightvaluebyinvokingtheAdjustmenucommand.User-sethintsarediscardedwhenaviewerismadeiconic.Afinepoint:Thecurrentimplementationdoesnotdealparticularlywellwithovercontrainedcolumns;i.e.whenthesumoftheViewersenforcedheightsplustheclientopenHeighthintsexceedstheheightofthecolumn.Inordertosolvetheconflictingconstraints,eachviewerisgivenonenthofavailablecolumnheight.Ideally,Viewersshouldeitherpro-ratetheexistingspaceaccordingtotheclientrequestsorforcesomeoftheviewersintheoverconstrainedcolumntobecomeiconic.Internally,thetreeofviewersispartitionedintofoursubtrees,correspondingtostatic(typicallythoseviewerswithapermanent,fixedpositiononthescreen),theleftcolumn,therightcolumn,andthecolordisplay.Viewersinthestaticsubtreeincludeallicons,themessagewindowatthetopofthedisplay,aswellasthesystembuttonslocatedintheupperrighthandcorner.TheboundarybetweentheleftandrightcolumnsaswellastheheightofthecolumnsmaybesetbyinvokingtheAdjustmenucommandinanyviewerandthenslidingthemouseacrossthecolumnboundary.Thecolumnheightisquantizedtotheheightofeachrowoficons,permittinguptotworowsoficonsorasfewasnone.Iconsaredisplayedbehindthecolumns;inotherwords,viewersinacolumnoverlappingthedisplayofaniconwillhidetheiconuntiltheusershortensthecolumn,orremovesalltheviewersfromthatcolumn.MultipleDesktopsUserscansaveconfigurationsofviewersinaspecialviewercalledadesktop.Theusercanthenmovebackandforthbetweendifferentconfigurationsofviewerswithasimplecommand.Thereisalwaysonedesktopwhichrepresentstheconfigurationofviewerscurrentlyonthescreen.Thisdesktop(calledthecurrentdesktop)isindicatedonitsiconbyhavingitsnameinverted.Theusercan"fly"toanotherdesktopbymiddleclickingthedesktopiconwhileholdingdownthecontrolkey.Theviewersandiconsonthescreenwillbestuffedintothecurrentdesktop,tobereplacedbytheviewersandiconsinthenewdesktop.Thenewdesktopthenbecomescurrent.Togetanewdesktop,type"Desktop'name'"totheUserExec.Thiswillcreateaniconthatlookslikeaminaturescreen.Thefirstdesktopcreatedbecomesthecurrentone.Aseconddesktopmustbecreatedbeforeyoucanmovetoanewdesktop.Whenyouflytothenewdesktop,only2pîïb)tî ®ï^î(vîïZ·îçî8pîoïWõîlîóîîÚî»î"uî$üî(Îî+­î/•î3öî5‰î:¦î=¥î@ÑîEyîHyîoïVMîFîYîîwî -î!œî$Úî'î)}î/[î2î3Bî6ãî9î:¿î?=îE¡îoïT¦îFîîÇî%î×î!Bî"jî' î+Ùî.Ñî4Iî6… î=î@ñîDþîGPîoïRÿîÑîLî î$¿î)§î-fî1gî3î8¸î<ñîA€îDWîoïQWîLîÐî§î7îQî"Mî$çî'Âî+8î0Öî4î5cî;¼îA{îGîoïO°î=î-î' î“î"˜î#¸î'+î,,î00î1’ î86î9Ûî;Á îB/îE¢îoïM4îÿîÈîóî#î'øî)þî,rî2Aî7‚î:î>³îCîEŒîG:îoïK�îîóî¡îãî›îúî%µî)jî+pî-Ïî0Èî6Vî:ýî<&îAsîCÒîH îIÅîoïIæ î³î%îž î"õî$ÿ î+î,Lî1†î3M î:6î<`î>jî@×îFîoïH>îÝ îªî Gî# î%yî)jî.® î5—î:„î@ÇîBŽîDüîoïF—î¥î‡î,îî!Qî#î%Öî(0î,î1î3÷î5\î8êî;›î>cî@cîDÁîF'îoïDðî“îðî(îµî ðî#Mî(*î*ßî1>î5î6³î9î;ƒî=9î@hîE¤îG.îoïCHîäîÎîQîaî!�î$Kî%ßî(%î,p uî2€ïCHî31ïCHpî9ªïCHî:#ïCHî=îA îCžîEuîoïA¡îî‘î„î¤îôî#È î+éî-îî3êî6î9­î<æî?9î@˜îEîH îoï?úîªuîRï?úîï?úpîßï?úî �ï?úî#Ñî&î,uî.¶ï?úî/´ï?úpî3Fï?úî4oï?úî7oî?>îDêîH›îoï>RîšîOîyîÝî Iî$ îÐï;×îcî6îßî¾î!Ž î+sî.©î1%î4$ î;tî>hîA‰ îÐï:0î×î(îñîfî"tî$Aî&¶î,î1Æî6™î9§î<î?ð îG†îÐï8ˆîäîLîŽîPî ¸î&šî(qî,/î-æî1kî3Ó î:  îAÜîEîIƒîÐï6áîŽîDîÎî‘î!Vî&Uî+î0rî5²î:8î>.îCzîEäîÐï5:îÀî;î$î¾î#¹î)Lî+Kî/î2Ñî4Äî7^î<‚î>kîAîÐï3’îÅîsî‰îoï1 î#î“îgî1î"+î#¨ î*Àî-©î0¿î6� î?ˆuîAHï1îAÌï1pîDðï1îEjï1îoï/pîîîîM î#�î'î,Wî.bî0Æî5Õuî89ï/pî8œï/ppî:žï/pî;9ï/pî?ðuîBTï/pîBØï/ppîE¡ï/pîF<ï/pîoï-Èî+uîŽï-Èî)ï-Èpîúï-ÈîÁï-Èî�î"Ëî$}î&àî*nî/Gî4*î6î:î®î@]îD5 îoï$°îžîhî0î“îhî î íî"·î%tî'>î+Åî/‹î1úî86î<úî?vîE…îGOîoï#îèîåî§îäî í î(‹î*þî/Åî1’î3–î6®î9mî<œî?îB'îE‚îGõîoï!aîÝî=îŠîNî#»î%«î( î,ôî0[î3)vîïî§pîoïOîGîÕîÛ î!Ôî#�î({î*+î+Wî/Õî4<î86î9bî?dîB?îE;îGÈîoï¨î)îkîî‹î!õî'– î0‡î2;î7î:5î;Zî?ºîFìîoïîÑî,îÎîåî é î'aî)· î2 î3Ïî8®î>�î@}îBÓîGÔîoïYî¬î9î´î ™î&Pî'×î-çî0 î1ÿî5î77î;Îî=ÄîAŸîHîoï²î‚î(î´î|î¡î$Üî&òî+´î0ãî3]î8˜î;·î?…îDªîH�îoï î(î¤î‚îqî".î%¼î'Èî*.î.mî1î3î7¸î:•î<ûîAÊîGIîHþîoïcîôîðîOî8î ïî$xî&&î(…î+sî1qî4Iî77îÓîBîD]îIlîoïZ·îÍî0îšîlîpî Îî%î'…î+Þî0òî3Pî7Àî:jî=Ûî@9îEvîoïYîéîuî«î%îZî" î%ðî*Dî,¾î1=î3î6“î8\î;îAîFXîHþîoïWiî°î{îÁîÿîî#Îî&Jî*Ìî-Ÿî2Ò îî@›îF¶îoïUÁî‰î5îêîIî®î!\î#Mî(ýî,dî.ÄîoïSFî�îcî[ îäî"Oî%½î($î,dî/›î0Ì î7 î<‰î@îBiîG’îoïQŸî2î“îúî´ î"\ î+Åî-uî/×î3ºî5vî7×î=Ùî@´îEîGÈîoïO÷î§îîtî �î#¡î&/î+î,Gî0¯î4î5Fî:jîšî=îvîêî)î˜î#9î$žî'8î)Nî+!î.KîC¸îGDîoï<òîõîUîKî«î"Üî%î'‡î+Íî-ˆî1vî7kî8¡î>=îBÆîEìîI@îoï;Kî…î†î£î"¶î'¿î+î-Žî1æî3gî4Üî8Ýî;\î>uî@CîB¶îD+îHþîoï9¤vîï6Tpîoï3’îCîòî¨îÎî.î#+î$àî'ˆî+Ô î3 î5Þî9yî?RîD.îFŠîoï1ëuî•ï1ëîEï1ëpî¸ï1ëîŽï1ë î Þî"‘î&@î(wî*bî/¿î3cî7Ùî<‘î>êîC¡îE‹îoï0Dîùîžî“îâîŸî ¸î$Rî)!î+…î- î/]î2î4Àî6 î;óî?ÄîCÀîFîoï.œ î îî¤î"Èî$xî(Pî,Vî/%î2»î8�î=Dî?›uîC÷ï.œîD’ï.œpîG�ï.œîHCï.œîoï,õî}îéî¤îRîB î%Tî'’î,Dî-ýî/Øîoï*yîìîZîØî î½î ðî%jî(*î)^î,Úî1¡î4Kî6 î:%î=2xî?,ï*yî@ï*ypîA8ï*yîB«ï*yîGêîoï(Òîj îYî²î!î#Àî).î+jî/î4^î6î:.î=&îAãîC¥îFîoï'+î&îî³î¤î Ùî#�î%–î)Lî.Åî0sî2Òî6qî;� îoï$¯îJ î•îÕî7î#eî&î)â î0Eî2›î9 î<(î@ÓîB„îDæîoï#îœî\î9î#î$™î&øî+]î-Óî/Ùî4�î5Øî7Dî;Êî=xuî>¢ï#î?ï#î@øîDpîH7ï#îHÜï#îoï!`îGî" îhî ¹î#Òî(xî*$î,�î0Iî3™î7î;bî=î?vîDÿîFŠîoï¹îlîàî¢îTî'î$Lî( î.2î/Ùî3ßî6Æî8î:¹î<¢îA{îEäîoïî"î îî„tî ®ïïî(pîïŸîíî)îqî¤î" î)òî+§î/¯uî0ßïŸî1zïŸpî4 ïŸî4ÜïŸî5ßî:¢î<˜îBpîD/îHCîïøîµîîIî î$šî&.î*šî-Óî/Fî0xî4Ïî7¥îXîDlîGîï©î} îÞî Zî$ãî&î*uî-¦î/åî1×î3’î5óî;,î=åîC(îDíîG½îïîbî"îRî8î£î!£î$ î'Œî*Úî,Žî1 î5¨î9éî=šîAîCmîFmîI*îï[îï ßî›îî0îî§î#Ñî%î24î7—î9÷î@ wî)Èïÿ YTVm$›flavor:ViewerClasses.ViewerFlavor_NIL;Eachclasshasauniqueatomwhichassociatesanamewiththeclassrecord.init:ViewerClasses.InitProc_NIL;Duringthecreationofanewviewer,thisprocedureiscalledinordertopermittheclienttoinitialiseprivatedatastructures.Theviewerwillnotappearonthescreenuntiltheprocedurereturns.Classimplementorsshouldusethisproceduretoinsertmenuentriesandaddsub-viewers.paint:ViewerClasses.PaintProc_NIL;TheViewerspackageassumesthatthebitmapiswrite-onlyandthattheclientcanreconstructitsscreenimageondemand.Whenevertheinformationonthescreenforaparticularviewerbecomesinvalid,thePaintProcwillbecalledbythesystemtorestorethecorrectdisplay.ThePaintProcispassedagraphicscontextclippedtotheboundsoftheviewer,awhatChangedparameterwhichtheclientmayusetoencodeprivateinformationaboutwhattoupdate,andaclearbooleanthatindicateswhethertheviewerhasbeenwhitenedbeforethepaintcall.Thereisacompletesectiononpaintingelsewhereinthisdocument.destroy:ViewerClasses.DestroyProc_NIL;TheCedargarbagecollectornormallydeallocatesstorageassociatedwithaviewerwhenitisdestroyed,butsometimesaclientfindsitconvenientornecessarytofreeresourcesornotethedestructionofaviewerinstanceexplicitly.Thisprocedureiscalledjustbeforetheviewerisremovedfromtheviewertree.notify:ViewerClasses.NotifyProc_NIL;Mouseandkeyboardinputfromtheuseriscommunicatedtoaviewerasalistofresultsdescribedinatiptable(seethetipTablefieldbelow).Thisprocedurewillbecalledwheneveraninputeventforaparticularviewerisreceived.tipTable:TIPUser.TIPTable_NIL;ATIPTableisalistofproductions,mappingmouseandkeyboardoperationsintoalistofresultsmeaningfultotheclient.PleaseseethesectiononMouseandKeyboardinputformoreinformation.modify:ViewerClasses.ModifyProc_NIL;Keyboardinputdependsonaviewerowningtheinputfocusdescribedlater.Thisprocedureiscalledwheneveraviewerlosesoracquirestheinputfocusinordertoprovidefeedback,suchasablinkingcaret.set:ViewerClasses.SetProc_NIL;Someviewerclasseschoosetoimplementthisinterfaceasawayofsettingthecontentsorstateofaviewer.Thedataandopargumentsmaybeinterpretedanywaytheclientchoosesandthefinaliseparameterdetermineswhetherthenewinformationshouldbereflectedonthedisplay.Tioga,Buttons,andLabelsarethreeviewerclasseswhichimplementthisinterfacetosetthetextcontentswhenpassedaROPEorREFTEXT.get:ViewerClasses.GetProc_NIL;Aviewerclassmayimplementthisinterfaceasameansofallowingaclienttoquerythecontentsorstateofaviewer.LiketheSetProc,theopparametermaybeinterpretedbytheclassimplementorastheyseefit.scroll:ViewerClasses.ScrollProc_NIL;TheScrollProciscalledwithanoperationparameter,correspondingtoscrollingup,scrolling4pîoïb)îßî%.xî&»ïb)î'¤ïb)pî(Çïb)îÐï_®îCîsîèîîºî#8î'F î-oî.™î2Yî5tî7Óî;îoï]2îhî sxî"ï]2î"éï]2pî$ ï]2îÐïZ·î¬î îvîBî €î#�î(Rî+î1žî3î7(î8êî<²î>tîBùîElîI@îÐïY îLîíîö î%î'÷î,_î/î1ˆî6î8î:€î>½îBîDkîÐïWhî$î î$&î)î+Ýî.áî5Çî7Øî<î@IîEîH7îÐïUÁ îoïSFîrî"oxî#üïSFî$åïSFpî&ïSFîÐïPÊî¯îíî6î#Šî&_î(Æî-�î.ó î5‡î8Fî;î=‚îAIîCÛ îÐïO#î¶îûîî%î#eî*î,s î4 î6î8†î<Êî?î@H îFŠîÐïM|îkîTî´î#ôî& î(‘î,ˆî.„î0äî5`î7î;•î=õîB‡îHîÐïKÔî7îËîXî©î$?î);î.Cî0î2 î7¦î9‡î<î@òîBD îÐïJ-îMîVî°î!kî$jî&Úî(„î-1î1É î9Nî=+î@ƒîB,îGîIÅîÐïH†îîKîî!½î'î)^î-¼î0+î3�î9nî=·î@îC“îFìîÐïFÞî<îeîMîêîðî%Tî+žî-Lî/îîoïDcî¼î%Rxî&ßïDcî'ÇïDcpî(êïDcîÐïAèîÅîûî9î"æî(Ô î/âî4± î;;î>sî?»îD=îHîIƒîÐï@@ îiîëî ¥î!Ðî%‘î)î*\ î1Yî3î92î:âî=°îC®îEsîH�îÐï>™ îîÛîîžî% î+ýî/1î5Îî7Tî;eî>!îBŠîEîIƒîÐï<òî€îçîFî «îoï:vîêî#²xî%?ï:vî&'ï:vpî'Jï:vîÐï7ûî�î{îºî"œî&:î(Ðî,î-£ î7î8ùî:Zî>õî@ÚîB;îD¯îFŸîÐï6Tîúî¨îÑîîîVî""î$�î)úî-*î2‹î5¥î<(î>Óî@ÃîDºîÐï4¬îÀîkî î]î‡ î#½î(!î)�îoï21îbî âxî"oï21î#Wï21pî$zï21îÐï/¶î}î^î_îëî5î“î l î(qî.Lî2Çî5žî;Ç îB•îE�îF×îI5îÐï.î îDîçî :î$¾î(ßî+'î-zî2 î4î8î;*îA‹îE*îG[îÐï,g îoï)ìî¦î$ùxî&†ï)ìî'nï)ìpî(‘ï)ìîÐï'pî6îÙî @î"?î#aî'¾î,•uî.íï'pî/Pï'pî2hpî5àï'pî6§ï'pî<î?õîCîIƒîÐï%ÉîÕîîNî Àî$î%ðî+aî-Îî1†î53î6ïî:±î?î@—îFîG½îÐïƒîŸîÞîJuî8ïƒîèïƒpîSïƒîùïƒuî" ïƒî"Ñïƒpî$ïƒî$Àïƒî*ßî-ùî/ÿ î7'î9Þî<Ëî?@îCîH7îÐïÜuînïÜîÝïÜpîWïÜîïÜî î&]î+éî.‡î1³ î9|î>6î@fîFJîH�îÐï5îiî¦î î"Öî'Aî)™î-(î1’î5ñî:î@îîC•îI@îÐï�îíîLîîsî!(î%Žxî&·ï�î'‹ï�pî*2ï�î*îï�xî+öï�î,Êï�î.¦pî1¦ï�îoïî1î ]xî!êïî"Óïpî#öïîÐï—î@î‰î�î…î#Nî%Óî+]î,ïî-üî2$î3Áî9(î:5î=Ùî?lîC<îEîÐïïîÌî5î&îˆî9î"¡î%8î*Ôuî-lïïî.ïïpî/‰ïïî0Pïïî6Cî9î;¨ îBóîE&îG¾îÐïH îõî£î³î îoï Íî’î"èxî$tï Íî%]ï Ípî&€ï ÍîÐï QîÀ îqîõî î#8î%Aî+ƒ î2v î;…î=LîBèîEkwî)Èïö TVm$ÏîÀ îqîõî î#8î%Aî+ƒ î2v î;…î=LîBèîEkîÐï Üî#îŸî~îØ î%>î)î*áîdown,thumbingtoaparticularplaceinthedatastructure,orqueryingtheclientastoitscurrentscrollposition.Forthescrollupandscrolldownoperations,theamountpassedistheuser'srequest,measuredinpoints.Itisuptotheclienttointerprettheamountwithrespecttotheirinternaldatastructures,adjusttheirdisplaydatastructuresandrequestrepaint.Forthethumboperation,theamountpassedisthepercentagetoscrollintotheviewer;i.e.47wouldmeantostartthetopofthedisplay47%intothedatadisplayed,asinterpretedbytheclient.Thequeryoperationrequeststhattheclientreturntwonumbersforfeedbacktotheuser,correspondingtothepercentageofthedatadisplayedatthetopandbottomoftheviewer;i.e.iftheentiredatastructurewerevisible,theclientwouldreturn0and100.Iftheclientcannotreasonablycomputethequerypercentagesorchoosesnotto,thenitmaysimplyreturnfromtheScrollProcwhenthisoperationisencountered.menu:Menus.Menu_NIL;Aviewermayoptionallydisplayamenuofcommandsunderneaththecaption.SeethesectiononMenusformoreinformation.icon:Icons.IconFlavor_document;Whenaviewerisiconic,theclientPaintProcisinterceptedandisinsteaddisplayedasasmallpicture,determinedbytheIconFlavorsethere.TheIconsinterfacehasanenumeratedsetavailable,aswellasaninterfacetocreatenewicons.TheclientmayalsopainttheirowniconusingtheCedarGraphicsfacilitiesbysettingtheiconFlavortoprivate,whichwillcausethepaintingoficonicviewerstonolongerbeintercepted.IftheiconFlavorisprivate,thenitisuptotheclienttonoticethattheyareiconicandpaintappropriately.cursor:Cursors.CursorType_textPointer;Viewerswilldisplayacursorwhenmovedoveraviewer,determinedbythevaluehere.TheCursorsinterfacehasanenumeratedsetavailable,aswellasaninterfacetocreatenewcursors.clipChildren:BOOL_FALSE;Thenormalpaintorderforviewerswithembeddedchildrenistheparentfirstandthenthechildren.Thereisnormallynoprotectionfromtheparentpaintingoverachildunlessthisbitissettotrue,inwhichcaseallchildviewerswillbeclipped(excluded)fromthecontextsuppliedtotheparent.Thisfieldisnotdefaultedtotrue,sinceitmakesnormalCedarGraphicsoperationscomputationallyexpensivefortheparent.Thefollowingviewerclassfieldsareeitherrarelyusedornotcurrentlyimplemented.Theyaredocumentedhereforcompleteness:save:ViewerClasses.SaveProc_NIL;TheSaveProciscalledwhentheclientisexpectedtowritetheprivatedatastructuretoadiskfile.ThisiscurrentlyonlyusedbyTioga.copy:ViewerClasses.CopyProc_NIL;ThedataassociatedwithaparticularviewerisprivatetotheclassimplementationandhencetheViewerspackagedoesn'tknowhowtoreplicatethestructure.Thisprocedurepassesanoldviewerandanewviewerandrequeststhatthedataforthenewviewerbemadethesameastheold.caption:ViewerClasses.CaptionProc_NIL;Thecaptionnormallydisplaysthenameandstatusoftheviewer.Ifthisisnotacceptabletoaparticularclient,thentheymayimplementthisprocedureandpaintthecaptionthemselves.Thegraphicscontextpassedisclippedtothecaptionarea.coordSys:ViewerClasses.CoordSys_bottom;5pîÐïb)î#îŸî~îØ î%>î)î*áî-qî0¦ î6ëî8àî>ÖîAfîEWîG5îIîÐï`‚î™îBî_î" î$iî(î*$î,Ûî0„î4N î;Tî=³îB¾îG#îH�îÐï^Úî´îïî 2î!ïî' î(�î* î,+î-èî0Vî4$î5áî;•î>îCîFFîÐï]3î˜îøî'îE î$øî)î,î1Kî4i î:Ãî=”îB‚îHCîÐï[Œîîs îÝî &î%î)hî*½î- î3Ôî5kî8ýî;¾î>îBÍîDòîFÀîÐïYäî¡îaîƒîôî{î Eî"¶î'{î*zî-dî/Õî2ë î9tî;4 îBXîDeîF×îÐïX=îÞîî_î#íî&ñî)‡î-|î1áî4Ãî:©î=îC$îEîG�îÐïV– îÄîpîÍ î$°î&gî(Äî+Æî1ãî3yî5Õî8Hî:ýî?ÄîAzîC×îH²îÐïTîî-î‰îrîsî!,î$zî)î+yî/6î3aî7Œî8½î;qî>Ûî@ZîB¶îFrîÐïSG î¾îxîëî#ì î+jî-Bî2aî4êî7î:?î;©î>ÁîCEîG‡îÐïQ î/ îÇî|î î&Gî'³ îoïO$îÊ î;xîÈïO$î±ïO$pîÔïO$îÐïL¨îRî¬î¥ î î$¹î%Øî)®î+]î27 î9vî;ËîAqîCýîFRîÐïKîÖîhî¥î8 îoïH†îíîoîüîÐïF îíîî†î÷î Vî"»î&€î,Åî.6 î5dî8!î9’î>JîDnîF!îGPîÐïDcîø îiîŒî" î)@î+„î/Éuî2ÉïDcî3cïDcpî6�ïDcî7ïDcîîA¢îDèîGêîÐïAî§î3 î Ü î&lî(•î-(î/´ î6Æuî8¡ïAî9RïApî<�ïAî=™ïAîAÔîD¬îH�îÐï?mîDîî î!î"Ùî$ðî)Dî+E î3kî4þî7n î>cî?ßîDåîHîIƒîÐï=Åîâî‘îðî°î_î wî#Eî&Uî(©î,«î/bî2ë îoï;Jîî •î"" îÐï8ÎîîÍî�îÄî#î&Ãî+Wî.~î/¶î4€ î;×î=àî@MîDîHîÐï7'îáî‚îòîÞ î'dî)} î/‹î14î4î5Çî7²î=Sî>ýîBûîEäîoï4« xî×ï4«î�ï4«pîlï4«xîùï4«î²ï4«pî —ï4«îÐï2/îÆî îGî î"tî'{î*³î1‹î7 î8–î;î?€îBvîEKîH�îÐï0ˆîîî|î"Lî$R î*ßî.Fî0¥î4ôî:Wî=qî>šîB îF0îHÑîÐï.áî"î%î¹îÛîpîdî!8î#î&hî+7î-Èî/Ÿî4e î;î>^î@£îE^îÐï-:î[î˜î~îuîƒî Ìî#î)î*›î-´î1î28î6Mî:ç îD@ îÐï+’îæî!1î#nî%Íîï)î îBîËî î"úî%rî)ƒî-’î0óî2Üî5uî;w îDîîH›îï'o îèîî? îoï$ôîìî!�xî#)ï$ôî$ï$ôpî%5ï$ôîÐï"xî¬î£îî î"Æî%*î(îî*^î0î1Ñî5Rî7¶îúîAl îHîIÅîÐïE î+îjîµî!ëî%î, î.çî5�î8mî<î>¡îC§ îÐïžî¨îîëî"Qî#½î(œî*Kî,ªî1Šîoï "îÅî$Âî&Owî)Èïý TVm$ùî8ùî< îB„îFžîH…îÐïîDî îDîBî ¶î#}î(åî+Ãî.2î1Gî3”î6î9î=uî?uîCDîE³îI@îÐï[î/îoïÏîÈî%txî'ïÏî'éïÏpî) ïÏîÐïCî¥î‚îOî#„î%àî)�î,Qî0&î1Üî48î9sî:òî=‘î>úîAl îHîIÅîÐïœ î+îjîµî!ëî%î, î.ThecoordinatesystemofthegraphicscontextpassedtotheviewerPaintProcwillnormallyhaveitsoriginatthelowerleftcorneroftheviewer,withxandyincreasingtotherightandupward.IfthecoordSysissettotop,thentheoriginwillbesettothetopleftcornerwithyincreasingdownward.bltContents:BOOLEAN_FALSE;Thisiscurrentlyunused.paintRectangles:BOOLEAN_FALSE;Thisiscurrentlyunused.Itisimportanttonotethattheimplementorofaviewerclasscandefaultanyofthefieldsiftheychoosenottoprovidethatparticularfunctionality;thesystemwilldotherightthingwithrequestsonviewersthatdonotimplementaparticularoperation.TheprogrammercreatesanewviewerclassbyallocatingandinitialisingaViewerClasses.ViewerClassRecandthencallingViewerOps.RegisterViewerClass,passingtheclassrecordandauniqueatomwhichnamesthenewclass.Thisoperationcreatesabindingbetweentheclassoperationsandanynewlycreatedviewerinstances(seetheViewerInstancessectionbelow).Subclassing(asinSmallTalk)isnotdirectlysupportedbythesystem;theprogrammermustexplicitlycopyandmodifyanexistingviewerclass.Asimpleexampleofcreatingandregisteringaviewerclasscanbefoundon[Indigo]Viewers>LabelsImpl.mesa.ViewerInstancesOnceaViewerClassisdefined,instancesmaybecreatedwhichwillinheritinformationfromtheclass.Manyofthepredefinedviewerclasses(listedinthenextsection)provideinstancecreationoperations,otherwiseaclientmaycallViewerOps.CreateViewer,passingtheclassandinitialdatafortheinstance.AViewerClasses.ViewerRecdefinesthedataassociatedwitheachviewerinstance.Duringviewercreation,theclientmayinitialisesomeofthefields,theViewerspackagewillinitialiseothers,withtherestdefaulting.Theremainderofthissectiondescribesthedatastructureinsomedetail,andisofparticularinteresttoaclientimplementingaviewerclassorcreatingatoolcomprisedofmanyembeddedviewers.Eachviewerinstancemaintainsapointerbacktoitsclassdatarecord:class:ViewerClass_NILTheclassfieldisinitialisedbyViewersduringinstancecreationandremainsconstantforthelifetimeoftheviewer.Eachviewercontainstworectangles,describingtheouterboundaryoftheviewerandaproperlycontainedinnerareaavailablefordisplayingclientinformation:wx,wy,ww,wh:INTEGER_0,cx,cy,cw,ch:INTEGER_0Thewxandwyfieldsdefinethecorneroftheviewerwithrespecttoitsparent'sclientorigin.Inthecaseofatoplevelviewer,wxandwywillbewithrespecttothebottomleftcornerofthedisplayscreen.Thewwandwhfieldsdescribethewidthandheightoftheviewer,measuredinscreenpixels.Thecx,cy,cw,andchfieldsdefineaninnerrectangleandrepresenttheclippingboundaryfordisplayoftheclientinformation.cxandcyaremeasuredfromtheparent'sclientorigin,justasthewxandwyfields.Theclientshouldinitialisethewx,wy,ww,andwhfieldsduringviewercreationifandonlyiftheviewerwillbeembeddedinaparentviewer,sincethe6pîÐïb)îÑ î¿îcî!Eî#Îî)fî.dî2òî4Êî7Sî;àîBIîEîÐï`‚î"îîî¸î#î!øî$yî(Óî*—î-î1Êî4ñî61î8óî:3 î@µîBoîDÚîH7îÐï^Úî¿îKî´î šî"î$6uî%îï^Úî&^ï^Úpî'¿ï^Úî(¥ï^Úî+Õî.>î2Hî4ýî6øî9î:Öî=?î?¾îB=îF•îIºîÐï]3 îFîoïZ¸ xîSïZ¸î ïZ¸pî]ïZ¸xîêïZ¸î£ïZ¸pî"ˆïZ¸îÐïX=îêîVî3îoïUÂxîÓïUÂîŒïUÂpîÝïUÂxî!jïUÂî"#ïUÂpî%ïUÂîÐïSGîêîVî3îïPËî“î îzî5î\î8î!¤ î)Öî+œî,Óî1Dî4�î7î;Ïî>}î@CîB¯îFqîGÞîïO$î¡î"îÜîóîÍ î% î-˜î0î4‹uî7BïO$î7òïO$î93î;‹î>àpîBoïO$îClïO$îE–îïM}îîþîÌîÒîGî#-î$V î*Œ îïKîH îŒî!uî$î(Pî.î2©î6 î=œîA¶ îIÅîïIZî!î$î'bî,î@îE$îG¾îïG³îtîBî‚îAîÔî"ùî'Sî)Éî,Íî1î46î:vî?î@SîE€îïF î[îy îî¹îHî#7î'îî,@î1ÿî4ºî7î;¦îA†îFîïDd îRî]îï îØî!(î#�î(Zî.¶î0•î2Ùî7±î9õ îA»îE îïB½î`îîÕîÅîÐî$4îï@Bîªîî§îoî%¶î)| î1Dî3}î8ñî=1î@ËîCËîHèîï>›ð'tî ®ï:xî(pîï7)î¾îùî½îaîÞî"Hî(+î+@î-Bî2î6<î8ùî={ îEîH�îï5‚îAîKîî‹ î!�î&î*uî.¬î0mî2àî6î;-î@KîE¬îï3Û î2îxî¿î œî#½î&eî6Rî;Bî=¿îA îCáîGéîï23îLî«îï/¸î±îî$Sî&Èî)â î0dî3•î6Üî;VîA«îFŠîï.î¯îîÛîæ î"eî%þî'½î*#î.6î0œî5Ùî;!î=Ó îCRîGÓîï,jîgî îQî"î#³î%eî(î,•î2vî4Ïî7Íî=ƒî?*îB¶îFÒîIƒîï*ÂîÖ îîîÃîûî!Ê î*—î+Ïî0Bî3�î5Sî:˜î;Ðî>«îE]îG$îï)îÉîï& î�îæî3î!sî"�î'fî*¬î,[î.5î1fî4kîï$%î¸ îyxîï$%îîï$%pîï!ªîÒîîî îb î�î uî%—î)óî/,î4Zî6þî<îAoîC™îEäîï îÇî'îï‡î�îî�îe î%: î+îî.jî2%î8vî:Jî<ÆîAFîDîE_îïàîZîøîñî ¬î"é î)vî-6 îïeî™î¨îxîBïeî¬ïepîëïeî xïeîïêî6îâîWxî·ïêî ïêpî`ïêîíïêîïoîôî4îøî8îúî Aî"®î' î(Ñî+=î/°î2Øî7Žî9Iî;1uî@kïoîAïopîD'ïoîDãïoîIîïÇî•îªîŠîÚîvîãî!Çî$ î&þî)Wî,)î.Aî1‚î6Rî8'î:­î?�îB9îF¯îH�îï îÛî%îî±î ‚î"åî&´î,2î.¬î2¨î5yî9Íî; î>îBñîI@îïyîdîeîZîŸîãî!uî$Iî&Lî*î.tî0�î4<î:6î= îC%îE¡îï Ñîbî¾î�îgîåî#Ä î,gî.Uî1+î3î5Œî;ßî?eîAãîG.îï *î‹îPî!î¤îùîÔî!)î&î(ûî,ßî1~ î7î9�îøîAóîDÎîG:îï ƒî£î,î’îî òî$0î%µî(8î,Áî/�î1¥î8ƒî:Vî;£î@îDøîH�wî)Èïý _TVm$»%îî±î ‚î"åî&´î,2î.¬î2¨î5yî9columnconstraintalgorithmswillrecomputethesevalues.SinceviewerpositionandotherinformationiscachedbyViewers,clientsshouldneverdirectlysetanyoftheviewerrectanglevalues,butinsteadshoulduseroutinesintheViewerOpsinterfacetochangethesizeorpositionofaviewer.Otherviewerfieldsofinteresttoclientsinclude:data:REFANY_NILTheimplementorofaviewerclassmayassociateinstancedatawithaviewerinthisfield.Notethatonlytheclassimplementormayaccessthedatafield;otherclientsshouldusethepropertylistassociatedwitheachviewer.name:Rope.ROPE_NILEachviewerhasatextnameassociatewithit,whichinthecaseoftoplevelviewers,isdisplayedinthecaption.Theclientmaymodifytheviewername,butmustbesuretorepaintthecaptionifapplicable(viaViewerOps.PaintViewer[viewer:viewer,hint=caption]).border:BOOL_TRUEAnembeddedviewerisdisplayedwithaone-bitwideblackborderiftheborderfieldisset.Toplevelviewersarealwaysdisplayedwithaborder.tipTable:TIPUser.TIPTable_NILTheTIPTabledefineshoweachviewerinterpretsmouseandkeyboardinputandiscopiedfromtheclassrecordwhenavieweriscreated(thereisalatersectiondescribingthemouseandkeyboardinputmechanisminmoredetail).Insomecases,theclientmaywishtochangethebehaviourofaparticularviewerandmaydosobymodifyingthisfield.Afinepoint:ifaviewerownstheinputfocus,thenitsTIPTableiscachedbythenotifier,whichpresentlymustberesetbyreleasingandthenrecapturingtheinputfocus.file:Rope.ROPE_NILSomeviewerschosetoassociateabackingfilewiththeirdatastructures.Whilethislogicallybelongswiththeimplementorsdata,itappearsintheviewerinstancedataasaconveniencetoclients.Itmayberemovedinthefuture.menu:Menus.Menu_NILAtoplevelviewermayoptionallyhaveamenuofcommandspermanentlydisplayedbelowthecaption.Ideally,theclientshouldpassamenuwhenavieweriscreated.Toaddamenutoanexistingviewer,theclientmustuseViewerOps.SetMenutoresetinternalrectanglecachesandtorepaintthenewmenuonthedisplay.icon:Icons.IconFlavor_toolWhenatoplevelviewerismadeiconic,itnolongerdisplaystheclientdata,butinsteadappearsasasmallsymbol,easilyrecognisablebytheuser.Theinstance'siconfieldisnormallyinitialisedfromtheviewer'sclass,butmaybeoverriddenbytheclientduringviewercreation.TheIconsinterfaceprovidesroutinestoaccessexistingViewersicons(Viewersincludessymbolicpicturesforadocument,tool,typescript,andafiledrawer)ortocreatenewiconsfromeitheraprocedureorasetofbitmapsstoredinafile.TheclientmayspecifywhetheraniconistobelabelledbyViewerswiththeviewername.Iftheinstance'siconfieldissettoprivate,thentheclientPaintProcwillbecalledeventhoughtheviewerisiconic,whichishowtheclockicondisplaysthecurrenttime.column:ViewerClasses.Column_leftWhenavieweriscreated,theclientmayspecifyinwhichcolumnaviewerwillbedisplayed.ClientsshouldonlychangethisfieldinanexistingtoplevelviewerbycallingViewerOps.ChangeColumn.7pîïb)îo î2 î!bî$yî+µî/ªî5Œî9­î>~îD,îGOîï`‚ î‚î×îTî9î"±î&ßî+Dî.ùî3×î5Þî8hî: îKîCxîEîF2îï\_îîjîîØî ·î"eî&ªîïYäxî�ïYäîaïYäî=pî6ïYäxîÃïYäî«ïYäpîoïWhîP î~î?îrî!ßî%î($î-Òî3)î66î9Zî:Œî>ùî@°îCZîGxîoïUÁîNîxîçî( î#]î&qî*�î,ÿî0î3Îî7}î;Òî@_îBäîETîoïTî­ îî4îeîïQžîGxîÏïQžî£ïQžpîJïQžxî×ïQžîÀïQžpîoïO#îàîBîµîÝî’î!Pî&óî* î+¸î/Äî1oî3Íî6¹î8pî:ãî>'îCfîDÏîoïM|îî~î;îîÕî"Ùî'—î)øî.]î2vî4÷î8`î:Rî=Lî>ûîC¯îFîoïKÔîÐ î^îî-vî23îïIYxîïIYî¼ïIYpî˜ïIYxî%ïIYîÞïIYpîoïFÞî¸îhîÃî%î$9î'Jî(jî-î0eî4î8vî9Íî<#î@”îCºîEîHîoïE6îµîžîñîVî$uî'�î(ºîïB»îî�xî!ïB»î!öïB»pîoï@@îLîoî2î ;î#rî'Û î. î2jî5&î;4î>äîA îCîG‡îoï>˜î îwîîôîZî#ûî%£î*©î.èî0�î1öî5Wî:0 îAîC¡îH7îoï<ñî˜îbî µî"ƒî&6î+—î-†î19î5$î7¤î;„î>¨îAøîCÇîH�îoï;JîÞî�î° îÞî#:î%éî(åî*ãî,Ÿî.’î5"î7»î;¶î=;î?ÿîDîEhîFŠîoï9¢îîmî#î%î Vî"<î(eî)Üî.zî0�î2ëî8-î{îB¹îE�îoï1]î“îÇî@ î#î&xî'èî- î.Ôî1Lî5Êî;1î>Oî@îAZ îI@îoï/¶î�îî îûî «î"Yî$¹îï-:îi îÛxîgï-:îPï-:pîoï*¿î î’îèî]îq î$øî(Oî)‰î-zî/Cî69 î>BîDrîH�îoï)î4î"î†î Kî$Ìî'Êî(øî,Þî0—î1Æî6/î7 î=Nî?zîB7îCeîGKîHþîoï'pî€îCî©îoî"Þî%Yî2+î3àî7-îî#þî(Yî)¯î+¶î/úî51î7‘î;Qî>¯îA0îEãîoï+îî3îÈîÞîŸ î&mî(_î*µî.vî1E î7eî:_î=†î>èîD¯ îoïƒîåîSî£î:î Éî#Üî%Û î,åî.ïî1^î5,î9¬î>îDZuîGAïƒîGÜïƒpîoïÜî6îçî Vî"&î&Uî+�î0Ùî4ƒî:Tî?ÚîEÁîoï5î¡î¿îyî“ î#,î%Øî&öî)Tî.^î0î1ºî5±î8“î<î?lîCMîDkîoï�î:îkî�îOîŽî¸î!nî"žî%òî(Ñî,™î/¤î4Gî9œî;”î>Ÿî@îAÈîCÀîHóîoïæî‰îˆîÌîî"wî#Ýî&! î,/î/î2+î3{î5|uî7ïæî7¾ïæpî:üïæî;½ïæî>ÇîA îD®îoï?î#îîîkî 'î"�î&ýî(qî,Ôî0ëî2_î5lî7Ôî;pî>}îC½îF%îoï—îïî}î!’î#îoï¡î«îøî€îî Uî"Øî&¼î)ãî.¤î0uî4§î9¿î; î?•îBcîDx îoï ùîûî\î[î#èî'nî+ƒî.î0ëî6Úî:5î>_îC©îF‰îoï Rwî)Èïö žTVm$÷î 'î"�î&ýî(qî,Ôî0ëî2_î5lî7Ôî;pî>}îC½îF%îoïîïzî}î!’î#îoïàî«îøî€îî Uî"Øî&¼î)ãî.¤î0uî4§î9¿î; î?•îBcîDx îoï8îûî\î[î#èî'nî+ƒî.î0ëî6Úî:5î>_îC©îF‰îoï ‘îï ÷ xî¦ï ÷î_ï ÷pî;ï ÷xîÈï ÷î�ï ÷vî)Èïöÿ TVm$Óscrollable:BOOL_TRUEViewerswillallocateascrollbarareaonthelefthandedgeofavieweraswellasprovideappropriateuserfeedbackifthisbitisspecifiedduringviewercreation.Theactualscrollingoperationareperformedbycallingtheviewer'sclassScrollProc.iconic:BOOL_TRUEClientsmaysettheiconicbitduringthecreationofatoplevelviewerinordertoinitiallydisplaytheviewerasiconicatthebottomofthedisplayoropeninitscolumn.Aclientmaynotchangetheiconicbitforanexistingviewer,exceptbycallingViewerOps.OpenIconorViewerOps.CloseViewer.newVersion:BOOL_FALSEAclientmaytesttoseeifeditshavebeenmadetoaviewerbytestingthenewVersionbit.ViewerimplementorsshoulduseViewerOps.SetNewVersiontosetthenewVersionbitanddisplaythe"[NewVersion]"messageintheviewercaption.newFile:BOOL_FALSEAclientmaytesttoseeifthereiscurrentlynoexistingbackingfileforaviewerbytestingthenewFilebit.ViewerimplementorsshoulduseViewerOps.SetNewFiletosetthenewFilebitanddisplaythe"[NewFile]"messageintheviewercaption.offDeskTop:BOOLEAN_FALSEAclientmaytesttoseeifthevieweriscurrentlyaccessibletotheuser.ViewerOps.ChangeColumn[viewer,{left,right,color}]willmoveitbackontothescreen.openHeight:INTEGER_0AclientmaysetthevalueofopenHeighttobethedesiredverticalspacetakenupbyaviewerwhenopeninacolumn.Thewindowmanagerwillattempttohonortherequest,butmaygivemoreorlessspacethanrequested.parent:ViewerClasses.Viewer_NILEachviewerthatisnestedwithinanotherviewerkeepstrackofitsparentthroughthisfield.Thisfieldwillbenilfortop-levelviewers.sibling:ViewerClasses.Viewer_NILViewersofequaldepthwithinatreearelinkedviathesiblingfield.child:ViewerClasses.Viewer_NILAviewermayhavechildrennestedwithinit.props:Atom.PropList_NILClientsmayassociatearbitrarydataandpropertieswithaviewerbyaddingthemtothepropertylist.TheAddPropandFetchPropoperationsinViewerOpsaretherecommendedwayofaccessingtheviewerpropertylist.AnumberoffieldsintheviewerrecordareprivatetoViewersorarenotparticularlyofinteresttomostclients.Theyareincludedhereforcompleteness:lock:ViewerClasses.Lock_[NIL,0]Theviewerdatastructuremaybelockedwithnon-exclusivereadorexclusivewritesemantics,makinguseofthelockdatastructurewithineachviewerinstance.Theclientshouldneveraccessthisfielddirectly,butshoulduseroutinesprovidedintheViewerLocksinterface.Amoredetailedtreatmentoflockingmaybefoundelsewhereinthisdocument.8pîïb) xî¦ïb)î_ïb)pî;ïb)xîÈïb)î�ïb)pîoï_­îëîÝî"î’î$rî'±î)ýî,£î/^î3"î6¯î8­î:î>Èî@¼îCïîEãîoï^ îî,î 0î!Ãî$–î&åî(ƒî.qî3î7ªî>,îA6îEkîoï\_î™îìî°î ¬î%î'pî,²î/â îïYãxîŠïYãîCïYãpîïYãxî¬ïYãîeïYãpîoïWhîî î uîwïWhîÛïWhpî_ïWhî &ïWhî!tî%Ýî(5î-oî/ î0Bî2°î5îî:Kî;ñî?žîADîF<îoïUÀîÈî'îÎîÊî\îµî$xî&+î(„î-0î.îî2Zî4î5Öî;šî= î@ÚîCØîFFîoïTîÕîÞîîEî!<î'Mî-î2gî5iî:ÔîI*îoïRrîïOö xîïOöîÀïOöpî›ïOöxî(ïOöîáïOöpîoïMzîëî›îŽî î§îêî:î"qî%§î(óî,¢î.@î/Yî3®î5™î9îuî<=ïMzî<ûïMzpîCdïMzîD+ïMzîF<îoïKÓ îGîòî•î0^î2;î4‡uî7ïKÓî7ÓïKÓpî>|ïKÓî?CïKÓî@ÇîC­îH�îoïJ,îÍîõîMî ûî#Zî'¿îïG°xîÉïG°î‚ïG°pî^ïG°xîëïG°î¤ïG°pîoïE5î îÞîóî�îPî´î &î#Áî%>î+,î-Cî2_î7‘î: î…uî@öïC�îA´ïC�pîF ïC�îFÐïC�îH7îoïAæî"î�îßîÊî$!î%Ïî(/î,“îï?j xî(ï?jîáï?jpî2ï?jxî¿ï?jîxï?jpîoï<ïîîöîî¿î!Šî$ûî'xî*õî0vî2ÿî9ù îAVîD!îGžîoï;Gî$Íî(Kî+õî0…î31î6ðî8Fî;�î>½îAîï8Ì xî ï8Ìîsï8Ìpî³ï8Ìî@ï8Ìîoï6Pî îÜîðîî�î Fî" î)¡î+_î-`î/Ðî4¨î9Œî=RîA"îCDîEPîFŠîoï4©î.îªîaî”îxî"Yî'Žî-1î/æî4üî6´î:Êî=3îBiîDóîHîoï3îîÆî\îî7 îï0†îØî Gxî!Ôï0†î"½ï0†pîoï. î×î0îóîSî—î#Ñî(Ðî-)î0ôî4[î6 î7Øî<îAIîCßîGÔîoï,cîŸîKî;îMîŠî!:îï)çîøî gxî!ôï)çî"Ýï)çpîoï'lî¥î^îî î"Qî#zî&=î(�î,Éî/î1fî5Öîï$ðîûîkxî øï$ðî!àï$ðpîoï"uîüî`îdî«î!î%^î)£îïùî^ î«xî8ïùî!ïùpîoï}îîî¼î"`î%dî( î.�î1©î2Òî75î90î=ÀîAHîBõîETîoïÖîUîîíî‹î$+ î*Àî,Tî3Kî5…î7Ë î@©îCgîEîoï/îÏî3îÎîï³î›îÈî�î6îåîEî"ªî&úî)Mî-ëî/™î4Ðî6”î8èî;^ îB§îD`îI@îï îkî‹îîgî" î%(î'e îï�î�î¼îHxî¬ï�î ”ï�pî!·ï�î"”ï�îoïîlîõîî î#)î%?î)Éî- uî5Ìïî6Pïpî8ôïî9°ïî:Ýuî@ÞïîAÆïpîDaïîDåïîoïmîNî¹îhî½î¬î §î&Zî*”î-»î2î8*î:øî>¯îC îFáîoï ÆîûîîMî¸î!î#~î(µî.qî0 î2S î:m î@ÃîB9îE·îoï î¥î^î1î5î!%î%3î+}î-+î/Íwî)ÈïàTVm$‰visible:BOOL_TRUETheViewerspackagemaintainsaprivatevisibilityhinttospeedsomerepaintingoperations.Clientsshouldnotrelyonthevalueofthisfield.offDeskTop:BOOL_FALSESomeviewersmaybeonotherthanthecurrentdesktop,inwhichcasetheoffDeskTopbitwillbeset.destroyed:BOOL_FALSEAviewerisdestroyedbycallingViewerOps.DestroyViewer,atwhichtimeitisremovedfromtheviewertreeandthisfieldissettofalse.saveInProgress:BOOL_FALSESomeclientsneedtoknowwhenaSaveoperationiscurrentlypendingforaviewer,andmayexaminethestateofthesaveInProgressfield.NotethatthenewVersionbitremainssetuntilcompletionofaSave.init:BOOL_FALSEViewersmaintainsaprivatehintindicatingthatanewviewerhasbeenproperlyinitialised.Ithasnootheruses.inhibitDestroy:BOOL_FALSETheinhibitDestroybitpreventstheuserfrominvokingtheDestroyoperationinatop-levelviewermenu.Thisfieldwillberemovedinfuturereleases,soclientsshouldnotdependonit.guardDestroy:BOOL_FALSETheDestroymenucommandfortop-levelviewersisnormallyguardedifftherearenewedits.IftheclientwishestheDestroymenucommandtoalwaysbeguarded,thentheymaysetthisbit.link:ViewerClasses.Viewer_NILLinkedviewersareconnectedviaaringdatastructure.Currently,linkedviewersarenotcompletelysupportedbythesystem,butthisfieldisincludedforclientstoimplementlinkingsemantics,asinTioga.position:INTEGER_0ThepositionfieldisaprivatevalueusedbyViewersforiconpositioningandadjustingofviewersizewhenopeninacolumn.PredefinedViewerClassesListedbelowisasetofviewerclassesforclientusewithimplementationsprovidedintheCedarbootfile.ButtonsButtonsareaclassofviewersthatdisplayatextlabelandcallaprocedurewhentheuserclicksthemouseoverthem.Buttonsareusuallycreatedwithinacontainer(seebelow)aspartofatool,eitherdirectlythroughttheButtonsinterfaceoraspartofahigherlevelobjectcreatedwiththeChoiceButtonsinterface.Parameterstotheclientprocedureincludethebuttonviewer,themousebuttonthatinvokedthebutton,andthestateoftheshiftandcontrolkeysatthetimeofinvocation.Containers9pîïb)xîÖïb)î�ïb)pîkïb)xîøïb)î±ïb)pîoï_­î‡îþî€î#ÿî%iî*F î0î39î5'î9Iî= îCé îoï^îî’îîÉîÏî"/î%Øî'‘î*3îï[Š xî(ï[Šîáï[Špî½ï[ŠxîJï[Šîï[ŠpîoïYîTîKî^î]îrî# î&Uî(Ãî-›î3$î4àî8ýî;úî>h îFîHCîoïWgî`îïTë xîÈïTëî�ïTëpî]ïTëxîêïTëî£ïTëpîoïRoîúî]îÇîîÿî#bî3öî5�î9™î<½î>î?{îE*îH�îoïPÈîÔî–îMîïîî ‹î"¨î$VîïNLxîÊïNLîƒïNLpî_ïNLxîìïNLî¥ïNLpîoïKÐîbîÃî<îî ãî$µuî%ûïKÐî&ØïKÐpî)_ïKÐî*ïKÐî/¥î1.î7'î<œî>öî@=îEîGêîoïJ)îî”îëîËîQ î(ºî-î0¯î3¤î6* î=Ïî@îEdîG§îoïH� î—îPuîyïH�îVïH�pî<ïH�îïFxîïFîÁïFpî�ïFxî)ïFîãïFpîoïCŠîšîÎîíî ~î#V î)¬î,oî-Žî0pî4Êî73î:…î@ îG îHyîoïAâîuîîï?gxî ï?gîZï?gpî5ï?gxîÂï?gî{ï?gpîoï<ëî5 î<îHî"ºî%î'ðî+Eî0âuî30ï<ëî4Cï<ëpî8ï<ëî8Ûï<ëî>7î?Óî@ëîFŠîoï;Cî,îFîvî"îî$Âî&pî*”î/÷î1»î5ÿî:{î<ðîAÛîCáîï8È xîï8ÈîÕï8Èpî±ï8Èxî>ï8Èî÷ï8Èpîoï6LuîBï6LîVï6Lpî>ï6Lîhï6Lîî!vî#¯î)Zî.>î/¤î5pî:Ãî<˜î@îBkîETîIlîoï4¤îÏî�îéuîHï4¤î\ï4¤pî!Jï4¤î"sï4¤î%+î+Œî-:î1Ÿî3�î9AîïîDÔîFŠîoï%¿îîÏîBîðîtî ®ï!œ î×îRpîïLîVî|îîDîzîLî!Êî&=î(”î,mî.ûî2/î<«îB–îD^îFÖîï¥î?vîïUpîoï’îŽîëîîVîî" î$áî)œî*Ïî-�î0ôî3´î6Hî7{î>îAÄîD,îG.îoïëîÀî îî_î"hî$­î)Qî. î2Bî3^î9Xî<î@ŽîB.îEîF®îGÉîoïDîgîgîî ƒî%¥î+Uî-$î.Ýî1Ìî3�î4Åî9 îDocumentation>TiogaDoc.tioga.TheViewerToolsinterfaceprovidesasetofoperationsthatallowaclientprogramtocreatetextviewersaswellastofetchandstoretheircontents.ThereareagreatmanyadditionaloperationssupportedbytheTiogaeditor,exportedbytheTiogaOpsinterface,whichisdescribedintheTiogadocumentation.ImplementationGuidelinesTheproceduresandvariablesinaviewerweredesignedtosupportaparticularstyleofimplementationfornewclasses.Manyoftheproceduresandvariableswereaddedspecificallytohelpsolvesomegeneralproblemofconcurrencyoruserinteraction.Implementorsarenotrequiredtousetheseprocedures,buttheyshouldonlydepartfromthemwhentheyhavegoodreasons.ThebestwaytowriteauserapplicationthatusesViewersistofirstwriteaapplicationspackageaccessibletoclientprogramsandthenmakeathinveneeroveritforusers.Itistemptingtotailoryourimplementationtotheuserinterface,butthistemptationshouldberesisted.Nomatterhowuser-orientedyourprogramis,someusersomedaywillwanttowriteaprogramthatusesyourapplicationdirectly.Itisbestthatyouprepareforthateventualitynow.Therearefourdifferentwaysthataparticularfunctioninyourprogramcouldbeinvoked:notificationofanusereventthroughtheNotifyProc,acallonapre-definedfunctionintheViewersclass(suchasset,get,andsave),invokationthroughabuttonormenuitemontheviewer,andaclientcallonaninterfaceyouexport.Ifyouusemorethanoneofthesepathstoinvokeafunctionyoushouldbeabsolutelycertainthattheyallhaveexactlythesamesemantics.Thebestwaytodothisistohavethemallcallthesameprocedure.ThustheNotifyProcthathandlesspecialuseractionsshoulddonomorethangatherparametersanddispatchtoproceduresthataredefinedinaninterfaceexportedbyyourprogram.Thesameshouldbetrueofproceduresthatareinvokedwithbuttonsandmenus.Thefunctions`create'and`destroy'arespecialfunctionsintheViewersworld.AllofthecreationanddestructionthatisnecessaryforaparticularViewersclassshouldhappenintheclass'sInitProcandDestroyProc.Inparticularitisveryimportantthatallofthemenuconstruction,sub-viewercreationandprivatedatainitializationhappenintheInitProc.ThisallowstheViewerspackagetocreateanddestroyinstancesofaclasswithouthavingtoknowaboutinterfacesexportedbytheclass'simplementation.Thisisimportantsinceopeningadesktopsometimesrequiresthere-creation10pîoïb)îîîŒî¿î,î!î&î)ªî.œî0Tî2N î9<î?ÿîBÀîH7îoï`‚îîîïî… î#ª î*˜î0Ÿî3(î6+î<2î>îD4îoï^Úî‘îxî¢îºî¢î":î&>î(0î*Èî/Q î6§î;qî?îC¤îH�îoï]3 î7îµîºîæî%òî(jî*Hî.Lî/çî2Jî6Pî8Èî=rî@�îBòîD* îoï[Œ îEîSîî", î)Žî+zî1ãî7Bî:î<}îAîC÷îH!îoïYä î?îTîÑ î#óî%Èî*Îî,î0&î2 î9î@‹îDgîIÅîoïX= vîïUÂpîoïSFî îyîõî0î¥îæî ¯î%%î(î-Kî.…î1Mî6µî8tî9®î=ªîA•îD}îGêîoïQŸî î%îyîeî î"½î%Zî'âî.�î1Ãî5Ëî8ªî=» îD‡îI5îoïO÷îêîùîšîžî"[vîïL¨pîoïIæîîî’îçî³î úî&õî(Ëî*î.î1·î3Ûî6Yî;�î>Vî?àîDÇîH�îoïH?îP îÒîZî®î#Æî&î+;î-ñî3`î7î=>î?žîCÌîE…vîïDðpîoïB-î£î�îç î"=î$<î& î*ƒî1L î8ºî=9îCgîEîHèîoï@†ð,î.î1- î9uî?lîELîFÇîI5îoï>ß î8î!îåî*î"î'®î)xî-•î0hî5lî74î:=î<î=ÏîA^îD0îG§îoï=7îÍîÙî6îjî æî$» î+< î1ôî8vî:{î<äî@ÎîE2îoï;�îkîÊî î î$î%€î+«î-Yî/¹î3™ tî ®ï7m îg pîï4îk î÷î3î"sî$¦î&Tî+=î/î5Tî7‡î=î>Æ îE€îI5îï2w îþîLîKî"£î&«î(tî*å î1ýî4Åî:‘î=óîB( îI@îï0ÏîîŒîîÙî"Pî#ü î+²î-iî0V î7ò î@°îBöîE^îï/(î½î2î» îî›î"«î''î*Aî.‘î1øî5�î96îî~î � î'¶î*šî-ªî2öî4xî6=î9+î<¿î=ÿ îE¬îï+ îOîþî¾îÒî"‰î%°î)dî*Žî-rî1ãî4ýî6Sî8‘î<ëî>cî?ÏîE¡îGPîï)^îU î?îúîeî"j î(sî+î-­ î4ªî91î;.îAîC„îGêîï'¶ î�îïî¢î!Šî%Bî(_î,î.Üî1¬î5-î7î:¢î;ðîA£îD•îG³îï& î îòîiîÕî ¸î#‡î&>î+Iî-†î0T î7[îï#”îèîîïîmî¡î"Gî#H î)Vî.§î0-î3@î8§îîC¦ îï!ìîÂî­î¡îQî„îÞ î';î(_î*åî,æî. î5pî:äî<�î>çîDîGDîï Eîºî,îËîîR î"î'Sî(zî,éî.«î2‰î5¬î7¯î: î>ÆîA{îB¢îF`îHèîïžîî¯îlî¢î*î!æî$`î'ùî+%î-Öî/”î3#î6Óî8‡î=î>6îC¶îFrîïöî î£î;îî!;î#<î&”î+Bî-²î1@ î8sî;\î>QîA:îBùîEîGÃîI@îïOîFîÀî îîlîÚ î&î)‰î+Ù î2Ôî5“î:�î>ûîAåîFrîï¨îAîtî3î…îë î%î(î-�î/x î6«î9¦î<%îARîC,îEIîïîÕîÛî!î î"ƒî& î*‘î,�î/{î1> î8Pî;)î=‡îBÓîEøîïYîÆîïÞîðî÷î´îtî$î&_î*äî0ëî2¢î5 î:Kî?%îA�îCCîE¬îï6îÄ îáî®îî"*î$fî%� î+Ãî0øî4'î8¡î=‹î?7îA–îE¡îï�îÞ îÃî« î!ùî#gî$ìî(î.�î1tî3|î5Nî7Æî;¿ îCþ îïèîOîî¡î¥ î%‡î*pî,î.|î5&î8?îÊîCÿîI@îï @î9îîî î!îî#@î&˜î+Ìî0oî2Eî6,î:6 î@ˆîFkîH�îï ™îî’î–î ëî'6î*’î/Éî0Üî5çî<‰îAÀîD wî)eïýÿ 1TVm$î î"ƒî& î*‘î,�î/{î1> î8Pî;)î=‡îBÓîEøîïêîÆîïoîðî÷î´îtî$î&_î*äî0ëî2¢î5 î:Kî?%îA�îCCîE¬îïÈîÄ îáî®îî"*î$fî%� î+Ãî0øî4'î8¡î=‹î?7îA–îE¡îï!îÞ îÃî« î!ùî#gî$ìî(î.�î1tî3|î5Nî7Æî;¿ îCþ îïyîOîî¡î¥ î%‡î*pî,î.|î5&î8?îÊîCÿîI@îïÒî9îîî î!îî#@î&˜î+Ìî0oî2Eî6,î:6 î@ˆîFkîH�îï+îî’îofaviewerthattheuserhaddestroyed.AllthattheViewerspackagecandoiscallViewerOps.CreateViewer[viewerFlavor,info:[name:viewerName]]andhopethatthisissufficienttocreateandinitializetheviewer.Applicationtoolsshouldcreatetheirownviewer'sclassjustsotheycanhavetheirownInitProc,evenifthereisnevermorethanoneinstanceofthetool.Similarly,ViewerOps.DestroyViewer[viewer]shouldbealltheViewerspackageneedstomakesurethattheviewerhascleanedupallofitsinternaldatastructures.(Cleaningupinternaldatastructuresincludesbreakingcircularlinkssothegarbagecollectorwillreclaimthestorage.)MouseandKeyboardInputLockingTheViewerLocksinterfacedefinesaninterlockingmechanismtoarbitrateaccesstotheViewerwindowtree,viewercolumns,aswellasindividualviewers.Aparticularviewermaybelockedforreadingorforwriting.AreadrequestimpliesthatthecallingcodewouldliketoexaminevaluesintheViewerClasses.ViewerRecandinsurethatthesevaluesareinvariantforthedurationthatthereadlockisheld.Anynumberofclientscansimultaneouslyholdreadlocksonasingleviewer.AwritelockisanexclusiveaccesstoaviewerfortheimpliedoperationofmodifyingoneormoreofthefieldsintheViewerClasses.ViewerRec.Locksareprocessre-entrant,meaningthatasingleprocessmayrequestalockmultipletimeswithoutdeadlock;i.e.ifaprocesscurrentlyhaswriteaccesstoaviewer,itmayinadditionrequestreadorwriteaccess(thisobviouslydoesn'tgrantanynewpermissions,butisusefulwhenaclienthasalreadylockedaviewerandwishestocallcodethatmayattemptalock).Duetotheorderingofthereadandwriteresources,aprocessholdingareadlockmaynotrequestawritelockonthesameviewerwithoutfirstreleasingthereadlock.Theviewertreeaswellastheparticularcolumnsareanothersetofresourcesthatmaybelocked.Lockingacolumnisequivalentto(butnotimplementedas)lockingalloftheviewersinthatcolumn.Lockingtheviewertreeisequivalenttolockingallofthecolumnsforwriteinadditiontotherootpointerforthetree.Theviewertreemustbelockedbytheclientanytimeatoplevelviewerchangessizeorpositioninthetreethatcrossescolumnboundaries.Sinceallpaintingoperationsareprotectedbyareadlockontheupdatedviewer,theviewertreelockwillnotbegranteduntilpaintingactivityhassubsided.Thehierarchyoflocksintheviewerswindowpackage,fromhighesttolowestis:theviewertree,awritelockonacolumn,awritelockonaparticularviewer,areadlockonacolumn,andareadlockonaparticularviewer.Aclientmayonlyrequestanewlockifisatthesameorlowerlogicallevel.Thedocumentationintheviewerinterfaceshasbeen(willbe)updatedtoshowwhichlockstheoperationrequires,sothattheclientcanavoiddeadlocks.Afinepoint:ifaclientprogramneedstolockmultipleviewers,itmustacquirethelockforeachviewerintheproperorder.Routinesareprovidedbelowthatcorrectlysorttheparameterlistforuptothreeviewers;otherwisetheclientmustorderthelockrequestssoastolocktheviewersinreforder(treatingtheviewerrefasalongcardinalandlockingthehighestfirst).Columnsmustbelockedintheorder{static,left,right,color}.Usersareadvisedtomakeuseofthecall-backoperationsprovidedwhentheyneedtoperformlockedoperationsonviewers,andnottryandusethelockingprimitivesdirectly.Thesuggestedusageistocreatealocalprocedurecontainingthecriticalcode,whichispassedtotheroutinesbelow.Thelocalprocedurewillthenhavefullaccesstoallofthevariablesintheouterprocedure.Painting11pîïb)îQîîñîIî1î ´î#õ î,#î.ÿî2Wî5?î:ÿî@ÊîCßîFnîHcîï`‚ð$î%ôî)Dî-Ó î6ˆî93î<™î?[îAïîCN îI@îï^Úî î¸ î?î—î!Ç î)4î,}î0ñî4ìî8+î;'î@`îC‰îF"îGÞîï]3î©îþîTîgî î#qî$áî(yî)ôî-Îî1pî4¥î7`î<½î>…î@ôîDº îï[Œî#î'¨î)¶î+Ãî.@î3“î8òî<ðî>¼îB�îE¤îH�îïYäî¯î`îœîéîî! î# î(rî+² î3Gî9Íî<îAlîD­ îïX=îrî"îî!hî#,î%‹î*¬î0<î2çî7Åî:%tî ®ïTî(îNî¦pîïPÌî4î}tî ®ïL©pîïI[î! îŠîjî$bî&� î.]î5Êî7³î=rîAºîC£îF<îïG³î;îWî½î �î"?î%.î&Ý î-aî3(î4¶ î:íî?SîBXîDJîH±îïF îîçî4îâîî!©î&Žî+fî.Dî0´î5)î8€î<¾î?yîA8îFÀîïDeîÁî&î!äî$ î(Èî+›î/)î3\î5µî;€î=Âî@'îE¼îH�îïB½î$îîîmîkî!“î#Gî'‡î* î3cî6�î9¥î=î?î@DîD+îIbîïAîŒî†îòîãîÀî!Îî#}î$§î) î+Jî-ªî2¶î8àî:™îA1îCÝîE¢îI5îï?oînî"îÐî0îï<óîöî0îë î‹î% î'Àî(Ðî,¢î1]î4Gî9î:î<òîBRîEâîï;Lî_î îî5îî#ðî&kî)íî.î/´î0ãî5¥î7î: î;½îA1îF îI*îï9¥îsîgîiî„î#(î&£î)+î+ÿ î3²î6î7lî;lî?î@îC¿îFîï7ýîvî¡îîÁîî Íî#Zî&¢î)sî,xî1†î2²î7î:î;Æî>'îC¸îErîGÔîï6VîÄî? î“îºî Œî%•î&½î)Õî,Ìî/Îî2@î7î8;î;¶î>­î@±îCîFŠîï4¯îîòî­î î!'îï24îóîdî3îîîèî£î! î'Qî,×î/8î4Oî6yî8>î>IîA$îD4îF1îï0ŒîJîXî2î‚ î!î"¨î%‡î'à î0î2"î6Úî8®î:Kî<�îA]îBïîE¢îï.åîgîÇî-îðî] î% î&¼î+�î-�î/:î1›î7î9Sî<Òî>�îCðîE îHîï->îÿîdîëîÙîÙî#eî&Oî)ßî+øî0…î2¨î50î9î;àî?-î@îCîFŠîï+–îPîîéî@îî!wî$Nî'1î+×î0á î8ùî<Ãî>ÈîD@ îï)ïîoî‘îšîÑîøîþî"î$~î)åî.¯î1î5�î8\î;bî>î@œîBšîG§îï(Hîrî;î°îï%Íîçîûîµî2îáî Aî%*î*Vî/ñî3Xî8î9Æî=ÿî?åîBEîFªîIÅîï$%îŸîªîÃîÿî_î›î"+î%7î'Pî(Œ î.Ôî3¤î4àî8 î;î=2î>nîCÎîF—îGÔîï"~îîî/ îbî�î!'î$åî'æî*ýî/Ïî0öî3áî6×î86î9Ÿî;4î=‘îA îBÍîF•îï ×î=î îˆî =î"£î' î->î/ºî3î6Hî8¹î>î?ÎîC]îGqîï/înî—î=îî Ïî#.î&ïî)zî-9 îï´î îsîî�î°îvî# î&ñî(¥î+£î1"î6iî7Åî;2î@îB|îEzîG½îï î€î<î©î2îÝî%¼î(î-üî2î4òî:¥î=jî?ÖîFfîH±îïfî/îíî…îöî!/î#�î'lî*ãî.§î1î4î9…î;Xî=î>ÒîAÚîDHîI@îï¾î,î×îSî©î î""î#Æî$çî'÷î-0î/Þî4§î6ýî;²î?ÌîEŸîHþîïîtî"î�î6îÈî!•î%?îïœî î‰î§î~î[î!ùî#Úî&cî,R î3)î9#î=î@:îC¿îE—îïõîŽ îVîvî Òî#£î&2î(tî+Fî-Õî0Nî5< î;ÁîAÇîD¹îïMîî˜îpîœîïî_î% î+îî.wî3î6åî;î<±îA@îCîE¡îï¦îîîÁîî�î"(î%Iî(‹î+î/î0Äî2°î4dî6¿îî@yîD tî ®ï ƒwî)eïö gTVm$uî�î"(î%Iî(‹î+î/î0Äî2°î4dî6¿îî@yîD tî ®ï ±pîï .î4î}vî)eïö ‚TVm$ IconsMenusPragmaticsInterfaceSummaryButtonsButtonsareaclassofviewersthatdisplayatextlabelandcallaprocedurewhentheuserclicksthemouseoverthem.Thisinterfaceprovidesroutinestocreateanddestroybuttons,aswellastheabilitytochangethevisualappearanceofthetextlabel.CaretsImplementorsoftexteditors(andmaybesomeothertypesofeditors)providefeedbacktotheuserwheretextinsertionwillgobymeansofablinkingcaretonthescreen.TheCaretsinterfaceallowsaviewerclassimplementortodisplayblinkingcaretswithouthavingtoworryaboutissuesoftiming,clipping,etc.ChoiceButtonsWhenbuildingtoolsandotherapplicationsusingViewers,clientsoftenrequireuserinterfaceabstractionsforenumeratedtypes,stringparameterstheusercanedit,andbooleanvalues.ChoiceButtonsisahighlevelinterfacebasedonButtonsandViewerToolsthatprovidestheseabstractionsasprimitives.ContainersAclientoftenwishestobuildatoolthatconsistsofseveralviewersassociatedwitheachother.Containersareaverysimpleviewerclassthatpermitotherviewerstoberecursivelyembeddedandscrolled.Routinesareprovidedtoconstrainembeddedviewerstobeclippedtotheedgesoftheparentcontainer.CursorsTheCursorsinterfaceexportsasetofbitmapssuitablefordisplayinthehardwarecursoraswellasprimitivesenablingaclienttocreatenewcursorbitmaps.Thecursorbitmapshavealogicalhotspotassociatedwiththemthatdefinesthesinglepointinthecursorwheretheuserispointing;e.g.forabullseyecursorthehotspotisinthecenterwhereasthetextpointercursorhasitshotspotattheupperleft.DeskTopsAdesktopisaconfigurationofviewersastheyarelayedoutonascreen.DeskTops.Create["name"]12pîïb1î4î}tî ®ï^pîïZÀî4î}tî ®ïV�pîïSOî4î}tî ®ïO, pîïKÝî4î}tî ®ïG»î§vîïDlpîoïAªîŽîëîîVîî" î$áî)œî*Ïî-�î0ôî3´î6Hî7{î>îAÄîD,îG.îoï@îÜîDîkîëî!î&Åî,bî1¼î3xî7ˆî:Mî?.îDŠîFEîI@îoï>\îÏîî¶î^î¾î"© î)Ýî+–î-õî0­vîï; pîoï8K îYî1îî!­î$ýî)Œî->î0üî4¯î6‡î;¦î@ÐîFÁîH�îoï6¤î^îkîî¾î!^î#Dî%5î)nî+î,<î1Ÿî4ñî6íî9Bî>AîAîEIîoï4ýî™î¿î îM î$oî&î*Éî03î4î9î=‘î?<îC/îGîoï3Uî(îÚî€vîï0 pîoï-Eî¶î_îàîÆî#• î+Zî/3î4ñî9eî=(îB îEIîoï+� îEî× î!·î%øî*# î1î43î7�î:aî=Ñî@ÝîFiîoï)ö îÑîeî·îî"sî(Aî,Kî.yî3¸î6˜ î>·îA®îGeîoï(O îðîž vîï% pîoï">îîæî�îþîÁî"vî#µî&–î)zî.�î0]î5î: î@‚îC²îFøîoï — îrîØîî5î!­î&$î)gî,Hî0Ëî4}î9xî;9î== îD4îoïðî îîÏî î%çî'�î-pî4#î9î:­î<—îAqîCîEqîI5îoïHîÏî vîïùpîoï8îGî\îî!Õî"þî%î&Óî, î1!î3]î8î9½î<îB%îFSîHîoï�î- î¨îQî‹î"[î$î(+î+(î/fî5˜î8€î<¾îBîE[îF•uîoïéî½pîƒïéî)ïéîÜîãî!Yî$î(½î+ î.áî2lî4î6Sî:mî>rî@¾îC¤îDüîoïBîÿîDîuîÔî î!pî#íî&íî(`î*î,|î0§î5ðî8Wî;î?æîDîF—îHyîoïšîiîîaîdvîï Lpîoï ŠîÖîÑîî î gî!úî&½î(Eî+/î-]î0àî30î5î6î:Ýwî)eïöÿ,TVm$»îîaîdwîïRpîoï ƒîÖîÑîî î gî!úî&½î(Eî+/î-]î0àî30î5î6î:Ýîowillcreateanewdesktopnamed"name"ifnoneexists.Ifoneofthatnameexists,itwillbemovedontothescreen.DeskTops.FlyTo[desktop]willcausethecontentsofthescreentobesavedinthecurrentdesktop,tobereplacedbytheviewersandiconsinthenewdesktop.EndOpsAbootfileclientmayregisteraprocedurewhichwillbecalledsynchronouslyaftertheCedarbootsequenceiscompleted,butbeforeuserinputisenabledandanyautomaticcheckpointmade.HourGlassThisinterfaceallowsaclienttodisplayanhourglasscursorwithflowingsandandisusedduringCedarbooting.IconManagerThisisaprivateinterfacethatgovernsthebehaviouroficonsinresponsetoselectionandusertypein.IconsTheIconinterfaceexportsasetofbitmappicturesusedtodisplayiconicviewers.AclientmaycreatenewiconsfromeitherabitmaporaprocedurethatmakesuseofCedarGraphicstodisplaytheimage.AclientmayspecifyarectanglewithinaniconthatwillbelabelledwiththenameoftheparticulariconicviewerbyViewers.ImplErrorsArudimentarydebuggerandsignalcatcherisexportedbyImplErrorsthatgivestheuserthechoiceofrejecting,proceeding,orsavingeditsandrollingbackwhenanerroroccurs.Generaluseisnotrecommended.InputFocusInputFocuscontrolsthedestinationofmouseandkeyboardactionsaswellastheinterpretationoftheseactionsthroughTIPtables.Aviewerclassimplementorwouldusethisinterfacetoacquiretype-inortoinquirewhichviewertype-inwascurrentlydirected.LabelsLabelsimplementsaclassofviewersthatdisplayasimpletextmessageinasinglefont.Thelabelmaynotbeselectedoredited,buthastheadvantageoverTiogatextviewersofverylowdatastructureoverhead.MBQueueSomeapplicationsrequireawaytoserialiseuserinputfrombuttons,menus,andtype-inwithouttyingupthenotifierprocess.MBQueuepermitstheapplicationtoenqueueanddequeueoperations.MenusMenusareahorizontalsequenceoftextlabels,eachwithanassociatedprocedurecalledwhentheuserclicksatthemenuitem.Thisinterfaceprovideslowlevelroutinesforcreatingandmodifyingmenus,butnotforassociatingthemwithaparticularviewerorredisplayingaviewerafteritsmenuhaschanged.MenusPrivate13pîoïb)î7îVîœî¦îäî$‡î)Ãî+@î.Ïî3˜î56î7þî9Ôî<¾î@šîDÃîF6îHþîoï`‚î!î}îîuî/pî2Gî6(î8³î>Nî@3îB¾îG#îHþîoï^Úî:îèîGîî!‹î#9î%*î*¯î,ªî/ î3óî6ªî:3î;áî>@îA.vîï\_pîoïYäîîfîíîÊîëî"æî$-î*Íî.øî1Àî3Îî7â îAîDZîFÖîoïX=î�îiîÅ î ¼î#.î'mî*Wî-òî/Nî4jî7î9£î?ê îF×vîïTîpîoïR-î‰î.î[î…î!Eî"óî'¥î)•î/¨î3Öî6ñî;äî? îA×îCBîF~îoïP…î‡vîïM7 pîoïJuî�îîZî îÃî"¥î'Îî*Aî0Ìî2™î65î7öî=¯î?qîE*îGõîoïHÎîvîïEpîoïB¾îNîzî'î î!2î#Uî%î)Ïî/î2Fî3ûî8µî<¾îB�îD#îGêîoïAî`î<î²îî âî!úî&›î(Mî)eî/Öî2’î6¹î9î:Ãî>ÉîDŸîF<îoï?oîÈî£î)îâîàî#vî$™î*oî.­î0–î3”î6[î9î:êî@îC$îE|îI5îoï=ÈîÏ îîî kî"gvîï:y pîoï7·î* î0îgî"Lî&fî+Sî,ìî2Öî5 î<>î?:îBÚîEhîH�îoï6îÅîŽ î’ î# î$áî)*î,‚î/Jî3¿î7î:Üî<Ýî@`îE¢îoï4iîäîPîÅ vîï1 pîoï.X îÔîî‹ î%£î'lî+Öî.žî4·î9dî;#î>!î?ßîBO îoï,±î[îîèîSî"Gî'vî)5î-Íî11 î9‰î=êî@’îCgîI@îoï+ îOîîÅîtî!=î%Kî)¯î.bî1î6ëvîï'»pîoï$úîõ î€îÊî î!öî'î)ïî.Âî0 î4“î7lî<äî>³î?þîD îHîoï#Rîáîûî†îŒîÏî!¨î&Eî(Üî+gî-Üî4iî7™î;Žî>\îC[îE)îHNîoï!«îtî1vîï\pîoï›îC î×îžî Åî#›î%Gî*pî-gî1î4uî9Áî>|îA2îEâîoïóîCî¬îcî˜î#õî*ùî0Eî2û î:dîî Øî#8î(cî-ýî/«î4&î5Pî91vî)eïÿ+TVm$$Aprivateinterfaceenablingthewindowmanagertoinvokeamenuitem.MessageWindowThemessagewindowisaone-linedisplayareaatthetopoftheblackandwhitedisplay.Clientsmayusethisinterfacetodisplaypromptsorotherinformationtotheuser.RulesRulesareasimpleviewerclassthatdisplayasarectangleofasinglecoloronthedisplay.Theyareusefulforcreatinglinegraphicswhendesigningthelayoutoftools.TypeScriptThisisalow-levelinterfacethatcapturessequentialtype-infromtheuser.ClientsareadvisedtousetheIOstreamsinterfaceinstead.VBootOpsAclientmaybootaparticularvolumeorfilewiththisinterface.VFontsVFontsmapsafontnameintotheactualrepresentation,withoptionstosynthesizeboldanditalicaswellastosubstituteforfontsthatarenotavailable.ViewerAdjustAprivateinterfaceusedtocontroluseradjustmentofviewerorcolumnsizeandposition.ViewerBLTAviewerclassimplementormaymovedisplayedbitsfromonepartofaviewertoanother,withclippingtotheviewerboundariesandalmosttheperformanceofthehardwareBitBltinstruction.[Thisinterfaceisnotcurrentlysupportedandshouldnotbeused].ViewerEventsViewerEventspermitsclientprocedurestoberegisteredthatwillbecalledwhencertaineventstakeplacewithrespecttoaviewer,suchassave,newedits,openorclose,movetoanewcolumn,andchangesintheinputfocus.ViewerMenusAprivateinterfacecontainingmostofthemenuitemsfoundintheviewercaptionmenu.ViewerClassesViewerClassesisanimportantinterfacethatdefinestheviewerclassandinstancedatastructures,aswellasmanyofthebasicViewersprimitivetypes.ViewerLocksThisinterfaceprovidesreadandwritelockingofviewers,columnsandtheentireviewertree.[Thisinterfaceisnotcurrentlysupportedandshouldnotbeused].ViewerOps14pîoïb)îüî˜î>î Øî#8î(cî-ýî/«î4&î5Pî91vîï^Ú pîoï\îCî–î½î$îIî$œî)Jî,>î-Òî0-î2žî4Sî6®î:Sî=î@ÂîFGîoïZpîsîèî‰î/îÞî#�î(ÿî*Ãî.b î5ìî7šî9úvîïW!pîoïT_îRî¨îÔî;î¢î"Õî%¥î*Zî, î-6î3î4Ðî5üî9éî=iî?qîAÓîGfîoïR¸îÃîÛîîPî î%uî)*î/Sî1³î5áî7švîïOh pîoïL¦îƒîéî îâî ‚î#Kî(´ î/1î3Þî7?î9˜î=bîBîDQîI@îoïJÿîäîDî`îTî úvîïG°pîoïDîîüî¼îÀîðî î"Pî'9î(ýî+fî.�î1# vîïAžpîoï>Üî@îÑîíîÍîî"Jî$›î(‘î1Òî4ßî9°î;Q îAÅîDèîG’îoï=5îî î¹îg îžîÛî#Nî&î(pî*å vîï9æ pîoï7#îüî˜î>îzî (î$Ûî'Ô î.çî0 î5î6Èî;½î>iîA vîï3Ôpîoï1îîjîŸ î Èî#Ñî'•î-¸î0^î3Êî6{î9cî;!îDîBîFµîoï& î[îãîðîŒî-î Jî$úî(î)¿î-î/ïî3�î6çî8�î î!÷î%Tî' î)lî-Mî0÷î5î6²î9î=wîBVvîï pîoïA î[îÇî¹î"î'Âî*‘î/Pî1±î6î9Hî<îAOîDU îoï™îî î¹îƒî<îœî!î&Eî,,vîïJ pîoïˆî°î|î1î!rî$Pî'ôî,íî.Ìî44î9Ôî<±î?7îCJîGÕîoïáîìî’îþîsî"Pî(Èî+î/ûî2pî4avîï ‘wî)eïö3TVm$¹ûî2pî4awîï¡pîoï Üî¾îhî–î!6î'î,Æî2Ÿ î9‹î;ÏîBîH îoï 5 î´î6îþViewerOpsisanimportantinterfacedefiningstandardoperationsonviewers.Routinesthatmanipulateviewersizeandposition,registernewviewerclasses,createnewviewers,aswellasmostpaintandinputnotificationslivehere.ViewerSpecsScreenlayoutconstantsaredefinedintheViewerSpecsinterface.ViewersStallNotifierBugbaneusesthisprivateinterfacetonotifyViewerswhenaprocesshasbeensuspended,pendinghandlingofabreakpointofanuncaughtsignal.ViewerToolsViewerToolsprovideslowlevelaccesstothecontentsofTiogatextviewersandpermitsclientstocontrolselectionandeditingwithinthem.SeetheChoiceButtonsinterfaceforcreatingtextpromptfieldsandotherhigherleveluserinterfaceabstractions.ViewersSnapshotClientinvokedCheckpointandRollbackroutineslivehere.VirtualDesktopsThisinterfaceisbeingreplacedby"DeskTops".WindowManagerWindowManagercontainsamiscellaneouscollectionofroutines,themostimportantbeingtheabilitytoenableanadditionalcolumnofviewersonacolordisplay.WindowManagerPrivateThisisaprivateinterfacecontainingthecurrentviewertreerootandsomeinputnotificationroutines.15pîoïb)î¾îhî–î!6î'î,Æî2Ÿ î9‹î;ÏîBîH îoï`‚ î´î6îþî Óî&Šî+…î.�î3î7áî<î? îDjîF6îI@îoï^ÚîÌîUî î· î$„î'$vîï[Œ pîoïXÊîëîî î `î%`î'î)n î1r vîïU{pîoïRºîîî’îî$²î&Pî*Aî/fî3 î4"î8åî;Iî>” îE–îoïQî+îäî îþî ·î"§î(§vîïMÄ pîoïK îaîëî†î"Æî&Îî(wî*Òî0;î1ïî5Éî8|î=_î@îEîI@îoïI[î`îCî9î"î&—î+xî.Lî0ê î:bî@FîBÁîH7îoïG´îYîîÅîeî"´î%úî(óî.™ vîïDepîoïA£î’îÔ î 3î"êî(¼î. î0©vîï>Upîoï;“î‰î/î›îeî"êî$æ vîï8E pîoï5ƒ îdîìî!: î* î0mî2Jî8î:˜î>îDŸîH�îoï3Üî¨îWî¼î¬ î"$î'î(Òî-»î/Áî0ëî4hvîï0�pîoï-Ëî´îKîŸîgî 7 î'î)¦î.šî3*î6î90î<î?ÐîC¦ îoï,$wî)eïýÿTVm$…›îeî"êî$æ wîï;“ pîoï8Ò îdîìî!: î* î0mî2Jî8î:˜î>îDŸîH�îoï7*î¨îWî¼î¬ î"$î'î(Òî-»î/Áî0ëî4hwîï3Üpîoï1î´îKîŸîgî 7 î'î)¦î.šî3*î6î90î<î?ÐîC¦ îoï/svî)eïýÿaTVm$Lÿ TIMESROMANþæÿ HELVETICAþŸÿ TIMESROMANþŸÿ TIMESROMANþŸÿ TIMESROMANþYÿ TIMESROMANýÌÿLOGOü´ÿ TIMESROMANþÿ TIMESROMANþŸt Ô 7 ** €5 ? ¹J SJ[ Ég Vs.yì�,‡y‹j/ŽŒ›ÔwÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿViewerDoc.tioga 3-Jun-83 15:53:43