<> <> <> <> Item ::= ReLabel | Menu ReLabel ::= 'ReLabel' '[' SpecificMenu Old New ']' | 'ReLabel' '[' Old New ']' <> SpecificMenu ::= Identifier Old ::= Identifier New ::= Identifier Menu ::= '[' MenuName MenuParms* Entry* ']' MenuName ::= Identifier MenuParms ::= 'breakBefore' ':' Bool | 'breakAfter' ':' Bool | 'beginsActive' ':' Bool | 'notifyProc' ':' Proc Entry ::= '[' EntryName EntryParms* '=>' WhatToDoWhenHit ']' EntryName ::= Identifier EntryParms ::= 'guarded' ':' Bool | 'display' ':' StringOrProc WhatToDoWhenHit ::= NotifyProcData | TriggerAndResults* TriggerAndResults ::= '[' ( SimpleTrigger | TriggerList ) TriggerParms* '=>' NotifyProcData ']' <> TriggerList ::= '[' SimpleTrigger* ']' SimpleTrigger ::= 'notrigger' | 'all' | 'leftup' | 'middleup' | 'rightup' | 'shiftleftup' | 'shiftmiddleup' | 'shiftrightup' | 'allnonshifts' | 'allshifts' | 'allleft' | 'allmiddle' | 'allright' TriggerParms :== 'popUpDoc' ':' String | 'guardResponse' ':' StringOrProc | 'makeActive' ':' String | 'makeInActive' ':' String | 'toggle' ':' String Identifier ::= whatever CedarScanner thinks is an Identifier NotifyProcData ::= ListOfRefAny -- this stuff gets passed to your notify proc Proc ::= '{' ModuleName '.' ProcedureName ListOfRefAny '}' StringOrProc ::= String | Proc ModuleName ::= String ProcedureName ::= String String ::= a quoted String that CedarScanner gets for me Bool ::= 'true' | 'false' ListOfRefAny ::= list of things until I hit a ']' or '}' Examples: The following description is for a simple menu with four entries, each of which sends a single atom when the button is pressed: [HouseCleaningMenu [Dust => $Dust] [Sweep => $UseBroom] [Vacuum => $Vacuum] [Mop => $MopFloors] ] The next example provides the same functionality, but with only two menu entries. It does this by "overloading" the second entry. This means the entry will cause different things to happen depending on whether it is invoked with the left, middle, or right mouse button. [HouseCleaningMenu [Dust => $Dust] [CleanFloors => [allleft => $UseBroom ] [allmiddle => $Vacuum ] [allright => $MopFloors ] ] ] The next example provides the same functionality in yet a third way: The second menu entry is used to "bring up" a secondary menu for the user to click at. The secondary menu is designed to provide three buttons, each of which will cause the menu to disappear after one of the options is invoked. [HouseCleaningMenu [Dust => $Dust] [Places => [all toggle: "FloorCleaningMenu" => ] ] -- note that nothing follows the '=>' ] [FloorCleaningMenu [Sweep => [all makeInActive: "FloorCleaningMenu" => $UseBroom ] ] [Vacuum => [all makeInActive: "FloorCleaningMenu" => $Vacuum ] ] [Mop => [all makeInActive: "FloorCleaningMenu" => $MopFloors ] ] ]