;skip 1 ;vsp 5 ;vsp 36 ;squish ;lftmar 0 ;topmar 0 ;botmar 0 ;rgtmar 0 ;dfont TIMESROMAN10,TIMESROMAN10,TIMESROMAN10I,HELVETICA10,TIMESROMAN18B,TIMESROMAN12B,LPT10,GACHA10B,HELVETICA18 ""!"P cMASSACHUSETTS INSTITUTE OF TECHNOLOGY }ARTIFICIAL INTELLIGENCE LABORATORY ,"I ,Working Paper 208  April, 1981 ""\ ?Lisp Machine Choice Facilities "" ?David A. Moon ""\ ,ThisdocumentisadraftcopyofaportionoftheLispMachinewindowsystemmanual.Itis ,beingpublishedinthisformnowtomakeitavailable,sincethecompletewindowsystemmanual ,isunlikelytobenishedinthenearfuture.Theinformationinthisdocumentisaccurateasof ,system67,butisnotguaranteedtoremain100%accurate.Tounderstandsomeportionsofthis ,documentmaydependonbackgroundinformationwhichisnotcontainedinanypublished ,documentation. "% ,Thewindowsystemcontainsseveralfacilitiestoallowtheusertomakechoices.Theseallwork ,bydisplayingsomearrangementofchoicesinawindow;bypointingtoonewiththemousethe ,usercanselectit.Thisdocumentexplainswhatthevariousfacilitiesare,howtousethem,and ,how to customize them for your own purposes. """o ,A.I.LaboratoryWorkingPapersareproducedforinternalcirculation, andmaycontain ,informationthatis,forexample,toopreliminaryortoodetailedforformalpublication.Itisnot ,intended that they should be considered papers to which reference can be made in the literature. "R ""! ,Window System Choice Facilities 1 IChoice Facilities "P ,1. Choice Facilities "( ^Thewindowsystemcontainsseveralfacilitiestoallowtheusertomakechoices.Theseall ,workbydisplayingsomearrangementofchoicesinawindow.Bypointingtoonewiththe ,mousetheusercanselectit.Thedetails(howthechoicesarespecied,whattheuserinteraction ,lookslike,andwhathappenswhenachoiceisselected)varywidely,whichiswhythereare ,several separate facilities. " ^Eachchoicefacilityisimplementedasafamilyofwindowavors,providingseveralvariations ,onthebasicfacility.Forthosewhodon'twanttocreatetheirownwindow,eachfacilityprovides ,aneasy-to-usefunctioninterfacewhichtemporarilypopsupawindowoftheappropriateavor. ,Thefunctioninterfaceswillbedescribedrstineachsection.Followingthefunctioninterfaces ,there is documentation on how to create and use a window which has the facility. " ^Thisdocumentdoesnotcoverhowtomodifythesefacilitiestoprovideyourownspecialized ,versions,exceptinthesimplestways.Thatiscertainlyareasonablethingtowanttodo.In ,ordertodoityouwillneedtoreadsomeofthecodethatimplementsthefacilityinquestion, ,forinstancetolearnaboutwindowinstancevariablesandaboutinternalmessagesthatyoumight ,want to redene or put daemons on. """""""""s ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Menu Facility 2 kWindow System Choice Facilities "P 1.1 Menu Facility " HAmenuisanarrayofchoices,eachidentiedbyawordorshortphrase.Youcanselect oneofthechoicesbymovingthemousenearit,whichcausesittobehighlighted(aboxappears around it),and then clicking any mouse button. " HWhathappenswhenyouselectoneofthechoicesdependsontheparticulartypeofmenu. Typicallythechoicesinamenumightbecommandstosomeprogramorchoicesforwhata command should operate upon. " HThesystemautomaticallychoosesthearrangementofthechoicesandthesizeandshapeof the window.Naturally there are ways for the user to control this if necessary. " HForanexampleofamenu,clicktheright-handmousebuttontwice,causingtheSystem Menu to appear. "@ 1.1.1 Menu Items " HAmenuhasalistofitems;eachitemrepresentsoneofthechoicesyouhave.Anitemtells themenuwhattodisplayandwhattodoiftheuserselects(clickson)it."Whattodo"species both what value to return and a possible side-eect. " HResponsetoselectionofanitemisimplementedbythe:executemessage,whichisalways sentintheuserprocess(ratherthanthemouseprocess)."Thusside-eectsoccurinthe appropriateprocess.Thereturnedvaluecomesbacktotheuserfromtv:menu-choose,:choose, or :execute depending on how the menu is used.This will be explained in detail later. "% An item can take any of the following forms: " a string or a symbol ^Thestringorsymbolisbothwhatisdisplayedandwhatisreturned.Thereare ^no side-eects. " a cons ^Thisislikeanassq-listentry.Thecarisastringorsymboltodisplayandthe ^cdriswhattoreturn.Thecdrmustbeatomictodistinguishthiscasefromthe ^remaining ones.There are no side-eects. " a list (name value) ^Anotherformofassq-listentry.nameisastringorasymboltodisplay,and ^value is any arbitrary object to return.There are no side-eects. " a list (name type arg option1 arg1 option2 arg2...) ^Thisisthemostgeneralform.nameisastringorasymboltodisplay.typeisa ^keywordsymbolspecifyingwhattodo,andargisanargumenttoit.Theoptions ^arekeywordsymbolsspecifyingadditionalfeaturesdesired,andtheargsfollowing ^them are arguments to those options. "$ The types of menu item are: " :value ^arg is what to return.There are no side-eects. " :eval ^arg is a form to be evaluated.Its value is returned. "T DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 3 fMenu Facility "P ,:funcall targ is a function of no arguments to be called.The value it returns is returned. ," ,:no-select tThisitemcannotbeselected.Movingthemousenearitwillnotcauseittobe thighlighted.Thisisusefulforputtingcomments,headings,andblankspacesinto tmenus.argisignored,butmustbepresenttomaketheitembetheformthat thas a type keyword in it. ," ,:kbd targissenttotheselectedwindowviathe:force-kbd-inputmessage.Typicallyit tiseitheracharactercodewhichistobetreatedasifitwastypedinfromthe tkeyboard,oralistwhichisacommandtotheprogram.Seesection1.1.5,page t8. ," ,:menu targisanewmenutochoosefrom;itissenta:choosemessageandtheresultis treturned.Normallyargwouldbeapop-upmenu.Ifargisasymbolitgets tevaluated. ," ,:buttons targisalistofthreemenuitems.Theitemactuallychosen(i.e.theitemtobe texecuted)isoneofthesethree,dependingonwhichmousebuttonwasclicked. tThe order in the list is (left middle right). ," ,:window-op targisafunctionofoneargument.Theargumentisalistofthreeelements:the twindowthemousewasinbeforethismenuwaspopped-upandtheXandY tcoordinates of the mouse at that time.See page 6. "% ,The menu item modier keywords are: ," ,:font tThiskeywordisfollowedbyafontorasymbolwhichisthenameofafont. tThe item is displayed in that font instead of the menu's default font. ," ,:documentation tThiskeywordisfollowedbyastringwhichbrieydescribesthismenuitem. tWhenthemouseispointingatthisitem,suchthatitishighlighted,the tdocumentationstringwillbedisplayedinthedocumentationlineatthebottomof tthe screen. ,"@ ,1.1.2 Easy Menu Interface ," ,tv:menu-chooseitem-list&optionallabelnear-modedefault-item item-listisalistofitemsasdescribedabove.ItcanalsobethoughtofasaLispa-list. Thisfunctionpopsupamenuandallowstheusertomakeachoicewiththemouse. Whenthechoiceismade,themenudisappearsandthechosenitemisexecuted.The value of that item is returned. " Iftheusermovesthemouseoutofthemenuandfaraway,itpopsdownwithout making any choice and this function returns nil. " labelisastringtobedisplayedatthetopofthemenu,ornil(thedefault)tospecifythe absence of a label. " near-modeiswheretoputthemenu.Itdefaultstothelist(:mouse)andmustbean acceptable argument to tv:expose-window-near. "" ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Menu Facility 4 kWindow System Choice Facilities "P zdefault-itemistheitemoverwhichthemouseshouldbepositionedinitially.Thisallows ztheusertoselectthatitemwithoutmovingthemouse."Ifdefault-itemisnilor zunspecied,the mouse is initially positioned in the center of the menu. "@ 1.1.3 Geometry " HAmenuhassomethingcalleditsgeometry,whichiswhatcontrolsthesizeandshapeofthe menuandthearrangementofthedisplayedchoices.Thecreatorofamenumayspecifysome aspectsofthegeometryexplicitly,whileleavingotheraspectsfreetobechosenbythesystem according to its esthetic sense. " HTherearetwowaysthechoicescanbedisplayed.Theycanbeinanarrayofrowsand columns,ortheycanbe"lled",thatis,asmanytoalineaswilltwithareasonableamount of white space in between.Filled format is specied by giving zero as the number of columns. "% The geometry is represented as a list of six elements: " columns The number of columns (0 for lled format). " rows The number of rows. " inside width Theinside-widthofthewindow,inbits.Iftheuserexplicitlysetsthesizeor edgesofthewindow,itwillberememberedhereandactasaconstrainton the menu from then on. " inside height Theinside-heightofthewindow,inbits.Iftheuserexplicitlysetsthesizeor edgesofthewindow,itwillberememberedhereandactasaconstrainton the menu from then on. " maximum width Themaximumwidthofthewindow,inbits.Thesystemwillprefertochoose a tall skinny shape rather than exceed this. " maximum height Themaximumheightofthewindow,inbits.Thesystemwillpreferto chooseashortfatshaperatherthanexceedthis.Ifboththemaximumwidth andthemaximumheightareeective,thesystemwilldisplayonlysomeof the menu items and enable scrolling to make the rest accessible. " HIfanelementofthegeometryisnil,thismeansthatitisunspeciedandthesystemmay chooseit.Thedefaultgeometryisallnil.Thedefaultshapeisanuprightgoldenrectangle, usingrows-and-columnsformwithasmanycolumnsasrequired.Mostsmallmenuswillhave only one column. " HWhenthesize,shape,oritem-listofamenuischanged,theunspeciedportionsofthe geometrywillberecomputed.Explicitsettingofthesizeorshape(bysendingthestandard messages for this purpose) is remembered in the geometry. "% The following init-plist options to a menu will initialize the geometry: """ DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 5 fMenu Facility "P ,:geometrylist(Init Option) Sets the complete geometry. ," ,:rowsn-rows(Init Option) Sets the number of rows. ," ,:columnsn-columns(Init Option) Sets the number of columns. ," ,:fill-pt-or-nil(Init Option) Species whether to use lled format. "$ ,The following messages may be sent to any avor of menu to manipulate its geometry: ," ,:geometry(to tv:menu) Returnsalistofsixthings,themenu'sgeometry.Thesearetheconstraints,withnilin unspecied positions;contrast :current-geometry. ," ,:current-geometry(to tv:menu) Returnsalistofsixthings,whicharethegeometrycorrespondingtotheactualcurrent stateofthemenu.Onlythemaximumwidthandmaximumheightcanbenil.Constrast this with :geometry. ," ,:set-geometry&optionalcolumnsrowsinside-widthinside-heightmax-widthmax-height ????????(to tv:menu) Notethatthistakessixargumentsratherthanalistofsixthingsasyoumightexpect. Thisisbecauseyoufrequentlywanttoomitmostofthearguments.Thegeometryisset fromthearguments,whichcancausethemenutochangeitsshapeandredisplay.An argumentofnilmeanstomakethataspectofthegeometryunconstrained.Anomitted argument or an argument of t means to leave that aspect of the geometry the way it is. ," ,:fill-p(to tv:menu) ,:set-fill-pt-or-nil(to tv:menu) Getorsetthemenu'sllmode,tifitdisplaysinlledformratherthancolumnarform. This is a special case of the :geometry/:set-geometry messages. ,"@ ,1.1.4 Ordinary Menus " ^Thesearethebasicandmixinavorsfortheordinarykindsofmenus.Theycannotbe ,instantiatedthemselvesbutareusefultoknowabout.Otherkindsofmenusarediscussedinlater ,sections. ," ,tv:basic-menu(Flavor Everything else is built on this. ," ,tv:basic-momentary-menu(Flavor Thisisakindofmenuwhichisonlymomentarilyonthescreen,oftenreferredtoasa "popup"menu.Achooseoperationonamenuofthisavorcausesittopositionitself wherethemouseis.Whentheuserselectsaniteminthemenu,oralternativelymoves the mouse far away from the menu,the menu disappears and deactivates. "4 ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Menu Facility 6 kWindow System Choice Facilities "P tv:window-hacking-menu-mixin(Flavor zProvides for the :window-op item type. "$ These are the interesting instantiatable menu avors: " tv:menu(Flavor zThisistv:basic-menuwithbordersandalabelontop.Thedefaultisfortheretobeno zlabel but you can specify one with the :label init-plist option or the :set-label message. " tv:momentary-menu(Flavor zThisistv:basic-momentary-menumixedwiththerightotheravors.Momentarymenus zwere described at the beginning of this section. " tv:pop-up-menu(Flavor zThisisnotwhatisusuallymeantbyapop-upmenu.Itisacombinationoftv:menuand ztv:temporary-window-mixin,butdoesnothavetheautomaticexposeanddeexpose zfeatures of tv:momentary-menu. " zItisappropriatetouseapop-upmenuratherthanamomentarymenuwhenyouwantto zpopamenuupandmakeseveralchoicesfromitbeforepoppingitbackdown,orifyou zdon'twanttoallowtheusertheoptionofchoosingnothingbymovingthemouseoutof zthe window. " tv:momentary-window-hacking-menu(Flavor zA momentary menu with the window-hacking mixin. " tv:momentary-menu&optional(superior tv:mouse-sheet)(Resource) zThisisaresourceofmomentarymenus.tv:menu-chooseallocatesawindowfromthis zresource. " HThefollowingmessagesareusefultosendtoanyavorofmenu.Alsolistedareinitoptions whichareusefulwithanyavorofmenu.Inadditiontothesegeneral-purposesmessagesandinit options,thosewhichspecicallyhavetodowiththeshapeandarrangementofthemenuare listed in the Geometry section (section 1.1.3,page 4). " :item-list(to tv:menu) :set-item-listitem-list(to tv:menu) zGetorsetthelistofitems(choices).Settingtheitem-listrecomputesthegeometryand zredisplays the menu. " :item-listitems(Init Option) zThe item-list can be set when the menu is created. " :choose(to tv:menu) zExposesthemenuifitisnotalreadyexposed,thenwaitsforaselectiontobemadewith zthemouse.Theselectionis:execute'dandtheresultingvalueisreturned.Amomentary zmenuwillreturnnilfrom:chooseifthemouseismovedfaroutofit,andinanycase zwill pop down before returning. "" DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 7 fMenu Facility "P ,:executeitem(to tv:menu) Givenanitemthatwasselected,performstheappropriateside-eectsandreturnsthe appropriate value. ," ,:move-near-windowwindow(to tv:menu) Exposes the menu above or below the specied window,giving it the same width. ," ,:center-aroundxy(to tv:menu) Exposesthemenu,puttingitscenterorthecenterofthelastitemchosenatthose coordinatesinthesuperior.Ifthiswouldcausethemenutostickoutsideofitssuperior, itisosetslightlytokeepitinside. Theactualcoordinatesofthecenterofthe appropriateitemarereturned(youmightwanttoputthemousethere).Momentary menususethistoputthemenuinsuchaplacethatthemousewillberightoverthelast item chosen. ," ,:current-item(to tv:menu) Gettheitemthemouseiscurrentlypointingat(nilifnone).Inmostcasesifyouare using this message you are doing something wrong. ," ,:chosen-item(to tv:menu) ,:set-chosen-itemitem(to tv:menu) Getorsettheitemwhichhasbeenchosenbythemouseandisbeingcommunicated backtothecontrollingprocess.Inmostcasesifyouareusingthesemessagesyouare doing something wrong. ," ,:last-item(to tv:menu) ,:set-last-itemitem(to tv:menu) Getorsettheitemwhichwaschosenbythemousethelasttimethismenuwasused. Whenamomentarymenuisexposednearthemousebythe:choosemessage,itwillput the mouse over this item so that it easy to choose it again. ," ,:column-row-size(to tv:menu) Returns two values:the width of a column in bits and the height of a row in bits. ," ,:item-cursorpositem(to tv:menu) Returnstwovalueslike:read-cursorposgivingthecoordinatesofthecenterofthe displayed representation of item.The result is nil if the item is scrolled o the display. ," ,:item-rectangleitem(to tv:menu) Returnsfourvalues,thecoordinatesoftherectangleenclosingthedisplayedrepresentation ofthespecieditem.Theresultisniliftheitemisscrolledothedisplay.Notethat thereturnedcoordinatesareinsidecoordinatesandthattheyincludea1-pixelmargin around the item. ," ,:menu-draw(to tv:menu) Draws the menu's display.This is a message so that daemons can be put on it. ""^ ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Menu Facility 8 kWindow System Choice Facilities "P 1.1.5 Command Menus " tv:command-menu-mixin(Flavor zThiskindofmenuisnotoperatedbythe:choosemessage.Instead,whentheuser zselectsanitem,acommandissenttothecontrollingprocessthroughanio-buer.The zcommandisalist,(:menuitembutton-maskwindow).Thecontrollingprocessshould z(funcallwindow':executeitem).Thisisusefulforamenuwhichdoesnotstandalone zbutispartofaframe.Thecontrollingprocesscanbelookinginitsio-buerfor zcommands from several windows as well as keyboard input. " tv:command-menu(Flavor zThis is tv:command-menu-mixin mixed with tv:menu to make it instantiatble. " :io-buffer(to tv:command-menu) :set-io-bufferio-buer(to tv:command-menu) zThesemessagesgetorsettheio-buertowhichacommand-menusendsacommand zwhen an item is selected. " :io-bufferbuf(Init Option) zThe io-buer to be used by a command menu is usually specied when it is created. " tv:command-menu-abort-on-deexpose-mixin(Flavor zWhenacommandmenubuiltonthisavorisdeexposed,itautomaticallyclicksonits zABORTbutton.Inotherwords,whensuchamenureceivesthe:deexposemessage,it zsearchesitsitemlistforanitemwhosedisplayedrepresentationis"ABORT".Ifsuchan zitemisfound,ablipissenttotheio-buerindicatingthatthatitemwasclickedupon zwith the Left button. "@ 1.1.6 Dynamic Item List Menus " tv:dynamic-item-list-mixin(Flavor zProvidesforaformwhichisevaluatedtogetthemenu'sitem-list,keptinthetv:item- zlist-pointerinstancevariable.Thisformisevaluatedatappropriatetimes(forinstance zwhen the :choose message is sent) to check whether the item-list should change. " :update-item-list(to tv:dynamic-...-menu) zThismessageisonlyacceptedbymenuswiththedynamicitem-listmixin.Itsendsa z:set-item-listifoneisnecessary.Themenusendsitselfthismessageautomaticallyat zappropriate times. " :item-list-pointerform(Init Option) zform is saved and evaluated periodically to get the item-list for the menu. "$ These are menu avors which are just combinations of this with other avors: " tv:dynamic-momentary-menu(Flavor zA momentary menu with the dynamic item-list mixin. "" DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 9 fMenu Facility "P ,tv:dynamic-momentary-window-hacking-menu(Flavor A momentary menu with both the dynamic item-list mixin and the window-hacking mixin. ," ,tv:dynamic-pop-up-menu(Flavor A pop-up menu with the dynamic item-list mixin. ," ,tv:dynamic-pop-up-command-menu(Flavor A command menu with the pop-up and dynamic item-list mixins. ," ,tv:dynamic-pop-up-abort-on-deexpose-command-menu(Flavor A command menu with the pop-up,abort-on-deexpose,and dynamic item-list mixins. ,"@ ,1.1.7 Multiple Menus ," ,tv:menu-highlighting-mixin(Flavor Providesforsomeofthemenuitemstobehighlightedwithinversevideo.Thisis typicallyusedwithmenusof"modes",wherethemodescurrentlyineectare highlighted.Themenuitemscorrespondingtomodeswilltypicallybesetupsothat when executed,they adjust the highlighting to reect the enabling or disabling of a mode. ," ,tv:multiple-menu-mixin(Flavor Givesamenutheabilitytohavemultipleitems"selected".Selecteditemsarehighlighted withinversevideo,usingtheabovehighlightingmixin.Clickingonanitemmerely complementsitsselectedstateanddoesnotexecuteitnorreturnfromthe:choose message. " Inaddition,atthetopofthemenu,initalics,aredisplayedsome"specialchoices"which cannotbehighlighted.Clickingononeofthesebehavesthesameasclickingonanitem ofanordinarymenu.BydefaulttheonlyspecialchoiceisDoIt,whichreturnsalistof theresultsofexecutingallthehighlightedchoices(i.e.theresultofthe:highlighted- valuesmessage).Youcandeneyourownspecialchoiceswiththe:special-choices init-plist option,or get rid of them entirely by giving nil as the argument to this option. ," ,tv:multiple-menu(Flavor Amenuwhichbehavesasdescribedabove.Thisisacombinationoftv:multiple-menu- mixin with tv:menu. ," ,tv:momentary-multiple-menu(Flavor A multiple-menu which is momentary. "% ,The following messages and init-plist options pertain to these avors of menus: ," ,:highlighted-items(to tv:menu-highlighting-mixin) ,:set-highlighted-itemslist(to tv:menu-highlighting-mixin) Getorsetthelistofitemswhicharehighlighted.Thesemessagesareacceptedonlyby menus with the menu-highlighting mixin. ""C ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Menu Facility y10 kWindow System Choice Facilities "P :highlighted-itemsitems(Init Option) zWhenamenuwiththemenu-highlightingmixiniscreated,thelistofitemstobeinitially zhighlighted may be specied.The default is nil. " :add-highlighted-itemitem(to tv:menu-highlighting-mixin) :remove-highlighted-itemitem(to tv:menu-highlighting-mixin) zThesemessages,acceptedonlybymenuswiththehighlightingmixin,areusedto zhighlight or un-highlight an item. " :highlighted-values(to tv:menu-highlighting-mixin) :set-highlighted-valueslist(to tv:menu-highlighting-mixin) :add-highlighted-valuevalue(to tv:menu-highlighting-mixin) :remove-highlighted-valuevalue(to tv:menu-highlighting-mixin) zThesemessagesaresimilartotheprecedingfour,exceptthatinsteadofreferringtoitems zdirectlyyourefertotheirvalues,i.e.theresultofexecutingthem.Forinstanceifyour zitem-listisanassociationlist,withelements(string . symbol),thesemessagesusesymbol. zThisonlyworksformenuitemsthatcanbeexecutedwithoutside-eects,notthe:eval, z:funcall,etc. kinds. " :special-choiceschoice-list(Init Option) zEachelementofchoice-listspeciesamenuitemforamultiple-menu.Thesearethe zitemswhichbehavelikenormalmenuitems;theitemsfromthe:item-listinitoption zbehaveason/oswitchesasdescribedabove.Anelementofchoice-listmaybeanyform zof menu item. """"""""l DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 11 lMultiple Choice Facility "P ,1.2 Multiple Choice Facility " ^TheMultipleChoicefacilityprovidesawindowcontainingabunchofitems,onepertextline. ,For eachitem,therecanbeseveralyes/nochoicesfortheusertomake.Thewindowisarranged ,incolumns,withheadingsatthetop.Theleftmostcolumncontainsthetextnamingeachitem. ,Theremainingcolumnscontainsmallboxes(calledchoiceboxes).A"no"boxhasablankcenter, ,whilea"yes"boxcontainsan"X".Pointingthemouseatachoiceboxandclickingtheleft ,buttoncomplementsitsyes/nostate.Eachchoicecanbeinitializedbytheprogramtoyesorno ,asappropriateforadefault.Notethatsomeitemsmaynotallowsomechoices,sotherecanbe ,blank places in the array of choice boxes. " ^Therecanbeconstraintsamongthechoicesforanitem.Forexample,iftheyaremutually ,exclusivethenclickingonechoiceboxto"yes"willautomaticallysettheotherchoiceboxeson ,the same line to "no". " ^Foranexampleofamultiple-choicewindow,trytheKillorSaveBuffersoperationinthe ,editor menu. " ^There are several parameters associated with a multiple-choice window: " ^The item-name is a string which is the column heading for the leftmost column. " ^Theitem-listisalistofrepresentationsofitems.Eachelementisalist,(itemnamechoices). ,itemisanyarbitraryobject.nameisastringwhichnamesthatobject;itwillbedisplayedonthe ,leftonthelineofthedisplaydevotedtothisitem.choicesisalistofkeywordsrepresentingthe ,choicestheusercanmakeforthisitem.Eachelementofchoicesiseitherasymbol,keyword,or ,alist,(keyworddefault).Ifdefaultispresentandnon-nil,thechoiceisinitially"yes";otherwise ,it is initially "no". " ^Thekeyword-alistisalistdeningallthechoicekeywordsallowed.Eachelementtakesthe ,form(keywordname).keywordisasymbol,thesameasinthechoiceseldofanitem-list ,element.nameisastringusedtonamethatkeyword.Itisusedasthecolumnheadingforthe ,associated column of choice boxes. " ^Anelementofkeyword-alistcanhaveuptofouradditionallistelements,calledimplications. ,Thesecontrolwhathappenstootherchoicesforthesameitemwhenthischoiceisselectedbythe ,user.Eachimplicationcanbenil,meaningnoimplication,alistofchoicekeywords,ort ,meaningallotherchoices.Therstimplicationison-positive;itspecieswhatotherchoicesare ,alsosetto"yes"whentheusersetsthisoneto"yes".Thesecondimplicationison-negative;it ,specieswhatotherchoicesaresetto"no"whentheusersetsthisoneto"yes".Thethirdand ,fourthimplicationsareo-positiveando-negative;theytakeeectwhentheusersetsthischoice ,to"no".Thedefaultimplicationsareniltnilnil,respectively.Inotherwordsthedefaultisfor ,the choices to be mutually exclusive. " ^If the implications are not present,the defaults are rplacd'ed into the keyword-alist element. " ^Thenishing-choicesarethechoicestogointhebottommargin.Whentheuserclickson ,oneoftheseheisdone.Thevariabletv:default-finishing-choicescontainsareasonabledefault ,for this,providing Do It and Abort choices. "% ,This is the easy interface to the multiple choice facility: "+ ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Multiple Choice Facility y12 kWindow System Choice Facilities "P tv:multiple-chooseitem-nameitem-listkeyword-alist&optionalnear-modemaxlines zPopsupamultiple-choicewindowandallowstheusertomakechoiceswiththemouse. zThedimensionsofthewindowareautomaticallychosenforthebestpresentationofthe zspecied choices.If there are too many choices,scrolling of the window is enabled. " zitem-name,item-list,andkeyword-alistareasdescribedabove.nishing-choicescannotbe zspecied and is always the default. " zWhentheuserclicksononeofthetwonishingchoicesinthebottommargin(DoIt zandAbort)thewindowdisappearsandtv:multiple-choosereturns.Iftheusernishesby zchoosingAbortthereturnedvalueisnil.IftheuserchoosesDoIt,thereturnedvalueis zalistwithoneelementforeachitem.Eachelementisalistwhosecaristheitem(that zarbitraryobjectwhichtheuserpassedinintheitem-listargument)andwhosecdrisalist zof the keywords for the "yes" choices selected for that item. " znear-modetellsthewindowwheretopopup.Itisasuitableargumentfortv:expose- zwindow-near.Thedefaultisthelist(:mouse).maxlines,whichdefaultstotwenty,is zthe maximum number of choices allowed before scrolling is used. "% These are the grubby details: " tv:basic-multiple-choice(Flavor zThisisthebasicavorwhichmakesawindowimplementthemultiple-choicefacility. zLikemostbasicmixins,itisnotitselfinstantiatablebutitdoescommitanywindowthat zincorporatesittobeingamultiple-choiceratherthananydierentsortofwindow. ztv:basic-multiple-choice is built out of tv:text-scroll-window. " tv:multiple-choice(Flavor zThisisareasonablewindowwiththemultiple-choicefacilityinit.Ithasbordersanda zlabel area on top which is used for the column headings. " tv:temporary-multiple-choice-window(Flavor zThis is a multiple-choice window which is equipped to pop up temporarily. " tv:temporary-multiple-choice-window&optional(superior tv:mouse-sheet)(Resource) zThisisaresourceofpop-upmultiple-choicewindows,usedbythetv:multiple-choose zfunction. "% The following messages are useful to send to a multiple-choice window: " :setupitem-namekeyword-alistnishing-choicesitem-list&optionalmaxlines ??????(to tv:multiple-choice) zThismessagesetsupallthevariousparametersofthewindow.Usuallyonesendsthis zmessagewhilethewindowisdeexposed.Thewindowdecideswhatsizeitshouldbeand zwhetheralltheitemswilltorscrollingisrequired,thendrawsthedisplayintoitsbit- zarray.Thus when the window is exposed the display will appear instantaneously. " zmaxlinesisthemaximumnumberoflinesthewindowmayhave;iftherearemoreitems zthanthisonlysomeofthemwillbedisplayedandscrollingwillbeenabled.maxlines zdefaults to 20. "K DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 13 lMultiple Choice Facility "P ,:choose&optionalnear-mode(to tv:multiple-choice) Movesthewindowtotheplacespeciedbynear-mode,whichdefaultstothelist (:mouse),andexposesit.Thenwaitsfortheusertomakeanishingchoiceandreturns thewindowtoitsoriginalactivate/exposestatusbeforethe:choose.Thismessagereturns the same value as the function tv:multiple-choose. """""""""""""" ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Choose Variable Values Facility y14 kWindow System Choice Facilities "P 1.3 Choose Variable Values Facility " HThisfacilitypresentstheuserwithadisplayofabunchofLispvariablesandtheirvalues. Theusermaychangethevalueofsomeofthevariables.Whenthevaluesaretohislikinghe may indicate that he is done. " HEachlineofthedisplaycorrespondstoonevariable.Thenameofthevariable,acolon,and thevalueofthevariablearedisplayed.Pointingthemouseatthevaluecausesaboxtoappear around it.Clicking the left mouse button at that point allows the value to be changed. " HForanexampleofachoose-variable-valueswindow,trytheFrameoptionoftheSplitScreen command in the system menu. " HEachvariablehasatypewhichcontrolswhatvaluesitmaytakeon.Thewaythevalueis displayedandthewaytheuserentersanewvaluedependonthetype.Thetypemechanismis extensibleandisdescribedindetaillater.Thetypesfallintotwocategories,thosewithasmall numberoflegalvaluesandthosewithalargeorinnitenumberoflegalvalues.Therstkind oftypedisplaysallthechoices,withtheonewhichisthecurrentvalueofthevariableinbold- face.Pointingatachoiceandclickingthemousesetsthevariabletothatvalue.Thosetypes withalargenumberoflegalvaluesdisplaythecurrentvalue.Pointingatthevalueandclicking themouseallowsanewvaluetobeenteredfromthekeyboard.Rubbingoutmorecharacters than typed in restores the original value instead of changing it. " HAllvariableswhosevaluesaretobechosenmustbedeclaredspecial,sothattheyare representedbyLispsymbolsandcanbeaccessednon-locallytotheuser'sprogram.Thesyntax forinputandoutputiscontrolledbythebindingofbase,ibase,*nopoint,prinlevel, prinlength,package,and readtable as usual. "% Each line of the display is represented by an item,which can be one of the following: " a string ^Thestringissimplydisplayed.Thisisusefulforputtingheadingsandblank ^separating lines into the display. " a symbol ^Thesymbolisavariablewhosetypeis:sexp;thatis,itsvaluemaybeanyLisp ^object.The name of the variable on the display is simply its print-name. " a list (variable name type args...) ^Thisisthegeneralform.variableisthevariablewhosevalueisbeingchosen. ^nameisoptional;ifitisomitteditdefaultstotheprint-nameofvariable.If ^nameissupplieditcanbeastring,whichisdisplayedasthenameofthe ^variable,oritcanbenil,meaningthatthislineshouldhavenovariablename, ^butonlyavalue.typeisanoptionalkeywordgivingthetypeofvariable;if ^omitteditdefaultsto:sexp.argsarepossibleadditionalspecicationsdependent ^ontype.Itispossibletoomitnameandsupplytypesinceoneisalwaysastring ^and the other is always a symbol. " HThefollowingarethetypesofvariablessupportedbydefault,alongwithanyargsthatmay be put in the item after the type keyword: " :sexp ^The value is any Lisp S-expression,printed with prin1,read in with read. " :princ ^Same as :sexp except that the value is printed with princ rather than prin1. "[ DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 15 Choose Variable Values Facility "P ,:string tThe value is a string,printed with princ,read in with readline. ," ,:number tThevalueisanumber(eitherxedoroating).Itisprintedwithprin1andread twith read,but only a number is accepted on type-in. ," ,:character tThevalueisaxnumwhichisacharactercode.Itisprintedasthecharacter tname (using the ~:@C format operator),and is read as a single keystroke. ," ,:character-or-nil tLike:characterbutnilisalsoallowedasthevalue.nildisplaysas"none"and tcan be input via the Clear Input key. ," ,:choose values-list print-function tThevalueofthevariablemustbeoneoftheelementsofthelistvalues-list. tComparisonisbyequalratherthaneq.Allthechoicesaredisplayed,withthe tcurrentvalueinboldface.Anewvalueisinputbypointingtoitwiththemouse tandclicking.print-functionisthefunctiontoprintavalue;itisoptionaland tdefaults to princ. ," ,:assoc values-list print-function tLike:choosebutcarofeachelementofvalues-listiswhattodisplay,whilecdr tis the value that goes in the variable. ," ,:boolean tThevalueofthevariableiseithertornil.Thechoicesaredisplayedasyesand tno. " ^Achoose-variable-valueswindowoptionallymayhaveanassociatedfunction,whichiscalled ,wheneveravariable'svalueischanged.Thisfunctioncanimplementconstraintsamongthe ,variables.Itiscalledwithargumentswindow,variable,old-value,andnew-value.Thefunction ,shouldreturnnilifjusttheoriginalvariableneedstoberedisplayed,ortifnoredisplayis ,required;inthiscaseitwouldusuallysetqseveralofthevariablesthensenda:refreshmessage ,to the window. " ^Thesystemchoosesthedimensionsofthewindow,andenablesscrollingiftherearetoo ,many variables to t in the chosen height. ," ,tv:choose-variable-valuesvariables&restoptions Thisistheeasy-to-usefunctioninterfacetothechoose-variable-valuesfacility.Itpopsup awindowdisplayingthevaluesofthespeciedvariablesandpermitstheusertoalter them.Oneormorechoiceboxes(asinthemultiple-choicefacility)appearinthebottom marginofthewindow.WhentheuserclicksontheExitchoiceboxthewindow disappearsandthisfunctionreturns.Thevaluereturnedisnotmeaningful;theresultis expressed in the values of the variables. " optionsistheusuallistofalternatingoptionkeywordsandargumentvalues."The following option keywords are allowed: " :label XTheargumentisastringwhichisthelabeldisplayedatthetopofthe Xwindow.The default is "Choose Variable Values". " :function XThefunctiontobecallediftheuserchangesthevalueofavariable.The Xdefault is nil (no function). " :near-mode XWheretopositionthewindow.&Thisisasuitableargumentfor Xtv:expose-window-near.The default is the list (:mouse). "6 ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Choose Variable Values Facility y16 kWindow System Choice Facilities "P z:margin-choices BTheargumentisalistofspecicationsforchoiceboxestoappearinthe Bbottommargin.Eachelementcanbeastring,whichisthelabelforthe Bboxwhichmeans"done",oraconsofalabelstringandaformtobe Bevaluatedifthatchoiceboxisclickedupon.Sincethisformisevaluated Bintheuserprocessitcandosuchthingsasalterthevaluesofvariablesor B*throw out.The default for :margin-choices is ("Exit"). z" z:superior BTheargumentisthewindowtowhichthepop-upchoose-variable-values Bwindowshouldbeinferior.Thedefaultisthevalueoftv:mouse-sheet, Bor the superior of w if near-mode is (:window w). "@ 1.3.1 User Option Facility " HThereisafacility,basedontheChoose-Variable-Valuesfacility,forkeepingtrackofoptions toaprogramofthesortthatauserwouldspecifyonceandkeepinhisinitle.Specialforms areprovidedfordeningoptions,andtherearefunctionsforputtingalltheoptionsintoa choose-valueswindowsothattheusercanalterthem,forwritingthecurrentstateoftheoptions into an init le,and for resetting all the options to their default initial values. " define-user-option-alist Special Form z(define-user-option-alistname)denesnametobeaglobalvariablewhosevalueisa z"useroptionalist",somethingwhichmaybeusedbytheotherfunctionsbelow.Thisalist zwill keep track of all of the option variables for a particular program. " z(define-user-option-alistnameconstructor)alsospeciesthenameofaconstructor zmacrotobedened,whichprovidesaslightlydierentwayofdeninganoptionvariable zfromdefine-user-option.Theform(constructoroptiondefaulttypename)willdenean zoption in this user-option-alist.The arguments are the same as to define-user-option. " define-user-option Special Form z(define-user-option(optionalist)defaulttypename)denesthespecialvariableoptionto zbeanoptioninthealist,whichmusthavebeenpreviouslydenedwithdefine-user- zoption-alist.Thevariableisdeclaredandinitializedvia(defvaroptiondefault).The zvalue of the form default is remembered so that the variable can be reset back to it later. " ztypeisthetypeofthevariableforpurposesofthechoose-variable-valuesfacility.Itis zoptional and defaults to :sexp. " znameisthenameofthevariabletobedisplayedinthechoose-variable-valueswindow.It zisoptionalanddefaultstoastringwhichistheprint-nameofthevariableexceptwith zhyphenschangedtospacesandeachwordchangedfromall-upper-casetorst-letter- zcapitalized.Iftherstandlastcharactersoftheprint-nameareasterisks,theyare zremoved.E.g. the default name for so:*sunny-side-up* would be "Sunny Side Up". " choose-user-optionsalist&restoptions zDisplaysthevaluesoftheoptionvariablesinalisttotheuserandallowsthemtobe zaltered.The options are passed along to tv:choose-variable-values. "" DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 17 Choose Variable Values Facility "P ,reset-user-optionsalist Each of the option variables in alist is reset to its default initial value. ," ,write-user-optionsaliststream Foreachoptionvariableinalistwhosecurrentvalueisnotequaltoitsdefaultinitial value,aformisprintedtostreamwhichwillsetthevariabletoitscurrentvalue.The form uses login-setq so it is appropriate for putting into an init le. ,"@ ,1.3.2 Defining Your Own Variable Type ," ,tv:choose-variable-values-keywords Variable Thisisthea-listofdefaultvariable-typekeywords.Eachelementtakesoneofthetwo forms: t(keyword print-function read-function choices print-translate value-translate) t(keyword . function-to-call) Intherstcase,unnecessaryvaluesofnilmaybeomittedattheend.Inthesecond case,function-to-calliscalledwithanargumentofalistwhoserstelementisthe keywordnamingthetype,andwhosesubsequentelements,ifany,areadditional argumentsspeciedbytheuserintheitem.Thefunctionshouldreturnvevalues,the ve elements in the rst form above. " The meaning of the ve magic values is: " print-function XAfunctionoftwoarguments,objectandstream,tobeusedtoprintthe Xvalue.prin1 is acceptable. " read-function XAfunctionofoneargument,thestream,tobeusedtoreadanewvalue. Xreadisacceptable.Ifnilisspecied,thereisnoread-functionand Xinsteadnewvaluesarespeciedbypointingatonechoicefromalist.If Xtheread-functionisasymbol,itiscalledinsidearubout-handler,and Xover-ruboutwillautomaticallyleavethevariablewithitsoriginalvalue.If Xread-functionisalist,itscaristhefunction,anditwillbecalleddirectly Xrather than inside a rubout-handler. " choices XAlistofthechoicestobeprinted,ornilifjustthecurrentvalueistobe Xprinted. " print-translate XIftherearechoices,andthisfunctionissuppliednon-nil,itisgivenan Xelement of the choice list and must return the value to be printed. " value-translate XIftherearechoices,andthisfunctionissuppliednon-nil,itisgivenan Xelementofthechoicelistandmustreturnthevaluetobestoredinthe Xvariable. """} ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Choose Variable Values Facility y18 kWindow System Choice Facilities "P 1.3.3 Making Your Own Window " tv:basic-choose-variable-values(Flavor zThisisthebasicavorwhichmakesawindowimplementthechoose-variable-values zfacility.It is built out of tv:text-scroll-window. " zTherearetwowaystousethis.Onecancreateawindowgivingalloftheparametersin ztheinit-plist,oronecancreateawindowwithoutspecifyingtheparametersthensendthe z:setup message (see below). "% The following init-plist options are relevant: " :functionfcn(Init Option) zThefunctioncalledwhenthevalueofavariableischanged.Thedefaultisnil(no zfunction). " :variablesitem-list(Init Option) zThelistofvariableswhosevaluesaretobechosen.Thesecanbeeithersymbolswhich zare variables,or the more general items dened above. " :stack-groupsg(Init Option) zThestackgroupinwhichthevariableswhosevaluesaretobechosenarebound.The zwindowneedstoknowthissothatitcangetthevalueswhilerunninginanotherprocess, zforinstancethemouseprocess.Thisoptionisrequired,unlessyouusethe:setup zmessage. " :name-fontfont(Init Option) zThefontinwhichnamesofvariablesaredisplayed.Thedefaultisthesystemdefault zfont. " :value-fontfont(Init Option) zThefontinwhichvaluesofvariablesaredisplayed.Thedefaultisthesystemdefault zfont. " :string-fontfont(Init Option) zThefontinwhichitemswhicharejuststrings(typicallyheadinglines)aredisplayed.The zdefault is the system default font. " :unselected-choice-fontfont(Init Option) zThefontinwhichchoicesforavalue,otherthanthecurrentvalue,aredisplayed.The zdefault is a small distinctive font. " :selected-choice-fontfont(Init Option) zThefontinwhichthecurrentvalueofavariableisdisplayed,whenthereisaniteset zofchoices.Thisshouldbeabold-faceversionoftheprecedingfont.Thedefaultisthe zbold-face version of the default unselected-choice font. " HIfnodimensionsarespeciedintheinit-plist,thewidthandheightwillbeautomatically chosenaccordingtotheotherinit-plistparameters.Theheightisdictatedbythenumberof elementsintheitem-list. Specifyingaheightintheinit-plist,usinganyofthestandard dimension-specifying init-plist options,overrides the automatic choice of height. "/ DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 19 Choose Variable Values Facility "P ,tv:choose-variable-values-window(Flavor Thisisachoose-variable-valueswindowwithareasonablesetoffeatures,including borders,alabelatthetop,streami/o,theabilitytobescrollediftherearetoomany variables to t in the window,and the ability to have choice boxes in the bottom margin. "$ ,This additional init-plist option is allowed: ," ,:margin-choiceschoice-list(Init Option) Thedefaultisasinglechoicebox,labelled"Done".Seepage24forthedetailsofwhat youcanputhere.Notethatspecifyingnilforthisoptionwillsuppressthemargin-choices entirely. ," ,tv:choose-variable-values-pane(Flavor Atv:choose-variable-values-windowthatcanbeapaneofaconstraint-frame.Itwill not change its size automatically;the size is assumed to be controlled by the superior. ," ,tv:temporary-choose-variable-values-window(Flavor A tv:choose-variable-values-window that is equipped to pop up temporarily. "% ,The following messages are useful to send to a choose-variable-values window: ," ,:setupitemslabelfunctionmargin-choices(to tv:choose-variable-values-window) Changesthelistofitems(variables),thewindowlabel,theconstraintfunction,andthe choicesinthebottommarginandsetsupthedisplay.Alsoremembersthecurrentstack- groupasthestack-groupinwhichthevariablesarebound.Ifthewindowisnotexposed this chooses a good size for it. ," ,:set-variablesitem-list&optionaldont-set-height(to tv:choose-variable-values-window) Changesthelistofitems(variables)andredisplays.Unlessdont-set-heightissuppliednon- nil,theheightofthewindowwillbeadjustedaccordingtothenumberoflinesrequired. Ifmorethan25.lineswouldberequired,25.lineswillbeusedandscrollingwillbe enabled.The :setup message uses :set-variables to do part of its work. ," ,:redisplay-variablevariable(to tv:choose-variable-values-window) Redisplays just the value of that variable. " ^Achoose-variable-valueswindowhasanio-buer,whichitusestosendcommandsbacktoits ,controllingprocess.Asusualthesecommandsarelists,todistinguishthemfromkeyboard ,characters which are numbers. " ^Anexampleofasituationinwhichthisisnecessaryiswhenyouhaveaframe,somepanes ,ofwhicharechoose-variable-valueswindows.Ifallpanessendtothesameio-buer,thenwhen ,oneofthesecommandsarrivesitcanbeprocessedintheappropriatepane.Atthesametime, ,thecontrollingprocesscanbelookingintheio-buerforothercommandsfromotherpanesand ,for input from the keyboard.Compare this with command-menus (see section 1.1.5,page 8). ""~ ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Choose Variable Values Facility y20 kWindow System Choice Facilities "P :io-bufferbuf(Init Option) zThe io-buer to be used. "$ The following io-buer commands are used: " (:variable-choice window item value line-no) ^Indicatesthattheuserclickedonthevalueofavariable,expressingthedesireto ^change it. " (:choice-box window box) ^Indicates that the user clicked on one of the choice boxes in the bottom margin. " tv:choose-variable-values-process-messagewindowcommand zThisfunctionimplementstheproperresponsetotheabovecommands.Itshouldbe zcalledintheprocessandstack-groupinwhichthevariablesbeingchosenarebound.The zfunctionreturnstifthecommandindicatesthatthechoiceoperationis"done",otherwise zitperformstheappropriatespecialactionandreturnsnil.Ifcommandisacharacter,itis zignoredunlessitis#\clear-screen,inwhichcasethechoose-variable-valueswindowis zrefreshed. " tv:temporary-choose-variable-values-window&optional(superior tv:mouse-sheet) ??????(Resource) zThisisaresourceofwindows,fromwhichtv:choose-variable-valuesgetsawindowto zuse. """"""""" DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 21 Mouse-Sensitive Items "P ,1.4 Mouse-Sensitive Items " ^Themouse-sensitiveitemsfacilityisafeaturesomewhatrelatedtothechoicefacilities ,describedabove.Itissimilarinitsappearancetotheuser,butquitedierentinthewayitis ,interfacedtobyaprogram.Mixingtv:basic-mouse-sensitive-itemsintoawindowavorequips ,thewindowwithmouse-handlingaccordingtotheparadigmdescribedinthissection.Mouse- ,sensitiveitemsaresomethingyouusewhendeningyourownwindow,ratherthanacomplete, ,stand-alone facility and consequently do not have an "easy to use" functional interface. " ^Foranexampleofmouse-sensitiveitems,trythec-Xc-B(ListBuers)commandinthe ,editor.Try moving the mouse over the list of buers and clicking the right-hand button. " ^Theword"typeout"appearshereandthereinthemouse-sensitiveitemsfacilityforhistorical ,reasons.Oftenmouse-sensitiveitemsaretypedoutontopofsomeotherdisplay,suchasan ,editor buer.At this point it would be a fairly big incompatible change to x this. ," ,tv:basic-mouse-sensitive-items(Flavor Mixingthisavorintoawindowprovidesforareasofthescreenwhicharesensitiveto themouse.Movingthemouseintosuchanareahighlightstheareawithinversevideo. Atthatpointclickingthemouseperformsauser-denedoperation.Thisavoriscalled basicbecauseitusurpsthehandlingofthemousebythewindow;itwillnotworktomix itwithanotheravorthatalsoexpectstousethemouse.Howeveritislessbasicthan manybasicavorsinthatitdoesnotdoanythingspecialwiththedisplayedimageofthe window. " ^Amouse-sensitiveitemhasatype,whichisakeywordwhichcontrolswhatyoucandotoit, ,anitem,whichisanarbitraryLispobjectassociatedwithit,andarectangularareaofthe ,window.Typicallysomethingisdisplayedinthatareaatthesametimeasamouse-sensitiveitem ,iscreated,usingnormalstreamoutputtothewindow.Unlikethingssuchasmenuitems,these ,mouse-sensitiveitemsarenotapermanentpropertyofthewindow;theyarejustasephemeralas ,thedisplayedtextandgoawayifyouclearthewindoworiftypeoutwrapsaroundandtypes ,over them. " ^Associatedwitheachtypeareasetofoperationsthatarelegaltoperformonitemsofthat ,type.Oneoftheseoperationsisselectedasthedefault.Thetv:item-type-alistinstancevariable ,isana-listwhichdenesthese.Thecarofeachelementisatypekeyword,thecadristhe ,defaultoperation,thecaddrisadocumentationstring,andthecdddristhelistofallthe ,operations(thedefaultdoesn'tnecessarilyhavetobeamemberofthislist).Thecdddris ,actuallyalistofmenuitems,sotypicallyeachelementis(name . operation)wheretheusersees ,thestringnamebuttheprogramidentiestheoperationbythesymboloperation.Thisinstance- ,variablecanbeinitializedviatheinit-plistorsetbysendingamessage,intheusualway.In ,most cases operation is a function to be called,but it can be any atom. " ^Clickingmouse-leftonamouse-sensitiveitemperformsthedefaultoperationonit.Clicking ,mouse-rightpopsupamenuofalltheoperations,andifyouselectoneperformsit.Clicking ,mouse-right-twicecallsthesystemmenu.Othermouseclicksandclickingonanitemwhosetype ,isnotinthetypealistareerrorsandcauseabeep.Whatperforminganoperationmeansisthat ,acommandissenttothecontrollingprocessthroughthe:force-kbd-inputmessagetothe ,window.Thiscommandisalist,(:typeout-executeoperationitem),whereoperationisthe ,operation and item is the arbitrary object remembered by the mouse-sensitive item. "B ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Mouse-Sensitive Items y22 kWindow System Choice Facilities "P tv:add-typeout-item-type Special Form zThe special form ^(tv:add-typeout-item-type alist type name function ^ f n v default-p documentation) zisusedtodeneamouse-sensitiveitemtypebyaddinganentrytoana-listkeptina zspecialvariable.Thisa-listcanthenbeputintotheitem-typealistofamouse-sensitive zwindow,for instance using the :item-type-alist init-plist option. " zalististhespecialvariablewhichcontainsthea-list.Youshoulddefvarittonilbefore zdeningtherstitemtype.typeisthekeywordsymbolforthetypebeingdened.name zisthestringwhichnamestheoperationandfunctionistherepresentationoftheoperation, zforinstancethefunctiontobecalled.default-pisoptional;ifitissuppliedandnon-nil, zitmeansthatthisoperationisthedefaultperformedwhenyouclicktheleftbutton. zdocumentationisoptionalbuthighlyrecommended;itisastringwhichdocumentswhat zfunctiondoes.$Whentheuserpointsthemouseatanitemofthistype, the zdocumentationlineatthebottomofthescreenwillgivethedocumentationforthedefault zfunction(reachablebytheleftbutton)andalistofthefunctionsinthemenu(reachable zbytherightbutton).Iftheuserclicksright,thenthedocumentationforwhichever zfunction in the menu he points the mouse at will be displayed. " zalist,type,andfunctionarenotevaluated.name,default-p,anddocumentationare zevaluated. " zWhenfunctionisafunction,thetv:add-typeout-item-typeformistypicallyplacedright zbefore the denition of function in the program source le. "% The following messages are useful to send to a window with mouse-sensitive items: " :itemtypeitem&restformat-args(to tv:basic-mouse-sensitive-items) zCreatesanddisplaysamouse-sensitiveitemoftypetypewithassociatedobjectitem.If zformat-argsaresupplied,theyareaformatcontrol-stringandargumentsusedtogenerate zthedisplayforthisitem.Ifformat-argsarenotsupplied,thedisplayisgeneratedby zprinc'ing item. " :primitive-itemtypeitemlefttoprightbottom(to tv:basic-mouse-sensitive-items) zCreatesamouse-sensitiveitemoftypetypewithassociatedobjectitem.Thisdoesnot zdisplayanythinginthewindow.left,top,right,andbottomarethecoordinatesofa zrectangular area of the window assumed to contain the display. " :item-listtypelist(to tv:basic-mouse-sensitive-items) zCreatesanddisplaysseveralmouse-sensitiveitems,allofthesametypetype.Theitems zaredisplayedinaregulararraywithasmanycolumnsonalineaswillt.Ifthe zelementsoflistareatomsthentheyaretheitemsandthedisplayisgeneratedby zprinc'ingthem.Otherwisecarofeachelementisthestringtobedisplayedandcdrof zeach element is the item,i.e. list is an a-list. ""u DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 23 Mouse-Sensitive Items "P ,:item-type-alistalist(Init Option) Remembersalistasthesetofitemtypesallowedinthiswindow.alistshouldbecreated by tv:add-typeout-item-type. """"""""""""""d ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Margin Choices y24 kWindow System Choice Facilities "P 1.5 Margin Choices " HAwindowcanbeaugmentedwithchoiceboxes(seepage11)initsbottommarginusingthe avortv:margin-choice-mixin.Thesegivetheuserafewlabelledmouse-sensitivepointswhich areindependentofanythingelseinthewindow.Thusmargin-choicescanbeaddedtoanyavor of window in a modular fashion. " HMarginchoicesarenotacomplete,stand-alonechoicefacilityandconsequentlydonothave an "easy to use" functional interface. " HForanexampleofawindowwithmarginchoices(aswellaschoiceboxesinitsinterior),try the Kill or Save Buffers operation in the editor menu. " tv:margin-choice-mixin(Flavor zPutschoiceboxesinthebottommargin,accordingtoalistofchoice-boxdescriptors zwhichcanbespeciedwiththe:margin-choicesinit-plistoptionorthe:set-margin- zchoicesmessage.Achoice-boxdescriptorisalist,(namestatefunctionx1x2).Itis zlegaltousealongerlistasachoice-boxdescriptorandstoreyourowndatainthe zadditional elements. " znameisastringwhichlabelsthebox.stateistiftheboxhasan"X"init,nilifitis zempty.x1andx2areusedinternallytorememberwherethechoicesboxesare;italways zspreads them out evenly. " zfunctionisafunctionwhichiscalledinaseparateprocessiftheuserclicksonthechoice zbox;itreceivesargumentsoftheelementforthechoicebox,the"marginregion"which zcontainsthechoiceboxes,andtheYpositionofthemouse.Youprobablywantto zignorethelasttwoarguments.Alsowhenthefunctioniscalledselfisboundtothe zwindowandallitsinstancevariablesareboundtospecialvariables.Thestructureaccess zmacrostv:choice-box-nameandtv:choice-box-statemaybeofuseinsidethefunction. zIfthefunctionchangesthestateofthechoicebox,itwillneedtorefreshthechoice zboxes by doing ^(funcall (tv:margin-region-function region) ':refresh region) zwhere region is its second argument. " ztv:margin-choice-mixinisbuiltontv:margin-region-mixin;thepositionofthelatterin zthelistofcomponentavorscontrolswhereinthemarginsthechoiceboxesappear.The zdefaultleavestv:margin-region-mixinlast,whichputsthechoiceboxesinsideanyother zmargin elements such as borders,which is generally what you want. " :margin-choiceschoices(Init Option) zchoicesisalistofchoice-boxdescriptors,describedabove.Alineofchoice-boxeswill zappearinthebottommarginofthewindow.Ifchoicesisnil,therewillbenochoice zboxesandnospacefortheminthebottommargin;howeverthewindowwillstillbe zcapableofacceptingthe:setmargin-choicesmessagetocreatealineofchoiceboxes zlater. ""Y DSK:LMWIND;CHOICE 37 i21-MAY-81 ""! ,Window System Choice Facilities 25 RMargin Choices "P ,:set-margin-choiceschoices(to tv:margin-choice-mixin) Changesthesetofmarginchoicesaccordingtochoices,whichisniltoturnthemoora list of choice-box descriptors,described above. ,""""""""""""""d ,DSK:LMWIND;CHOICE 37 1-MAY-81 ""! Index y26 kWindow System Choice Facilities "P JIndex "d :add-highlighted-item (to tv:menu-highlighting-mixin) Message =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \10"% :add-highlighted-value (to tv:menu-highlighting-mixin) Message U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \10"$ :center-around (to tv:menu) Message n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"% :choose (to tv:menu) Message . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j6"$ :choose (to tv:multiple-choice) Message . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \13"% :chosen-item (to tv:menu) Message V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"$ :column-row-size (to tv:menu) Message . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"% :columns Init Option . .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"$ :current-geometry (to tv:menu) Message . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"% :current-item (to tv:menu) Message V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"$ :execute (to tv:menu) Message . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"% :fill-p Init Option ~. . .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"$ :fill-p (to tv:menu) Message v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"% :function Init Option . .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \18"% :geometry Init Option .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"$ :geometry (to tv:menu) Message &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"% :highlighted-items Init Option . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \10"$ :highlighted-items (to tv:menu-highlighting-mixin) Message . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j9"% :highlighted-values (to tv:menu-highlighting-mixin) Message . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \10"$ :io-buffer Init Option .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. @8, 20"% :io-buffer (to tv:command-menu) Message 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j8"$ :item (to tv:basic-mouse-sensitive-items) Message . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \22"% :item-cursorpos (to tv:menu) Message n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"$ :item-list Init Option .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j6"% :item-list (to tv:basic-mouse-sensitive-items) Message E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \22"$ :item-list (to tv:menu) Message &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j6"% :item-list-pointer Init Option . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j8"$ :item-rectangle (to tv:menu) Message n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"% :item-type-alist Init Option v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \23"% :last-item (to tv:menu) Message &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"$ :margin-choices Init Option v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. 219, 24"% :menu-draw (to tv:menu) Message V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"$ :move-near-window (to tv:menu) Message 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"% :name-font Init Option F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \18"$ :primitive-item (to tv:basic-mouse-sensitive-items) Message . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \22"% :redisplay-variable (to tv:choose-variable-values-window) Message U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \19"$ :remove-highlighted-item (to tv:menu-highlighting-mixin) Message m. . . 5. M. e. |. . ,. D. \. t. . $. <. \10"% :remove-highlighted-value (to tv:menu-highlighting-mixin) Message m. . . 5. M. e. |. . ,. D. \. t. . $. <. \10"$ :rows Init Option ~. . .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"% :selected-choice-font Init Option >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \18"$ :set-chosen-item (to tv:menu) Message . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j7"% :set-fill-p (to tv:menu) Message >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"% :set-geometry (to tv:menu) Message V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j5"$ :set-highlighted-items (to tv:menu-highlighting-mixin) Message =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j9"% :set-highlighted-values (to tv:menu-highlighting-mixin) Message =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \10"$ :set-io-buffer (to tv:command-menu) Message f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j8"%"+  i21-MAY-81 ""! ,Window System Choice Facilities 27 IIndex "P ,:set-item-list (to tv:menu) Message f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 6"$ ,:set-last-item (to tv:menu) Message }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 7"% ,:set-margin-choices (to tv:margin-choice-mixin) Message . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r25"$ ,:set-variables (to tv:choose-variable-values-window) Message 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r19"% ,:setup (to tv:choose-variable-values-window) Message U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r19"$ ,:setup (to tv:multiple-choice) Message . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r12"% ,:special-choices Init Option . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r10"$ ,:stack-group Init Option n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r18"% ,:string-font Init Option V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r18"$ ,:unselected-choice-font Init Option f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r18"% ,:update-item-list (to tv:dynamic-...-menu) Message =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"$ ,:value-font Init Option V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r18"% ,:variables Init Option >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r18"$ ,choose-user-options Function. 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r16"% ,define-user-option Special Form N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r16"% ,define-user-option-alist Special Form . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r16"$ ,reset-user-options Function . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r17"% ,tv:add-typeout-item-type Special Form -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r22"$ ,tv:basic-choose-variable-values Flavor . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r18"% ,tv:basic-menu Flavor >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 5"$ ,tv:basic-momentary-menu Flavor N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 5"% ,tv:basic-mouse-sensitive-items Flavor . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r21"$ ,tv:basic-multiple-choice Flavor 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r12"% ,tv:choose-variable-values Function f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r15"$ ,tv:choose-variable-values-keywords Variable ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r17"% ,tv:choose-variable-values-pane Flavor . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r19"$ ,tv:choose-variable-values-process-message Function =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r20"% ,tv:choose-variable-values-window Flavor E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r19"$ ,tv:command-menu Flavor . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"% ,tv:command-menu-abort-on-deexpose-mixin Flavor U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"% ,tv:command-menu-mixin Flavor N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"$ ,tv:dynamic-item-list-mixin Flavor f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"% ,tv:dynamic-momentary-menu Flavor }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"$ ,tv:dynamic-momentary-window-hacking-menu Flavor U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"% ,tv:dynamic-pop-up-abort-on-deexpose-command-menu Flavor e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"$ ,tv:dynamic-pop-up-command-menu Flavor ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"% ,tv:dynamic-pop-up-menu Flavor f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"$ ,tv:margin-choice-mixin Flavor 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r24"% ,tv:menu Flavor v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 6"$ ,tv:menu-choose Function n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 3"% ,tv:menu-highlighting-mixin Flavor f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"$ ,tv:momentary-menu Flavor . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 6"% ,tv:momentary-menu Resource 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 6"% ,tv:momentary-multiple-menu Flavor }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"$ ,tv:momentary-window-hacking-menu Flavor u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 6"% ,tv:multiple-choice Flavor n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r12"$ ,tv:multiple-choose Function . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r12"% ,tv:multiple-menu Flavor n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"$ ,tv:multiple-menu-mixin Flavor 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"% ,tv:pop-up-menu Flavor n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 6"$"" , 1-MAY-81 ""! Index y28 kWindow System Choice Facilities "P tv:temporary-choose-variable-values-window Flavor -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \19"$ tv:temporary-choose-variable-values-window Resource E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \20"% tv:temporary-multiple-choice-window Flavor N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \12"$ tv:temporary-multiple-choice-window Resource }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \12"% tv:window-hacking-menu-mixin Flavor . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. j6"$ write-user-options Function v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. \17"%"""""""""""""u  i21-MAY-81 ""! ,Window System Choice Facilities i 9Table of Contents "P ^Table of Contents "d ,1. Choice Facilities &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 1"% , 1.1 Menu Facility &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 2"$ , 1.1.1 Menu Items &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 2"% , 1.1.2 Easy Menu Interface . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 3"$ , 1.1.3 Geometry . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 4"% , 1.1.4 Ordinary Menus V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 5"$ , 1.1.5 Command Menus n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"% , 1.1.6 Dynamic Item List Menus N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 8"$ , 1.1.7 Multiple Menus V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. 9"% , 1.2 Multiple Choice Facility . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r11"$ , 1.3 Choose Variable Values Facility f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r14"% , 1.3.1 User Option Facility . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r16"$ , 1.3.2 Dening Your Own Variable Type -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r17"% , 1.3.3 Making Your Own Window f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r18"% , 1.4 Mouse-Sensitive Items . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r21"$ , 1.5 Margin Choices &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r24"%" ,Index ~. . .. F. ^. v. . &. >. V. n. . . 6. N. f. }. . -. E. ]. u. . %. =. U. m. . . 5. M. e. |. . ,. D. \. t. . $. <. T. l. . . 4. L. d. r26"$"""""""""D , 1-MAY-81