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,whereasuserreferstothehumaninvokingViewersoperationswiththemouseandpqda " p M]d]|-]7f]> @G MZdZ-Z7fZ: MV$dV$< s&-V$ 7fV$r{Np MDdD,69| M@ d@".0657:M>eAs8!u)23t 3 p0J ]n %R'+- 46<3>? D0E.'!%@').4$6v:?BEH,a#M%S.t ( p%I!R"%I)+.1%47<}BD`F#  D &(b-(.1 8;>@MA_E";w "C%( 0|4\: <?A   Xq _"Z&,,.3147>:7;u>>pABC q,l6#'$):-136A9_?7@ErI6#g&uu(9(p+R+.3)6Y8; BhEF#   '\,/K539=?`E{Ms +!R$',.16g9<=sBEfHIswhD@!$&F)4*.4sY< 6 #N% -358A:?Es !("(,/368d @tCME v !&n*.15 <?<E&Fc '!&)|+/4 8;x AG  $d'(u. . p1 2h 578>C5E  u^  p  !#&>+,1!6 =@CH7 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,only2pb)t ^(vZ8poWl"u$(+/35:=@EyHyoVMFYw -!$')}/[23B69:?=EoTF%!B"j'+.4I6 =@DGPoRL $)-f1g38<ADWoQWL7Q"M$'+8045c;A{GoO=-' "#'+,,001 869; B/EoM4#'),r2A7:>CEG:oK%)j+p-06V:<&AsCH IoI % "$ +,L13M :6<`>j@FoH>  G# %y)j. 5:@BDoF,!Q#%(0,135\8;>c@cDF'oD( #M(**1>569;=9@hEG.oCHQa!$K%(%,p u2CH31CHp9CH:#CH=A CEuoA# +-369<?9@EH o?uR??p? ?#&,u.?/?p3F?4o?7o?>DHo>ROy I$ ;c6! +s.1%4$ ;t>hA :0(f"t$A&,169<? G8LP &(q,/-1k3 : AEI6D!V&U+0r5:8>.CzE5:;$#)L+K/247^<>kA3so1 #g1"+# *-06 ?uAH1A1pD1Ej1o/pM #',W.b05u89/p8/pp:/p;9/p?uBT/pB/ppE/pF@]D5 o$h0h  "%t'>+/186<?vEGOo# (*/1369m<?B'EGo!a=N#%( ,0[3)vpoOG !#({*++W/4<869b?dB?E;Go)k!' 02;7:5;Z?Fo, 'a) 2 38>@}BGoY9 &P'-0 1577;=AHo(|$&+03]8;?DHo (q".%'*..m137:<AGIHocO8 $x&&(+s1q4I77BD]IloZ0lp %'+03P7:j=@9EvoYu%Z" %*D,1=368\;AFXHoWi{#&J*-2 @FoU5I!\#M(,d.oSFc[ "O%($,d/0 7 <@BiGoQ2 "\ +-u/35v7=@EGoOt #&/+,G045F:j=v)#9$'8)N+!.KCGDo<UK"%'+-1v7k8>=BEI@o;K"'+-13g48;\>u@CBD+Ho9v6Tpo3C.#+$'+ 3 59y?RD.Fo1u1E1p11 "&@(w*b/3c7<>CEo0D $R)!+- /]246;?CFo.  "$x(P,V/%28=D?uC.D.pG.HC.o,}RB %T',D-/o*yZ  %j(*)^,14K6 :%=2x?,*y@*ypA8*yB*yGo(j Y!#).+j/4^6:.=&ACFo'+& #%)L.0s26q; o$J 7#e&) 0E29 <(@BDo#\9#$&+]-/457D;=xu>#?#@DpH7#H#o!`G" h #(x*$,0I37;b=?vDFolT'$L( .2/368:<A{Eo" t (p)q" )+/u01zp4 45:<BpD/HCI $&.*-/F0x47XDlG}  Z$&*u-/135;,=C(DGb"R8!$ '*,159=ACmFmI*[ 0#%2479@ 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,scrolling4pob)%.x&b)'b)p(b)_Cs#8'F -o.2Y5t7;o]2h sx"]2"]2p$ ]2Z vB #(R+137(8<>tBElI@Y L %',_/168:>BDkWh$ $&)+.57<@IEH7U oSFr"ox#SF$SFp&SFP6#&_(-. 58F;=AIC O#%#e*,s 4 68<?@H FM|kT#&(,.05`7;=BHK7X$?);.C0279<@BD J-MV!k$j&(-11 9N=+@B,GIHK!')^-0+39n=@CFF<eM%T+-L/oDc%Rx&Dc'Dcp(DcA9"( /4 ;;>s?D=HI@@ i !%)*\ 1Y392:=CEsH> % +/157T;e>!BEI<F o:v#x%?:v&':vp'J:v7{"&:(,- 78:Z>@B;DF6TV""$)-*25<(>@D4k ] #(!)o21b x"o21#W21p$z21/}^_5 l (q.L25; BEFI5. D :$(+'-z2 48;*AE*G[,g o)$x&)'n)p()'p6 @"?#a',u.'p/P'p2hp5'p6'p<?CI%N $%+a-1536:?@FGJu8pSu" "p$$*-/ 7'9<?@CH7unpW &]+.1 9|>6@fFJH5i "'A)-(15:@CI@Ls!(%x&'p*2*x+,.p1o1 ]x!"p#@#N%+],-2$39(:5=?lC<E5&9"%8*u-l.p/0P6C9; BE&GH  o "x$t %] p&  Q q #8%A+ 2v ;=LBEkw) TVm$ q #8%A+ 2v ;=LBEk #~ %>)*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;5pb)#~ %>)*-q0 68>AfEWG5I`B_" $i(*$,04N ;T=BG#H^ 2!' (* ,+-0V4$5;>CFF]3'E $),1K4i :=BHC[s  &%)h*- 35k8;>BDFYa{ E"'{*z-d/2 9t;4 BXDeFX=_#&)-|14:=C$EGV p $&g(+13y58H:?AzCHT-rs!,$z)+y/63a78;q>@ZBFrSG x# +j-B2a47:?;>CEGQ/ | &G' oO$ ;xO$O$pO$LR $%)+]27 9v;AqCFRKh8 oHoF  V"&,.6 5d8!9>JDnF!GPDc i" )@+/u2Dc3cDcp6Dc7DcADGA3 &l(-(/ 6u8A9RApc?DHI=_ w#E&U(,/b2 o;J "" 8#&+W.~/4 ;=@MDH7' 'd)} /14457=S>BEo4 x44pl4x44p 42/G "t'{*17 8;?BvEKH0|"L$R *.F04:W=q>B F0H."%pd!8#&h+7-/4e ;>^@E^-:[~u #)*-1286M: D@ +!1#n%) B "%r)-025u;w DH'o ? o$!x#)$$$p%5$"x "%*(*^015R7Al HIE +j!%, .58m<>C "Q#(*K,1o "$&Ow) TVm$8< BFHD DB #}(+.21G369=u?uCDEI@[/o%tx''p) CO#%),Q0&1489s:=>Al HI +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,sincethe6pb) c!E#)f.d247S;BIE`"#!$y(*-14618:3 @BoDH7^K "$6u%^&^^p'^(^+.>2H469:=??B=FI]3 FoZ xSZ Zp]ZxZZp"ZX=V3oUxUUpUx!jU"#Up%USGV3P z5\8! )+,1D47;>}@CBFqGO$" % -04u7BO$7O$93;>pBoO$ClO$EM}G#-$V * KH !u$(P.26 =A IIZ!$'b,@E$GGtBA"'S),146:v?@SEF [y H#7',@147;AFDd R] !(#(Z.0279 AE B`$4@Bo%)| 1D3}8=1@CH>'t :x(p7)a"H(++@-B26<8={ EH5AK !&*u.0m26;-@KE3 2x #&e6R;B=A CG23L/$S&) 0d36;VAF. "e%'*#.605;!= CRG,jg Q"#%e(,2v47=?*BFI* ! *+0B35S:;>E]G$)&3!s"'f*,[.51f4k$% yx$%$%p! b  u%)/,4Z6<AoCE 'e %: +.j2%8v:J<AFDE_Z " )v-6 exBeepe xe6Wx p`o48 A"' (+=/279I;1u@koAopD'oDoIv!$ &)W,).A16R8':?B9FH % "&,2.25y9;>BI@ydeZ!u$I&L*.t04<:6= C%E bg# ,g.U1+35;?eAG. *P!!)&(,1~ 79ADG: , $0%(8,/18:V;@DHw) _TVm$% "&,2.25y9columnconstraintalgorithmswillrecomputethesevalues.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.7pb)o 2 !b$y+/59>~D,GO` T9"&+D.358h: KCxEF2\_j "e&YxYaY=p6YxYYpoWhP ~?r!%($-3)669Z:>@CZGxoUNx( #]&q*,037};@_BEToT 4eQGxQQpJQxQQpoO#B!P&* +/1o368p:>'CfDoM|~;"').]2v48`:R=L>CFoK ^-v23IYxIYIYpIYx%IYIYpoFh%$9'J(j-0e48v9<#@CEHoE6V$u'(Bx!B!Bpo@@Lo2 ;#r' . 2j5&;4>ACGo> wZ#%*.015W:0 ACH7o<b "&6+-195$7;>ACHo;J #:%(*,.5"7;=;?DEhFo9m#% V"<(e).z028-{BEo1]@ #&x'- .1L5;1>O@AZ I@o/  "Y$-:i xg-:P-:po* ]q $(O)-z/C69 >BDrHo)4" K$'(,016/7=N?zB7CeGKHo'pCo"%Y2+37-#(Y)+/517;Q>A0Eo+3 &m(_*.v1E 7e:_=>D oS: #% ,.1^5,9>DZuGAGpo6 V"&&U+04:T?Eo5y #,%&)T.^0158<?lCMDko:kO!n"%(,/4G9;>@ACHo"w#&! ,//2+3{5|u77p:;>A Do?#k '"&(q,02_5l7;p>}CF%o}!#o U"&).0u49; ?BcDx o \[#'n+.06:5>_CFo Rw) TVm$ '"&(q,02_5l7;p>}CF%oz}!#o U"&).0u49; ?BcDx o8\[#'n+.06:5>_CFo  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.8pb) xb)_b)p;b)xb)b)po_"$r'),/^3"68:>@CEo^ , 0!$&(.q37>,A6Eko\_ %'p,/ YxYCYpYxYeYpoWh  uwWhWhp_Wh &Wh!t%(5-o/ 0B25:K;?ADF<oU'\$x&+(-0.2Z45;= @CFFoTE!<'M-2g5i:I*oRrO xOOpOx(OOpoMz :"q%(,.@/Y359u<=Mz|K?CK@CHoJ,M #Z'GxGGp^GxGGpoE5 P &#%>+,-C2_7: u@CACpF CFCH7oA"$!%(/,?j x(?j?jp2?jx?jx?jpo<!$'x*0v29 AVD!Go;G$(K+03168F;>A8 x 8s8p8@8o6P  F" )+_-`/49=RA"CDEPFo4.ax"Y'-1/46:=3BiDHo3\7 0 Gx!0"0po. 0S#(-)04[6 7<AICGo,cK;M!:) gx!)")po'l^ "Q#z&=(,/1f5$kx $!$po"u`d!%^)^ x8!po}"`%d( .127590=AHBEToU$+ *,T3K57 @CgEo/36E"&)M-/468;^ BD`I@ kg" %('e Hx p!"ol #)%?)- u56Pp89:u@ApDaDomNh &Z*-28*:>C Fo M!#~(.q0 2S :m @B9Eo ^15!%%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.Containers9pb)xb)b)pkb)xb)b)po_#%i*F 0395'9I= C o^"/%'*3[ x([[p[xJ[[poYTK^]r# &U(-3$48;>h FHCoWg`T xTTp]TxTTpoRo]#b359<>?{E*HoPM "$VNLxNLNLp_NLxNLNLpoKb< $u%K&Kp)_K*K/1.7'<>@=EGoJ)Q (-036* =@EdGoH PuyHVHp7?@Fo;C,Fv"$&p*/15:{<AC8 x88p8x>88po6LuB6LV6Lp>6Lh6L!v#)Z.>/5p:<@BkETIlo4uH4\4p!J4"s4%++-:139ADFo%Bt ! RpLV|DzL!&=(,m.2/<BD^F?vUpoV" $)*-036H7{>AD,G.o _"h$)Q. 2B3^9X<@B.EFGoDgg %+U-$.1349 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-creation10pob),!&).0T2N 9<?BH7o` # *03(6+<2>D4o^x":&>(0*/Q 6;q?CHo]3 7%(j*H.L/2J6P8=r@BD* o[ ES", )+z17B:<}ACH!oY ?T #%*,0&2 9@DgIoX= vUpoSF y0 %%(-K.1M68t9=AD}GoQ %ye "%Z'.158= DI5oO"[vLpoI &(*.136Y;>V?DHoH?P Z#&+;-3`7=>?CEvDpoB- "=$<&*1L 8=9CgEHo@,.1- 9u?lELFI5o> 8!*"')x-0h5l74:=<=A^D0Go=76j $ +< 18v:{<@E2o;k $%+-Y/3 t 7m g p4k 3"s$&T+=/5T7=> EI52w LK"&(t* 14:=B( I@0"P# +-i0V 7 @BE^/(2 "''*A.1596~ '*-24x6=9+<= E+ O"%)d*-r146S8<>c?EGP)^U ?e"j (s+- 491;.ACG' !%B(_,.15-7:;ADG&  i #&>+I-0T 7[#m"G#H )V.0-3@8C !Q ';(_*,. 5p:<>DGD E,R "'S(z,.257: >A{BF`Hl*!$`'+%-/3#68=>6CFr ;!;#<&+B-1@ 8s;\>QA:BEGI@OFl &)+ 25:>AFrAt3 %(-/x 69<%ARC,EI!"& *,/{1> 8P;)=BEYt$&_*025 :K?%ACCE6 "*$f% +04'8=?7AE  !#g$(.1t3|5N7; C O %*p,.|5&8?CI@ @9 !#@&+0o2E6,:6 @FkH  '6*/05<AD w)e 1TVm$"& *,/{1> 8P;)=BEot$&_*025 :K?%ACCE "*$f% +04'8=?7AE!  !#g$(.1t3|5N7; C yO %*p,.|5&8?CI@9 !#@&+0o2E6,:6 @FkH+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.Painting11pb)QI1 # ,#.2W5?:@CFnHc`$%)D- 693<?[ACN I@^  ?! )4,}048+;'@`CF"G]3Tg #q$(y)-1p47`<>@D [#')+.@38<>BEHY`! # (r+ 3G9<AlD X=r"!h#,%*0<27:%t T(NpP4}t LpI[! j$b& .]57=rACF<G;W "?%.& -a3(4 :?SBXDJHF 4!&+f.D05)8<?yA8FDe&!$(+/)3\5;=@'EHB$mk!#G'* 3c69=?@DD+IbA!#}$) +J-28:A1CEI5?on"0<0 % '(,1]4G9:<BRE;L_5#&k)./057: ;A1F I*9sgi#(&)++ 367l;l?@CF7v #Z&)s,x127:;>'CErG6V?  %&),/2@78;;>@CF4 !'24d3! 'Q,/84O6y8>>IA$D4F10JX2 !"%' 02"68:K<A]BE.g-] % &+-/:179S<>CEH->d#e&O)+02509;?-@CF+P@!w$N'1+0 8<>D@ )o"$~).158\;b>@BG(Hr;%2 A%**V/3X89=?BEFI$%_"+%7'P( .348 ;=2>nCFG"~/ b!'$'*/036869;4=A BF =  ="' ->/36H8>?C]Gq/n= #.&)z-9 sv# &(+1"6i7;2@B|EzG <2%(-24:=j?FfHf/!/#'l*.149;X=>ADHI@,S ""#$'-0/46;?EHt"6!%? ~[!#&c,R 3)9#=@:CE Vv #&2(t+F-0N5< ;ADMp_% +.w36;<A@CE"(%I(+/024d6@yD t w)e gTVm$u"(%I(+/024d6@yD 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"]12pb14}t ^pZ4}t VpSO4}t O, pK4}t GvDlpoAV" $)*-036H7{>AD,G.o@Dk!&,b13x7:M?.DFEI@o>\^" )+-0v; po8K Y1!$)->046;@FHo6^k!^#D%5)n+,<1469B>AAEIo4 M $o&*0349=?<C/Go3U(v0 po-E_# +Z/349e=(B EIo+ E !%*# 1437:a=@Fio) e"s(A,K.y36 >AGeo(O  v% po">"v#&)z.0]5: @CFo r5!&$)g,H04}9x;9== D4o  %'-p4#9:<AqCEqI5oH vpo8G\!"%&, 1!3]89<B%FSHo- Q"[$(++(/f58<BE[Fuop)!Y$(+ .2l46S:m>r@CDoBDu !p#&(`*,|058W;?DFHyoiadv Lpo  g!&(E+/-]03056:w)e,TVm$adwRpo  g!&(E+/-]03056: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.MenusPrivate13pob)7V$)+@.35679<@DF6Ho`!}u/p2G6(8>N@3BG#Ho^:G!#9%**,/ 36:3;>@A.v\_poYf"$-*.137 ADZFoX=i #.'m*W-/N4j79? FvTpoR-.[!E"')/36;? ACBF~oPvM7 poJuZ "'*A02657=?qE*GoHvEpoBNz' !2#U%)/2F38<BD#GoA`< !&(M)e/269:>DF<o?o)#v$*o.036[9:@C$E|I5o=  k"gv:y po7* 0g"L&f+S,25 <>?:BEhHo6  # $)*,/J37:<@`Eo4iP v1 po.X  %'l+.49d;#>!?BO o,[S"G'v)5-11 9=@CgI@o+ Ot!=%K).b16v'po$  !').0 47l<>?D Ho#R!&E(+g-4i7;>\C[E)HNo!t1v\poC  #%G*p-g14u9>|A2EoCc#*0E2 :d #8(c-/4&5P91v)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].ViewerOps14pob)> #8(c-/4&5P91v^ po\C$I$)J,>-0-24S6:S=@FGoZps/#(*.b 579vW!poT_R;"%*Z, -63459=i?qAGfoRP %u)*/S157vOh poL  #K( /137?9=bBDQI@oJD`T vGpoD "P'9(+f.1# vApo>@"J$(149;Q ADGo=5 g #N&(p* v9 po7#>z ($' .056;>iA v3po1j #'-0^36{9c;!DBFo& [- J$()-/368 !%T' )l-M0569=wBVv poA ["'*/P169H<AODU o <!&E,,vJ po|1!r$P',.449<?7CJGos"P(+/2p4av w)e3TVm$2p4awpo h!6',2 9;BH o 5 6ViewerOpsisanimportantinterfacedefiningstandardoperationsonviewers.Routinesthatmanipulateviewersizeandposition,registernewviewerclasses,createnewviewers,aswellasmostpaintandinputnotificationslivehere.ViewerSpecsScreenlayoutconstantsaredefinedintheViewerSpecsinterface.ViewersStallNotifierBugbaneusesthisprivateinterfacetonotifyViewerswhenaprocesshasbeensuspended,pendinghandlingofabreakpointofanuncaughtsignal.ViewerToolsViewerToolsprovideslowlevelaccesstothecontentsofTiogatextviewersandpermitsclientstocontrolselectionandeditingwithinthem.SeetheChoiceButtonsinterfaceforcreatingtextpromptfieldsandotherhigherleveluserinterfaceabstractions.ViewersSnapshotClientinvokedCheckpointandRollbackroutineslivehere.VirtualDesktopsThisinterfaceisbeingreplacedby"DeskTops".WindowManagerWindowManagercontainsamiscellaneouscollectionofroutines,themostimportantbeingtheabilitytoenableanadditionalcolumnofviewersonacolordisplay.WindowManagerPrivateThisisaprivateinterfacecontainingthecurrentviewertreerootandsomeinputnotificationroutines.15pob)h!6',2 9;BH o` 6 &+.37<? DjF6I@o^U  $'$v[ poX  `%`')n 1r vU{poR$&P*A/f3 4"8;I> EoQ+  "(vM poK a"&(w*0;158|=_@EI@oI[`C9"&+x.L0 :b@FBH7oGYe"%(. vDepoA 3"(. 0v>Upo;/e"$ v8E po5 d!: * 0m2J8:>DHo3W "$'(-/04hv0po-Kg 7 ').3*690<?C o,$w)eTVm$e"$ w; po8 d!: * 0m2J8:>DHo7*W "$'(-/04hw3po1Kg 7 ').3*690<?C o/sv)eaTVm$L TIMESROMAN HELVETICA TIMESROMAN TIMESROMAN TIMESROMANY TIMESROMANLOGO TIMESROMAN TIMESROMANt  7 ** 5 ? J SJ[ g Vs.y,yj/wViewerDoc.tioga 3-Jun-83 15:53:43