<> <> <> <> <> Item ::= ReLabel | Group ReLabel ::= 'ReLabel' '[' Old New ']' | 'ReLabel' '[' SpecificMenu Old New ']' <> SpecificMenu ::= Identifier Old ::= Identifier New ::= Identifier Group ::= '[' GroupName GroupParms* Entry* ']' GroupName ::= Identifier GroupParms ::= 'breakBefore' ':' Bool | 'breakAfter' ':' Bool | 'beginsActive' ':' Bool Entry ::= '[' EntryName EntryParms* '=>' WhatToDoWhenHit ']' EntryName ::= Identifier EntryParms ::= 'guarded' ':' Bool | 'display' ':' StringOrProc WhatToDoWhenHit ::= Input | Action* Action ::= '[' ActionName ActionDoc '=>' Input ']' ActionName ::= Identifier ActionDoc ::= String <> Identifier ::= whatever CedarScanner thinks is an Identifier Input ::= 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 => [Sweep => $UseBroom ] [Vacuum => $Vacuum ] [Mop => $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 ] ] ]