Inter-OfficeMemorandumToCedarInterestDateNovember5,1982FromScottMcGregorLocationPaloAltoSubjectTheViewersWindowPackageOrganizationPARC/ISLXEROXFiledon:[Indigo]Documentation>ViewerDoc.TiogaandViewerDoc.Press.Documents:[Indigo]Viewers>Viewers.df,asexportedbytheCedarbootfile.TheViewersWindowPackageDisclaimerThisdocumentiscurrentlybeingwrittenandhenceisincomplete.ItreflectsthestateoftheViewerspackageforCedarversion3.5.Youmaybeabletofindamorerecentversionon[Indigo]Viewers>ViewerDoc.tioga.IntroductionTheViewersWindowPackageisthearbiteroftheuserinputanddisplayhardwareintheCedarprogrammingenvironment.Itprovidestheillusiontotheprogrammerthatthereisaprivatedisplay,mouseandkeyboardassociatedwitheachapplication,whileallowingtheusertosimultaneouslyinteractwithmanysuchapplications.Thebasicobjectmanipulatedbyclientprogramsandvisibletotheuseristheviewer;arectangularareawitharbitrarycontentswhichmaybemadevisibleontheuserdisplay.AviewertakesitsnameinthatitallowsthehumanusertoviewandinteractwiththedataassociatedwithaCedarapplication.Theunderlyingapplicationssoftwarehascompletecontroloverthedisplayedcontentsofaviewerandhasavailablearichuserinterfaceforuserinput.Thescreenpositionandsizeofaviewermaybemodifiedbytheuseraswellasunderprogramcontrol.ThisdocumentationiswrittenfortheprogrammerintendingtousetheViewersWindowPackagetobuildanewapplication.ItisorganisedalongthebroadareasoffunctionalitythattheViewerssystemprovidesandattemptstoexplaindesigntheoryandsomepragmatics.Forexamplesofusage,seethereferenceswithineachsection,andforexactdetailsconsulttheinterfacesdirectly.Onepointofnotation:usedthroughoutthisdocument,clientreferstoaprogramcallingtheViewersinterfaces,whereasuserreferstothehumaninvokingViewersoperationswiththemouseand1pqîdïa¸ î"ã pî Mï]Ðîdï]Ðî|î-ï]Ðî7fï]Ðî>8î?Åî MïYçîdïYçîãî-ïYçî7fïYçî:î MïUþîdïUþî<î sî&î-ïUþ î7fïUþrî{ïNQpî MïDRîëîdïDRð,î6Åî9|î Mï@i îdï@ið"î.ˆî06î5òî7îî:Mî>eîA–sîçï8î!uî)©î23tî ®ï3 pîï/§îîgî¼î�î"5î&Ñî)qî-Qî.¦ î6eî7Åî´îAÎîCpîE¸îï.îóîÒîŒî öî%Rî)î,©î/<î2×î5'î8¸î:ƒî>¹îC~îHèîï,Xð.tî ®ï(% pîï$ÄîýîIîîî!Rî"Ôî%Iî)Ðî+ î.î1%î4æî7´î<}îBœîD`îFÖîï# î‰ îDî £î&î(bî-(î.¿î1 î8Ñî;‡î>ùî@MîA_îEãîï!vî”îwî« î"Cî%‰î(æ î0|î4\î: î<–î?ºîA” îïÎîîîéî îïFîæîXîq î _î"Zî&î,,î.ãî31î4ßî7>î:7î;¢uî>ïFî>›ïFpîA ïFîB�ïFîCÆ îïŸî,îlî6îÉî#üî'$î):î-î1’î3½î6Aî9_î?7î@èîErîIîïøîãî¦î‰îôî6îªî#gî&uuî(9ïøî(Ôïøpî+Rïøî+øïøî.î3)î6Yî8Íî;ç îBhîE˜îFÖîïP îýîÕ îÆ î'\î,Öî/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Ëîï ƒîŠî î»î'î!€î&�î)|î+âî/“î4 î8ðî;x îAÊîGêîï ÜîÑî­î¸î î$dî'(uî.ï Üî.¬ï Üpî1ãï Üî2hï Üî5Üî7®î8ûî>­îC5îE¸îï 5 îÖuî^ï 5îï 5pî‰ï 5î ï 5î!¤î#˜î&>î+,î1!î6� î=‘î@òîC—îH7vî)ÈïöÿáTVm$õkeyboard.ScreenLayoutTheUserDesktopFromtheuserpointofview,theblackandwhitescreenisdividedintofourareas.Thetopquarterinchofthedisplayisusedforthemessagewindowandasmallsetofsystemcommandbuttons.Thebottomofthedisplayisavariableheighareareservedfordisplayingicons,whicharesmallpictorialrepresentationsofnormalviewersmadeiconictoconservescreenspace.Theremainderofthedisplayisdividedintoleftandrightcolumnswithamoveablepartitionbetweenthem.Theusermayoptionallyattachacolordisplay,whichisequivalenttoanadditionalcolorcolumn.Unlikemanywindowpackages,viewersmaynotoverlap,butinsteadspreadouttocoverasmuchaspossibleoftheavailablespaceontheuserdisplay.Withinacolumn,theheightofaparticularviewerisdeterminedbysatisfyinganumberofconstraintssetbytheViewerssystem,theimplementingprogramandtheuser.Viewersconstraintsincludebalancingofthecolumns;i.e.viewerswillbeexpandedsothattheentirecolumnareaisused,andthatnoviewerissmallerthantheheightrequiredforthecaptionandcommandmenuatthetopofeachviewer.Aclientprogrammayspecifyaheighthintintheviewerinstance'sopenHeightfield,whichwillbehonoredifitdoesn'tconflictwithotherconstraints.Inaddition,theusermaysetaheighthintthatoverridestheopenHeightvaluebyinvokingtheAdjustmenucommand.User-sethintsarediscardedwhenaviewerismadeiconic.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.MultipleDesktopsEachtreeofviewerscorrespondstoauserdesktop,onlyoneofwhichisdisplayedatatime.Viewerssupportsninedifferentuserdesktopsandprovidesaninterfacetomoveviewersfromonedesktoptoanother(seeVirtualDesktops.mesa).Theusermayexaminethecontentsofallofthedesktopssimultaneously,orselectadifferentdesktoptoviewbyinvokingtheFlysystemcommandbutton.Thedesktopdisplayisreplacedbyascaled-downgraphicalrepresentationoftheninedesktops,whichmaybeexaminedindetailwhenclickedwiththemouse.CedarGraphicsprovidesthefunctionalitytorenderatruescaledrepresentationofalloftheviewercontentsoneachdesktop,butthegreyrepresentationusedprovidesgreatlyimprovedperformance.Whenmovingfromonedesktoptoanother,alloftheviewersinthestaticsubtreearecopiedtothenewdesktop,leavingtheleft,rightandcolorsubtreesbehindintheolddesktop.Thestatic2pîïb)tî ®ï^î(wîïZ×îçî8pîoïXîlîóîîÚî»î"uî$üî(Îî+­î/•î3öî5‰î:¦î=¥î@ÑîEyîHyîoïVxîPîmî2îŸî ^î!Öî%î'iî)Õî/9î4qî75î8lî<î>@î@îD�îoïTÑîQî1îîÃî!*î%åî'Yî(Šî-Éî1œî4�î:îuî@?îB¯îH²îoïEîsî9îEî î!î$iî&ãî*êî/úî3î4”î8Dî;î=ÿî@ îD îF&îoïCtî“îðî(îµî ðî#Mî(*î*ßî1>î5î6³î9î;ƒî=9î@hîE¤îG.îoïAÌîäîÎîQîaî!�î$Kî%ßî(%î,p uî2€ïAÌî31ïAÌpî9ªïAÌî:#ïAÌî=îA îCžîEuîoï@%îî‘î„î¤îôî#È î+éî-îî3êî6î9­î<æî?9î@˜îEîH îoï>~îªuîRï>~îï>~pîßï>~î �ï>~î#Ñî&î,uî.¶ï>~î/´ï>~pî3Fï>~î4oï>~î7oî?>îDêîH›îoï<ÖîšîOîyîÝî Iî$ îÐï:[îÂî¥ î"�î%çî(vî+‰ î2ìî5óî9' îB¦îH²îÐï8´î¨î*îFî!î¤î#üî)Ðî.±î1Íî4Oî82 î?ÖîCaîH�îÐï7 î#îõînîqî!Zî%(î&ïî*…î,þ î3Ü î;(î>rîBðîDuîHCîÐï5eî�îˆî‚î ¶î&Jî+sî0èî5¤î9Ïî?QîAïîG9îÐï3¾îîÈî,îñî$Oî&î)šî-1î.ïî1Sî6Aî7ôî:XîDFîI@îÐï2îæîoï/œ î#î“îgî1î"+î#¨ î*Àî-©î0¿î6� î?ˆuîAHï/œîAÌï/œpîDðï/œîEjï/œîoï-ôîîîîM î#�î'î,Wî.bî0Æî5Õuî89ï-ôî8œï-ôpî:žï-ôî;9ï-ôî?ðuîBTï-ôîBØï-ôpîE¡ï-ôîF<ï-ôîoï,Mî+uîŽï,Mî)ï,Mpîúï,MîÁï,Mî�î"Ëî$}î&àî*nî/Gî4*î6î:î®î@]îD5 îoï#5îžîhî0î“îhî î íî"·î%tî'>î+Åî/‹î1úî86î<úî?vîE…îGOîoï!�îèîåî§îäî í î(‹î*þî/Åî1’î3–î6®î9mî<œî?îB'îE‚îGõîoïæîÝî=îŠîNî#»î%«î( î,ôî0[î3)wîï¢î§pîoïêî îõî×îè î$²î&‰uî'Ûïêî(˜ïêî*èpî/Oïêî0Tïêî3–î6kî8Lî<‚î>îD^îFîGqîoïCî”îîî"²î%šî+/î-Öî3Tî54î:Èî½ïôpî@.ïôî@²ïôîD�îoïMîóîæî"î!ðî#wî)î+-î,r î4eî:s îC†îEZîGÔîoï¦îNî<î!îòî$î%¡î)Mî,âî1kî4fî6§î;žî?—îE_îoïþî î>î!î ¼î"î%4î)� î2®î4œî6Áî8¯î;Dî?ÞîE‚îG½îoïWîéîjîÉîØ î%Ïî) î.šî3 î9U îoï Üî�î†îóî¤î#Ëî%î*çî,Ýî.›î1î5ïî7¢î:î=–îBpîDÉîI@îoï 5îÕîÊîJîî!tî$Hî' î*^î-âî3Aî7ðî9¥î< î>{îD†îGevî)Èïöÿ ˜TVm$Øviewersincludeimportantsystemcommands(e.g.theFlybuttonandthemessagewindow)aswellasalltheicons.OneinterestingViewersmodificationwouldbetotocopyonlythoseiconswhichareselected,givingtheusertheabilitytoleaveiconsonmultipledesktopsattheexpenseofhavingtodesignateapotentiallylargeseticonstocopy.ViewersThedisplayofaviewerconsistsoftwonestedrectangles.Theouterrectangleboundstheviewerwindowoverhead,consistingofspaceforanoptionalblackborderaroundtheviewer,anoptionalscrollbarspaceontheleft,ablackcaptionbaratthetop,andanoptionalmenubelowthecaptioncontaininganarbitrarynumberofmenulines.Theinnerrectangledefinestheviewerclientarea,whichisavailabletoanapplicationfordisplayofitsdata.Eachviewerhasaparent,asiblingandachildviewer,anyofwhichmaybeNIL.Viewersmayberecursivelynestedwithin(i.e.childrenof)otherviewers,inwhichcasedisplayofthecaptionandmenuwillbesupressedandnospacereservedintheouterwindowrectangle.Thecoordinatesforthewindowandclientrectanglesarecomputedwithrespecttotheenclosingparent'sclientrectangleorigin.Iftheviewerhasnoparent,itisknownasatoplevelvieweranditsrectanglecoordinatesarewithrespecttothelowerrighthandcornerofthedisplay.Aviewermayextendoutsideofitsparent'sclientrectangle,inwhichcaseitwillbeclippedduringdisplay.Siblingviewersmaynotoverlap.ViewerClassesTheViewerspackageallowstheprogrammertocreateaclassofviewer,allinstancesofwhichwillsharecodeforcommonoperations.Aviewerclassisarecordthatdefinesasetofoperationsandparameterscommontoallviewersofaparticularuserdefinedtype.Forexample,theTiogadocumentpreparationsystemcreatesaviewerclassforalloftheeditabletextviewers,sothateachinstanceofaTiogaviewerusesthesamecodetodisplay,scroll,acceptinputfromtheuserandsoforth.Aviewerclassrecord(asdescribedinViewerClasses.mesa)containsthefollowinginformation:flavor:ViewerClasses.ViewerFlavor_NIL;Eachclasshasauniqueatomwhichassociatesanamewiththeclassrecord.init:ViewerClasses.InitProc_NIL;Duringthecreationofanewviewer,thisprocedureiscalledinordertopermittheclienttoinitialiseprivatedatastructures.paint:ViewerClasses.PaintProc_NIL;TheViewerspackageassumesthatthebitmapiswrite-onlyandthattheclientcanreconstructitsscreenimageondemand.Whenevertheinformationonthescreenforaparticularviewerbecomesinvalid,thePaintProcwillbecalledbythesystemtorestorethecorrectdisplay.ThePaintProcispassedagraphicscontextclippedtotheboundsoftheviewer,awhatChangedparameterwhichtheclientmayusetoencodeprivateinformationaboutwhattoupdate,andaclearbooleanthatindicateswhethertheviewerhasbeenwhitenedbeforethepaintcall.Thereisacompletesectiononpaintingfurtheroninthisdocument.destroy:ViewerClasses.DestroyProc_NIL;TheCedargarbagecollectornormallydeallocatesstorageassociatedwithaviewerwhenitisdestroyed,butsometimesaclientfindsitconvenientornecessarytofreeresourcesornotethedestructionofaviewerinstanceexplicitly.Thisprocedureiscalledjustbeforetheviewerisremovedfromtheviewertree.3pîoïb!îFîîdî#Îî*¡î-’uî/àïb!î0¼ïb!pî28ïb!î2ÿïb!î6˜î9=î;‹î@ÑîFdîHîoï`yîîðîAîˆî~ î#(î(P î0Fî4eî6Hî7çî9‡î<Ëî?ÖîCfîFàîoï^Òîïî îïî{î!¡î$-î(’î*mî."î1Öî4 î9¯î?�îAFîCÒîI5îoï]+îêî™î¢îË î#›î'î)î,§î.UwîïYÅpîoïVíîCîòî¨îÎî.î#+î$àî'ˆî+Ô î3 î5Þî9yî?RîD.îFŠîoïUFuî•ïUFîEïUFpî¸ïUFîŽïUF î Þî"‘î&@î(wî*bî/¿î3cî7Ùî<‘î>êîC¡îE‹îoïSžîùîžî“îâîŸî ¸î$Rî)!î+…î- î/]î2î4Àî6 î;óî?ÄîCÀîFîoïQ÷ î îî¤î"Èî$xî(Pî,Vî/%î2»î8�î=Dî?›uîC÷ïQ÷îD’ïQ÷pîG�ïQ÷îHCïQ÷îoïPPî}îéî¤îRîB î%Tî'’î,Dî-ýî/ØîoïMÄîìîZîØî î½î ðî%jî(*î)^î,Úî1¡î4Kî6 î:%î=2xî?,ïMÄî@ïMÄpîA8ïMÄîB«ïMÄîGêîoïLîj îYî²î!î#Àî).î+jî/î4^î6î:.î=&îAãîC¥îFîoïJuî&îî³î¤î Ùî#�î%–î)Lî.Åî0sî2Òî6qî;� îoïGéîJ î•îÕî7î#eî&î)â î0Eî2›î9 î<(î@ÓîB„îDæîoïFBîœî\î9î#î$™î&øî+]î-Óî/Ùî4�î5Øî7Dî;Êî=xuî>¢ïFBî?ïFBî@øîDpîH7ïFBîHÜïFBîoïDšîGî" îhî ¹î#Òî(xî*$î,�î0Iî3™î7î;bî=î?vîDÿîFŠîoïBóîlîàî¢îTî'î$Lî( î.2î/Ùî3ßî6Æî8î:¹î<¢îA{îEäîoïALî"î îî„tî ®ï=î(pîï9­îíî)îqî¤î" î)òî+§î/¯uî0ßï9­î1zï9­pî4 ï9­î4Üï9­î5ßî:¢î<˜îBpîD/îHCîï8îµîîIî î$šî&.î*šî-Óî/Fî0xî4Ïî7¥îXîDlîGîï4·î} îÞî Zî$ãî&î*uî-¦î/åî1×î3’î5óî;,î=åîC(îDíîG½îï3îbî"îRî8î£î!£î$ î'Œî*Úî,Žî1 î5¨î9éî=šîAîCmîFmîI*îï1hîï.Üî›îî0îî§î#Ñî%î24î7—î9÷î@ îoï,Pîßî%.xî&»ï,Pî'¤ï,Ppî(Çï,PîÐï)ÄîCîsîèîîºî#8î'F î-oî.™î2Yî5tî7Óî;îoï'8îhî sxî"ï'8î"éï'8pî$ ï'8îÐï$¬î¬î îvîBî €î#�î(Rî+î1žî3î7(î8êî<²î>tîBùîElîI@îÐï# îHîåîê îoï yîrî"oxî#üï yî$åï ypî&ï yîÐïíî¯îíî6î#Šî&_î(Æî-�î.ó î5‡î8Fî;î=‚îAIîCÛ îÐïEî¶îûîî%î#eî*î,s î4 î6î8†î<Êî?î@H îFŠîÐïžîkîTî´î#ôî& î(‘î,ˆî.„î0äî5`î7î;•î=õîB‡îHîÐï÷î7îËîXî©î$?î);î.Cî0î2 î7¦î9‡î<î@òîBD îÐïOîMîVî°î!kî$jî&Úî(„î-1î1É î9Nî=+î@ƒîB,îGîIÅîÐï¨îîKîî!½î'î)^î-¼î0+î3�î9nî=·î@îC“îFìîÐïî<îeîMîêîðî%Tî)üî,î-°î0Rîoïuî¼î%Rxî&ßïuî'Çïupî(êïuîÐïéîÅîûî9î"æî(Ô î/âî4± î;;î>sî?»îD=îHîIƒîÐï A îiîëî ¥î!Ðî%‘î)î*\ î1Yî3î92î:âî=°îC®îEsîH�îÐï š îîÛîîžî% î+ýî/1î5Îî7Tî;eî>!îBŠîEîIƒîÐï óî€îçîFî «vî)Èïÿ -TVm$%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,scrollingdown,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;4pîoïb)îêî#²xî%?ïb)î&'ïb)pî'Jïb)îÐï_©î�î{îºî"œî&:î(Ðî,î-£ î7î8ùî:Zî>õî@ÚîB;îD¯îFŸîÐï^îúî¨îÑîîîVî""î$�î)úî-*î2‹î5¥î<(î>Óî@ÃîDºîÐï\ZîÀîkî î]î‡ î#½î(!î)�îoïYÚîbî âxî"oïYÚî#WïYÚpî$zïYÚîÐïWZî}î^î_îëî5î“î l î(qî.Lî2Çî5žî;Ç îB•îE�îF×îI5îÐïU³î îDîçî :î$¾î(ßî+'î-zî2 î4î8î;*îA‹îE*îG[îÐïT îoïQŒî¦î$ùxî&†ïQŒî'nïQŒpî(‘ïQŒîÐïO î6îÙî @î"?î#aî'¾î,•uî.íïO î/PïO î2hpî5àïO î6§ïO î<î?õîCîIƒîÐïMdîÕîîNî Àî$î%ðî+aî-Îî1†î53î6ïî:±î?î@—îFîG½îÐïEîŸîÞîJuî8ïEîèïEpîSïEîùïEuî" ïEî"ÑïEpî$ïEî$ÀïEî*ßî-ùî/ÿ î7'î9Þî<Ëî?@îCîH7îÐïCnuînïCnîÝïCnpîWïCnîïCnî î&]î+éî.‡î1³ î9|î>6î@fîFJîH�îÐïAÇî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îÐï9yîÌî5î&îˆî9î"¡î%8î*Ôuî-lï9yî.ï9ypî/‰ï9yî0Pï9yî6Cî9î;¨ îBóîE&îG¾îÐï7Ñ îõî£î³î îoï5Qî’î"èxî$tï5Qî%]ï5Qpî&€ï5QîÐï2ÑîÀ îqîõî î#8î%Aî+ƒ î2v î;…î=LîBèîEkîÐï1*î#îŸî~îØ î%>î)î*áî-qî0¦ î6ëî8àî>ÖîAfîEWîG5îIîÐï/ƒî™îBî_î" î$iî(î*$î,Ûî0„î4N î;Tî=³îB¾îG#îH�îÐï-Ûî´îïî 2î!ïî' î(�î* î,+î-èî0Vî4$î5áî;•î>îCîFFîÐï,4î˜îøî'îE î$øî)î,î1Kî4i î:Ãî=”îB‚îHCîÐï*�îîs îÝî &î%î)hî*½î- î3Ôî5kî8ýî;¾î>îBÍîDòîFÀîÐï(åî¡îaîƒîôî{î Eî"¶î'{î*zî-dî/Õî2ë î9tî;4 îBXîDeîF×îÐï'>îÞîî_î#íî&ñî)‡î-|î1áî4Ãî:©î=îC$îEîG�îÐï%— îÄîpîÍ î$°î&gî(Äî+Æî1ãî3yî5Õî8Hî:ýî?ÄîAzîC×îH²îÐï#ïî-î‰îrîsî!,î$zî)î+yî/6î3aî7Œî8½î;qî>Ûî@ZîB¶îFrîÐï"H î¾îxîëî#ì î+jî-Bî2aî4êî7î:?î;©î>ÁîCEîG‡îÐï ¡î/ îÇî|î î&Gî'³ îoï!îÊ î;xîÈï!î±ï!pîÔï!îÐï¡îRî¬î¥ î î$¹î%Øî)®î+]î27 î9vî;ËîAqîCýîFRîÐïùîÖîhî¥î8 îoïyîíîoîüîÐïùîíîî†î÷î Vî"»î&€î,Åî.6 î5dî8!î9’î>JîDnîF!îGPîÐïRîø îiîŒî" î)@î+„î/Éuî2ÉïRî3cïRpî6�ïRî7ïRîîA¢îDèîGêîÐïî§î3 î Ü î&lî(•î-(î/´ î6Æuî8¡ïî9Rïpî<�ïî=™ïîAÔîD¬îH�îÐï\îDîî î!î"Ùî$ðî)Dî+E î3kî4þî7n î>cî?ßîDåîHîIƒîÐï µîâî‘îðî°î_î wî#Eî&Uî(©î,«î/bî2ë îoï 5îî •î"" vî)Èïöÿ TVm$RViewerswilldisplayacursorwhenmovedoveraviewer,determinedbythevaluehere.TheCursorsinterfacehasanenumeratedsetavailable,aswellasaninterfacetocreatenewcursors.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;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,with5pîÐïb)îîÍî�îÄî#î&Ãî+Wî.~î/¶î4€ î;×î=àî@MîDîHîÐï`‚îáî‚îòîÞ î'dî)} î/‹î14î4î5Çî7²î=Sî>ýîBûîEäîï^î îBîËî î"úî%rî)ƒî-’î0óî2Üî5uî;w îDîîH›îï\[ îèîî? îoïYÜîìî!�xî#)ïYÜî$ïYÜpî%5ïYÜîÐïW]î¬î£îî î"Æî%*î(îî*^î0î1Ñî5Rî7¶îúîAl îHîIÅîÐïE î+îjîµî!ëî%î, î.çî5�î8mî<î>¡îC§ îÐïCuî¨îîëî"Qî#½î(œî*Kî,ªî1Šîoï@öîÅî$Âî&OîÐï>wîÑ î¿î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ºîÐï9� îFîoï7 xîSï7î ï7pî]ï7xîêï7î£ï7pî"ˆï7îÐï4ƒîêîVî3îoï2xîÓï2îŒï2pîÝï2xî!jï2î"#ï2pî%ï2îÐï/…îêîVî3îï-î“î îzî5î\î8î!¤ î)Öî+œî,Óî1Dî4�î7î;Ïî>}î@CîB¯îFqîGÞîï+^î¡î"îÜîóîÍ î% î-˜î0î4‹uî7Bï+^î7òï+^î93î;‹î>àpîBoï+^îClï+^îE–îï)·îîþîÌîÒîGî#-î$V î*Œ îï'8îH îŒî!uî$î(Pî.î2©î6 î=œîA¶ îIÅîï%‘î!î$î'bî,î@îE$îG¾îï#éîtîBî‚îAîÔî"ùî'Sî)Éî,Íî1î46î:vî?î@SîE€îï"Bî[îy îî¹îHî#7î'îî,@î1ÿî4ºî7î;¦îA†îFîï › îRî]îï îØî!(î#�î(Zî.¶î0•î2Ùî7±î9õ îA»îE îïóî`îîÕîÅîÐî$4îïtîªîî§îoî%¶î)| î1Dî3}î8ñî=1î@ËîCËîHèîïÍð'tî ®ï¥î(pîïQî¾îùî½îaîÞî"Hî(+î+@î-Bî2î6<î8ùî={ îEîH�îïªîAîKîî‹ î!�î&î*uî.¬î0mî2àî6î;-î@KîE¬îï î2îxî¿î œî#½î&eî6Rî;Bî=¿îA îCáîGéîï[îLî«îï Üî±îî$Sî&Èî)â î0dî3•î6Üî;VîA«îFŠîï 5î¯îîÛîæ î"eî%þî'½î*#î.6î0œî5Ùî;!î=Ó îCRîGÓvî)Èïý ÚTVm$Otherestdefaulting.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,sincethecolumnconstraintalgorithmswillrecomputethesevalues.SinceviewerpositionandotherinformationiscachedbyViewers,clientsshouldneverdirectlysetanyoftheviewerrectanglevalues,butinsteadshoulduseroutinesintheViewerOpsinterfacetochangethesizeorpositionofaviewer.Theviewerdatastructuremaybelockedwithnon-exclusivereadorexclusivewritesemantics,makinguseofthelockdatastructurewithineachviewerinstance.Theclientshouldneveraccessthisfielddirectly,butshoulduseroutinesprovidedintheViewerLocksinterface.Amoredetailedtreatmentoflockingmaybefoundelsewhereinthisdocument.lock:ViewerClasses.Lock_[NIL,0]TheTIPTabledefineshoweachviewerinterpretsmouseandkeyboardinputandiscopiedfromtheclassrecordwhenavieweriscreated(thereisalatersectiondescribingthemouseandkeyboardinputmechanisminmoredetail).Insomecases,theclientmaywishtochangethebehaviourofaparticularviewerandmaydosobymodifyingthisfield.Afinepoint:ifaviewerownstheinputfocus,thenitsTIPTableiscachedbythenotifier,whichpresentlymustberesetbyreleasingandthenrecapturingtheinputfocus.tipTable:TIPUser.TIPTable_NILEachviewerhasatextnameassociatewithit,whichinthecaseoftoplevelviewers,isdisplayedinthecaption.Theclientmaymodifytheviewername,butmustbesuretorepaintthecaptionifapplicable(viaViewerOps.PaintViewer[viewer:viewer,hint=caption]).name:Rope.ROPE_NILSomeviewerschosetoassociateabackingfilewiththeirdatastructures.Whilethislogicallybelongswiththeimplementorsdata,itappearsintheviewerinstancedataasaconveniencetoclients.Itmayberemovedinthefuture.file:Rope.ROPE_NILAtoplevelviewermayoptionallyhaveamenuofcommandspermanentlydisplayedbelowthecaption.Ideally,theclientshouldpassamenuwhenavieweriscreated.Toaddamenutoanexistingviewer,theclientmustuseViewerOps.SetMenutoresetinternalrectanglecachesandtorepaintthenewmenuonthedisplay.6pîïb)îgî îQî"î#³î%eî(î,•î2vî4Ïî7Íî=ƒî?*îB¶îFÒîIƒîï`‚îÖ îîîÃîûî!Ê î*—î+Ïî0Bî3�î5Sî:˜î;Ðî>«îE]îG$îï^ÚîÉîï\@î�îæî3î!sî"�î'fî*¬î,[î.5î1fî4kîoïY¥î îÚxîfïY¥îOïY¥pîïW îÒîîî îb î�î uî%—î)óî/,î4Zî6þî<îAoîC™îEäîïUdîÇî'îïRÉî�îî�îe î%: î+îî.jî2%î8vî:Jî<ÆîAFîDîE_îïQ"îZîøîñî ¬î"é î)vî-6 îoïN‡îúîîàxî¢ïN‡î ïN‡pî LïN‡î!ÙïN‡îoïKíî—îCî¸xîïKíî�ïKípîÁïKíî NïKíîïISîôî4îøî8îúî Aî"®î' î(Ñî+=î/°î2Øî7Žî9Iî;1uî@kïISîAïISpîD'ïISîDãïISîIîïG«î•îªîŠîÚîvîãî!Çî$ î&þî)Wî,)î.Aî1‚î6Rî8'î:­î?�îB9îF¯îH�îïFîÛî%îî±î ‚î"åî&´î,2î.¬î2¨î5yî9Íî; î>îBñîI@îïD]îdîeîZîŸîãî!uî$Iî&Lî*î.tî0�î4<î:6î= îC%îE¡îïBµîbî¾î�îgîåî#Ä î,gî.Uî1+î3î5Œî;ßî?eîAãîG.îïAî‹îPî!î¤îùîÔî!)î&î(ûî,ßî1~ î7î9�îøîAóîDÎîG:îï?gî£î,î’îî òî$0î%µî(8î,Áî/�î1¥î8ƒî:Vî;£î@îDøîH�îï=¿îo î2 î!bî$yî+µî/ªî5Œî9­î>~îD,îGOîï< î‚î×îTî9î"±î&ßî+Dî.ùî3×î5Þî8hî: îKîCxîEîF2îï7ÖîÈîîõî“î yî"Kî&’î)Ž uî2ï7Öî2’ï7Öpî4ôï7Öî5¯ï7Öî6™uîï7Öpî?—ï7Öî@ï7ÖîFîï6/î�î7î”î‹î�î Hî$Šî'¸î,î2?î5î8Òî=LîAîEîG¾îï4ˆîWîÒîIî¹î"î'Íî)vî+Ð î3ú î:qî;øî?†îD¹îï2àîÇîšîžî�îœî#çî%•î(6îoï0Fîáîî ©xî! ï0Fî!õï0Fpî#ï0Fî#ôï0Fîï-«îÚîìî�î•î!ºî& î,1î0î3*î9&î<Åî?pî@ÏîE4îH�îï,îVî¾îŠîÌîHî Ìî%­î)Çî+Kî,Œî/Éî4~ î;.î=¥îBîDæîï*]îºîíîœî0î#Sî%#î(·î,‚î.ãî2¤î5©î8Úî:‰î?2îA“îH îIÅîï(µ îKî·îvî�î �î"[î$^î*üî-¥î1Àî3Tî6(î:Hî;°î<áîAMîDÝîGDîï'îîSîAîrîñî#˜î%§î(î-dî1…î7€î:üî=î@ZîBiîH7îï%gî4 î~îÝîˆîoï"Ìîbî âxî"oï"Ìî#Wï"Ìpîï 2î{îÚîIîlîî×î%wî(‹î*4î.;î/ãî2=î5%î6Øî9Gî<‡îAÂîC'îI@îïŠî†îsîdî=î Yî%/î'§î,%î0Uî2ïî6oî8yî;‹î=RîBîD•îIŽîïã îœîSî*µî/rîoïIî¨xî0ïIîïIpî«ïIxî8ïIî!ïIpîï®îÎî îUîíî!|î"�î'šî)íî,ñî0"î3 î:î>î@�îEäîïî=î° îmîÞî!Hî&fî((î*›î/î4uî7�î9Oî:Œ îBmîD/îIwîï`îîî³îaîÀîoïÅîRxîÚïÅî®ïÅpîUïÅxîâïÅîÊïÅpîï+îÄîcîÓîaîŽ î$.î'žî(ñî,üî.Þî5í î>îDXîH�îï ƒîöîöîlîBî#Õî&äî($î,î/çî1'î5¢î7$î<öî?4îBîCBîG9îHþîï Üî:îî™î{î"î$›î1‰î3Xî6Àî;÷îAöîFgîI@îï 5îÁî!îîðîöî Vvî)Èïý *TVm$Kmenu:Menus.Menu_NILWhenatoplevelviewerismadeiconic,itnolongerdisplaystheclientdata,butinsteadappearsasasmallsymbol,easilyrecognisablebytheuser.Theinstance'siconfieldisnormallyinitialisedfromtheviewer'sclass,butmaybeoverriddenbytheclientduringviewercreation.TheIconsinterfaceprovidesroutinestoaccessexistingViewersicons(Viewersincludessymbolicpicturesforadocument,tool,typescript,andafiledrawer)ortocreatenewiconsfromeitheraprocedureorasetofbitmapsstoredinafile.TheclientmayspecifywhetheraniconistobelabelledbyViewerswiththeviewername.Iftheinstance'siconfieldissettoprivate,thentheclientPaintProcwillbecalledeventhoughtheviewerisiconic,whichishowtheclockicondisplaysthecurrenttime.icon:Icons.IconFlavor_toolWhenavieweriscreated,theclientmayspecifyinwhichcolumnaviewerwillbedisplayed.ClientsshouldonlychangethisfieldinanexistingtoplevelviewerbycallingViewerOps.ChangeColumn.column:ViewerClasses.Column_leftViewerswillallocateascrollbarareaonthelefthandedgeofavieweraswellasprovideappropriateuserfeedbackifthisbitisspecifiedduringviewercreation.Theactualscrollingoperationareperformedbycallingtheviewer'sclassScrollProc.scrollable:BOOL_TRUEClientsmaysettheiconicbitduringthecreationofatoplevelviewerinordertoinitiallydisplaytheviewerasiconicatthebottomofthedisplayoropeninitscolumn.Aclientmaynotchangetheiconicbitforanexistingviewer,exceptbycallingViewerOps.OpenIconorViewerOps.CloseViewer.iconic:BOOL_TRUEAnembeddedviewerisdisplayedwithaone-bitwideblackborderifthisfieldisset.Toplevelviewersarealwaysdisplayedwithaborder.border:BOOL_TRUEAclientmaytesttoseeifeditshavebeenmadetoaviewerbytestingthenewVersionbit.ViewerimplementorsshoulduseViewerOps.SetNewVersiontosetthenewVersionbitanddisplaythe"[NewVersion]"messageintheviewercaption.newVersion:BOOL_FALSEMumblenewFile:BOOL_FALSEMumblevisible:BOOL_TRUEMumbledestroyed:BOOL_FALSEMumbleinit:BOOL_FALSEMumblesaveInProgress:BOOL_FALSEMumbleinhibitDestroy:BOOL_FALSE7pîoïb1îÊ î;xîÈïb1î±ïb1pîï_¡î"îHî¹îûî\îÄî"î&Öî((î**î.jî3œî5øî9´î= î?ŠîD9îI@îï]ùî)î¸îÉî„ î#Lî%9î'‰î+@î. î4#î7î:9î;–îAW îG‡îï\Rîoî±î:î¼îÀî ² î'®î)ªî, î/Ëî4=î8¢î>ÂuîA›ï\RîB5ï\RpîEIï\RîE¬ï\RîïZ«î|î§î4î î# î(î+…î1î6Uî;úîAîC!îD)îïYî# î¸î_îyîÒî"Øî$Œî&*î*î,ûî0sî3Êî7§î8Àî?3î@çîBîDîE·îïW\î#îÃîÞîîÏî�î!vî&î+Dî-&î0î1xî3î4úî:î<îA,îD9îFŠîïUµîõîœî! îqî ›î#ðî%‚î'Äuî)˜ïUµî*HïUµpî-†ïUµî.ˆïUµî1Ôî4Yî8?î>¤îAuîC‹îG¨îïT îÂî!î†îòîLî#Zî$Æî'Êî**î-½î0Âî5ùî8Xî="îoïQ}îíîoîüîïNìîî$îrîÇîÓî î#Æî&³î+:î,Ñî0Éî5¨î6»î; î=žî?y îFGîïMEîŠî¤îLîîî î!Ìî#¼î(Çî+<î.‚î2çî4âî9GîoïJ´îÝî"óî$€îïH$î1îÊî¶îÍî!Tî$9î&-î(yî*Ûî.Fî1yî3î46î8‡î:"î<üî>—îC� îïF|î;î@îÔî¨îùî—î%‡î**î.Âî5Fî8Qî<ˆîB>îH›îïDÕîÒîÎî3î“î"Ôî& îoïBD xîïBDîÀïBDpîœïBDxî)ïBDîâïBDpîï?´îÁîÑîúuîeï?´îÈï?´pî`ï?´î'ï?´î ‰î%î'qî,¿î.ƒî/¹î2:î5Œî9üî;¶î?wîA1îF<îï> îyîéî¢î°îTî¾î#“î%Wî'Âî,€î.Oî1Íî3†î5lî;Sî<ëî@·îCÆîFFîïîoïFÀîXî!Èxî#UïFÀî$=ïFÀpîïDBîoïAÅî\î Ëxî"XïAÅî#AïAÅpîï?Gîoï<Éî¿ î xî™ï<Éî‚ï<Épîï:Kîoï7Íxîíï7ÍîÁï7Íî�pî—ï7Íxî#ï7Íî ï7Ítî ®ï3§ î×îRpîï0TîVî|îîDîzîLî!Êî&=î(”î,mî.ûî2/î<«îB–îD^îFÖîï.­î?wîï+[pîoï(•îŽîëîîVîî" î$áî)œî*Ïî-�î0ôî3´î6Hî7{î>îAÄîD,îG.îoï&îîÀî îî_î"hî$­î)Qî. î2Bî3^î9Xî<î@ŽîB.îEîF®îGÉîoï%Fîgîgîî ƒî%¥î+Uî-$î.Ýî1Ìî3�î4Åî9 îîD4îoï‘î‘îxî¢îºî¢î":î&>î(0î*Èî/Q î6§î;qî?îC¤îH�îoïê î7îµîºîæî%òî(jî*Hî.Lî/çî2Jî6Pî8Èî=rî@�îBòîD* îoïC îEîSîî", î)Žî+zî1ãî7Bî:î<}îAîC÷îH!îoï› î?îTîÑ î#óî%Èî*Îî,î0&î2 î9î@‹îDgîIÅîoïô wîï¡pîoï Üî îyîõî0î¥îæî ¯î%%î(î-Kî.…î1Mî6µî8tî9®î=ªîA•îD}îGêîoï 5î î%îyîeî î"½î%Zî'âî.�î1Ãî5Ëî8ªî=» îD‡îI5vî)Èï°TVm$Ðhavingverylowdatastructureoverhead.RulesAruleviewerdisplaysasarectangleofasinglecoloronthedisplay,andiscreatedusingtheRulesinterface.Theyareusefulforcreatinglinegraphicswhendesigningthelayoutoftools.TextTextviewersareimplementedbytheTiogaDocumentPreparationsystemdescribedindetailon[Indigo]Documentation>TiogaDoc.tioga.TheViewerToolsinterfaceprovidesasetofoperationsthatallowaclientprogramtocreatetextviewersaswellastofetchandstoretheircontents.ThereareagreatmanyadditionaloperationssupportedbytheTiogaeditor,exportedbytheTiogaOpsinterface,whichisdescribedintheTiogadocumentation.MouseandKeyboardInputmumbleLockingTheViewerLocksinterfacedefinesaninterlockingmechanismtoarbitrateaccesstotheViewerwindowtree,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}.9pîoïb)îêîùîšîžî"[wîï^¹pîoï[×îîî’îçî³î úî&õî(Ëî*î.î1·î3Ûî6Yî;�î>Vî?àîDÇîH�îoïZ0îP îÒîZî®î#Æî&î+;î-ñî3`î7î=>î?žîCÌîE…wîïVÀpîoïSÞî£î�îç î"=î$<î& î*ƒî1L î8ºî=9îCgîEîHèîoïR6ð,î.î1- î9uî?lîELîFÇîI5îoïP� î8î!îåî*î"î'®î)xî-•î0hî5lî74î:=î<î=ÏîA^îD0îG§îoïNèîÍîÙî6îjî æî$» î+< î1ôî8vî:{î<äî@ÎîE2îoïM@îkîÊî î î$î%€î+«î-Yî/¹î3™ tî ®ïHýî(îNî¦pîïEŽtî ®ïAJpîï=Ûî! îŠîjî$bî&� î.]î5Êî7³î=rîAºîC£îF<îï<3î;îWî½î �î"?î%.î&Ý î-aî3(î4¶ î:íî?SîBXîDJîH±îï:Œîîçî4îâîî!©î&Žî+fî.Dî0´î5)î8€î<¾î?yîA8îFÀîï8åîÁî&î!äî$ î(Èî+›î/)î3\î5µî;€î=Âî@'îE¼îH�îï7=î$îîîmîkî!“î#Gî'‡î* î3cî6�î9¥î=î?î@DîD+îIbîï5–îŒî†îòîãîÀî!Îî#}î$§î) î+Jî-ªî2¶î8àî:™îA1îCÝîE¢îI5îï3ïînî"îÐî0îï1[îöî0îë î‹î% î'Àî(Ðî,¢î1]î4Gî9î:î<òîBRîEâîï/´î_î îî5îî#ðî&kî)íî.î/´î0ãî5¥î7î: î;½îA1îF îI*îï. îsîgîiî„î#(î&£î)+î+ÿ î3²î6î7lî;lî?î@îC¿îFîï,eîvî¡îîÁîî Íî#Zî&¢î)sî,xî1†î2²î7î:î;Æî>'îC¸îErîGÔîï*¾îÄî? î“îºî Œî%•î&½î)Õî,Ìî/Îî2@î7î8;î;¶î>­î@±îCîFŠîï)îîòî­î î!'îï&ƒîóîdî3îîîèî£î! î'Qî,×î/8î4Oî6yî8>î>IîA$îD4îF1îï$ÛîJîXî2î‚ î!î"¨î%‡î'à î0î2"î6Úî8®î:Kî<�îA]îBïîE¢îï#4î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§îï—î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îïfînî—î=îî Ïî#.î&ïî)zî-9 îïÒî îsîî�î°îvî# î&ñî(¥î+£î1"î6iî7Åî;2î@îB|îEzîG½îï+î€î<î©î2îÝî%¼î(î-üî2î4òî:¥î=jî?ÖîFfîH±îï ƒî/îíî…îöî!/î#�î'lî*ãî.§î1î4î9…î;Xî=î>ÒîAÚîDHîI@îï Üî,î×îSî©î î""î#Æî$çî'÷î-0î/Þî4§î6ýî;²î?ÌîEŸîHþîï 5îtî"î�î6îÈî!•î%?vî)Èïÿ *TVm$ôUsersareadvisedtomakeuseofthecall-backoperationsprovidedwhentheyneedtoperformlockedoperationsonviewers,andnottryandusethelockingprimitivesdirectly.Thesuggestedusageistocreatealocalprocedurecontainingthecriticalcode,whichispassedtotheroutinesbelow.Thelocalprocedurewillthenhavefullaccesstoallofthevariablesintheouterprocedure.PaintingmumbleIconsmumbleMenusmumblePragmaticsmumbleInterfaceSummaryButtonsButtonsareaclassofviewersthatdisplayatextlabelandcallaprocedurewhentheuserclicksthemouseoverthem.Thisinterfaceprovidesroutinestocreateanddestroybuttons,aswellastheabilitytochangethevisualappearanceofthetextlabel.CaretsImplementorsoftexteditors(andmaybesomeothertypesofeditors)providefeedbacktotheuserwheretextinsertionwillgobymeansofablinkingcaretonthescreen.TheCaretsinterfaceallowsaviewerclassimplementortodisplayblinkingcaretswithouthavingtoworryaboutissuesoftiming,clipping,etc.ChoiceButtonsWhenbuildingtoolsandotherapplicationsusingViewers,clientsoftenrequireuserinterfaceabstractionsforenumeratedtypes,stringparameterstheusercanedit,andbooleanvalues.ChoiceButtonsisahighlevelinterfacebasedonButtonsandViewerToolsthatprovidestheseabstractionsasprimitives.ContainersAclientoftenwishestobuildatoolthatconsistsofseveralviewersassociatedwitheachother.Containersareaverysimpleviewerclassthatpermitotherviewerstoberecursivelyembeddedandscrolled.Routinesareprovidedtoconstrainembeddedviewerstobeclippedtotheedgesoftheparentcontainer.CursorsTheCursorsinterfaceexportsasetofbitmapssuitablefordisplayinthehardwarecursoraswell10pîïb)î î‰î§î~î[î!ùî#Úî&cî,R î3)î9#î=î@:îC¿îE—îï`‚îŽ îVîvî Òî#£î&2î(tî+Fî-Õî0Nî5< î;ÁîAÇîD¹îï^Úîî˜îpîœîïî_î% î+îî.wî3î6åî;î<±îA@îCîE¡îï]3îîîÁîî�î"(î%Iî(‹î+î/î0Äî2°î4dî6¿îî@yîD tî ®ïY pîïU²tî ®ïQˆpîïN2tî ®ïJpîïF±tî ®ïB‡ pîï?1tî ®ï;î§wîï7®pîoï4åîŽîëîîVîî" î$áî)œî*Ïî-�î0ôî3´î6Hî7{î>îAÄîD,îG.îoï3=îÜîDîkîëî!î&Åî,bî1¼î3xî7ˆî:Mî?.îDŠîFEîI@îoï1–îÏîî¶î^î¾î"© î)Ýî+–î-õî0­wîï.@pîoï+v îYî1îî!­î$ýî)Œî->î0üî4¯î6‡î;¦î@ÐîFÁîH�îoï)Ïî^îkîî¾î!^î#Dî%5î)nî+î,<î1Ÿî4ñî6íî9Bî>AîAîEIîoï((î™î¿î îM î$oî&î*Éî03î4î9î=‘î?<îC/îGîoï&€î(îÚî€wîï#* pîoï `î¶î_îàîÆî#• î+Zî/3î4ñî9eî=(îB îEIîoï¹ îEî× î!·î%øî*# î1î43î7�î:aî=Ñî@ÝîFiîoï îÑîeî·îî"sî(Aî,Kî.yî3¸î6˜ î>·îA®îGeîoïj îðîž wîï pîoïKîîæî�îþîÁî"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ïUîÏî wîï þpîoï 5îGî\îî!Õî"þî%î&Óî, î1!î3]î8î9½î<îB%îFSîHvî)eïýòTVm$‘asprimitivesenablingaclienttocreatenewcursorbitmaps.Thecursorbitmapshavealogicalhotspotassociatedwiththemthatdefinesthesinglepointinthecursorwheretheuserispointing;e.g.forabullseyecursorthehotspotisinthecenterwhereasthetextpointercursorhasitshotspotattheupperleft.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.11pîoïb)î- î¨îQî‹î"[î$î(+î+(î/fî5˜î8€î<¾îBîE[îF•uîoï`‚î½pîƒï`‚î)ï`‚îÜîãî!Yî$î(½î+ î.áî2lî4î6Sî:mî>rî@¾îC¤îDüîoï^ÚîÿîDîuîÔî î!pî#íî&íî(`î*î,|î0§î5ðî8Wî;î?æîDîF—îHyîoï]3îiîîaîdwîïYàpîoïWîîfîíîÊîëî"æî$-î*Íî.øî1Àî3Îî7â îAîDZîFÖîoïUsî�îiîÅ î ¼î#.î'mî*Wî-òî/Nî4jî7î9£î?ê îF×wîïRpîoïOZî‰î.î[î…î!Eî"óî'¥î)•î/¨î3Öî6ñî;äî? îA×îCBîF~îoïM²î‡wîïJ_ pîoïG™î�îîZî îÃî"¥î'Îî*Aî0Ìî2™î65î7öî=¯î?qîE*îGõîoïEòîwîïBŸpîoï?ÙîNîzî'î î!2î#Uî%î)Ïî/î2Fî3ûî8µî<¾îB�îD#îGêîoï>1î`î<î²îî âî!úî&›î(Mî)eî/Öî2’î6¹î9î:Ãî>ÉîDŸîF<îoï<ŠîÈî£î)îâîàî#vî$™î*oî.­î0–î3”î6[î9î:êî@îC$îE|îI5îoï:ãîÏ îîî kî"gwîï7� pîoï4Êî* î0îgî"Lî&fî+Sî,ìî2Öî5 î<>î?:îBÚîEhîH�îoï3"îÅîŽ î’ î# î$áî)*î,‚î/Jî3¿î7î:Üî<Ýî@`îE¢îoï1{îäîPîÅ wîï.( pîoï+b îÔîî‹ î%£î'lî+Öî.žî4·î9dî;#î>!î?ßîBO îoï)»î[îîèîSî"Gî'vî)5î-Íî11 î9‰î=êî@’îCgîI@îoï(îOîîÅîtî!=î%Kî)¯î.bî1î6ëwîï$Àpîoï!úîõ î€îÊî î!öî'î)ïî.Âî0 î4“î7lî<äî>³î?þîD îHîoï Sîáîûî†îŒîÏî!¨î&Eî(Üî+gî-Üî4iî7™î;Žî>\îC[îE)îHNîoï¬îtî1wîïXpîoï’îC î×îžî Åî#›î%Gî*pî-gî1î4uî9Áî>|îA2îEâîoïëîCî¬îcî˜î#õî*ùî0Eî2û î:dîî Øî#8î(cî-ýî/«î4&î5Pî91wîï[ê pîoïYîCî–î½î$îIî$œî)Jî,>î-Òî0-î2žî4Sî6®î:Sî=î@ÂîFGîoïWlîsîèî‰î/îÞî#�î(ÿî*Ãî.b î5ìî7šî9úwîïTpîoïQ0îRî¨îÔî;î¢î"Õî%¥î*Zî, î-6î3î4Ðî5üî9éî=iî?qîAÓîGfîoïO‰îÃîÛîîPî î%uî)*î/Sî1³î5áî7šwîïL$ pîoïIMîƒîéî îâî ‚î#Kî(´ î/1î3Þî7?î9˜î=bîBîDQîI@îoïG¦îäîDî`îTî úwîïDApîoïAjîüî¼îÀîðî î"Pî'9î(ýî+fî.�î1# wîï>pîoï;.î@îÑîíîÍîî"Jî$›î(‘î1Òî4ßî9°î;Q îAÅîDèîG’îoï9‡îî î¹îg îžîÛî#Nî&î(pî*å wîï6# pîoï3Kîüî˜î>îzî (î$Ûî'Ô î.çî0 î5î6Èî;½î>iîA wîï/çpîoï-îîjîŸ î Èî#Ñî'•î-¸î0^î3Êî6{î9cî;!îDîBîFµîoï!Þî[îãîðîŒî-î Jî$úî(î)¿î-î/ïî3�î6çî8�î î!÷î%Tî' î)lî-Mî0÷î5î6²î9î=wîBVwîï– pîoï¿ î[îÇî¹î"î'Âî*‘î/Pî1±î6î9Hî<îAOîDU îoïîî î¹îƒî<îœî!î&Eî,,wîï³ pîoï Üî°î|î1î!rî$Pî'ôî,íî.Ìî44î9Ôî<±î?7îCJîGÕîoï 5îìî’îþîsî"Pî(Èî+î/ûî2pî4avî)eïö6TVm$¹ViewerOpsViewerOpsisanimportantinterfacedefiningstandardoperationsonviewers.Routinesthatmanipulateviewersizeandposition,registernewviewerclasses,createnewviewers,aswellasmostpaintandinputnotificationslivehere.ViewerSpecsScreenlayoutconstantsaredefinedintheViewerSpecsinterface.ViewersStallNotifierBugbaneusesthisprivateinterfacetonotifyViewerswhenaprocesshasbeensuspended,pendinghandlingofabreakpointofanuncaughtsignal.ViewerToolsViewerToolsprovideslowlevelaccesstothecontentsofTiogatextviewersandpermitsclientstocontrolselectionandeditingwithinthem.SeetheChoiceButtonsinterfaceforcreatingtextpromptfieldsandotherhigherleveluserinterfaceabstractions.ViewersSnapshotClientinvokedCheckpointandRollbackroutineslivehere.VirtualDesktopsThisinterfacepermitsclientstomoveviewersfromonedesktoptoanother,locateviewersonotherdesktops,aswellastochangethescreendisplaytoanotherdesktop.WindowManagerWindowManagercontainsamiscellaneouscollectionofroutines,themostimportantbeingtheabilitytoenableanadditionalcolumnofviewersonacolordisplay.WindowManagerPrivateThisisaprivateinterfacecontainingthecurrentviewertreerootandsomeinputnotificationroutines.13wîïb&pîoï_dî¾îhî–î!6î'î,Æî2Ÿ î9‹î;ÏîBîH îoï]½ î´î6îþî Óî&Šî+…î.�î3î7áî<î? îDjîF6îI@îoï\îÌîUî î· î$„î'$wîïXÇ pîoïVîëîî î `î%`î'î)n î1r wîïR·pîoïOõîîî’îî$²î&Pî*Aî/fî3 î4"î8åî;Iî>” îE–îoïNNî+îäî îþî ·î"§î(§wîïJÿ pîoïH> îaîëî†î"Æî&Îî(wî*Òî0;î1ïî5Éî8|î=_î@îEîI@îoïF–î`îCî9î"î&—î+xî.Lî0ê î:bî@FîBÁîH7îoïDïîYîîÅîeî"´î%úî(óî.™ wîïA pîoï>ßî’îÔ î 3î"êî(¼î. î0©wîï;�pîoï8Ïî®îxî’î!üî#Ïî'³î,Àî0Lî3î8cî:6î?¾îCÚîHèîoï7'îî îºî¨îVî!î%¬î( î,Eî0øî2¦î7±wîï3Ù pîoï1 îdîìî!: î* î0mî2Jî8î:˜î>îDŸîH�îoï/pî¨îWî¼î¬ î"$î'î(Òî-»î/Áî0ëî4hwîï,!pîoï)`î´îKîŸîgî 7 î'î)¦î.šî3*î6î90î<î?ÐîC¦ îoï'¸vî)eïpTVm$´ÿ TIMESROMANþæÿ TIMESROMANþŸÿ HELVETICAþŸÿ TIMESROMANþŸÿ TIMESROMANþYÿ TIMESROMANýÌÿLOGOü´ÿ TIMESROMANþÿ TIMESROMANþŸ™ Û C ,* Ã4 ?0GWM vXu^Éf+lpj/sqš*!:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿViewerDoc.tioga17-Dec-82 10:58:02