DIRECTORY ViewerSpecs, ViewerOps, Containers, MessageWindow, Menus, Rope, ViewerClasses; MenuTiogaTest: CEDAR PROGRAM IMPORTS Containers, Menus, MessageWindow, Rope = BEGIN c: Containers.Container; Mynotify: ViewerClasses.NotifyProc = { MessageWindow.Append["A Tioga No Op, Brought to you by Nabisco", TRUE]; }; tiogaBasicMenu: Rope.ROPE = " [tiogaBasicMenu [Clear => [allleft => $Empty ] [allmiddle => $New ] [allright => $CloseAndNew ] ] [Reset guarded: TRUE => [allleft guardResponse: \"about to do $RedReset\" => $RedReset ] [allmiddle guardResponse: \"about to do $YellowReset\" => $YellowReset ] [allright guardResponse: \"about to do $BlueReset\" => $BlueReset ] ] [Get => [allleft => $Load ] [allmiddle => $Open ] [allright => $CloseAndOpen ] ] [GetImpl => [allleft => $LoadImpl ] [allmiddle => $OpenImpl ] [allright => $CloseAndOpenImpl ] ] [PrevFile => [allleft => $Empty ] [allmiddle => $New ] [allright => $CloseAndNew ] ] [Store guarded: TRUE => [allleft guardResponse: \"about to do $RedStore\" => $RedStore ] [allmiddle guardResponse: \"about to do $YellowStore\" => $RedStore ] [allright guardResponse: \"about to do $BlueStore\" => $BlueStore ] ] [Save => [allleft => $ClearMessageWindow $RedSave ] [allmiddle => $ClearMessageWindow $YellowSave ] [allright => $ClearMessageWindow $BlueSave ] ] [Time => $Time ] [Split => [allleft => $RedSplit ] [allmiddle => $YellowSplit ] [allright => $BlueSplit ] ] [Places => [all toggle: \"tiogaPlacesMenu\" => $NOOP ] ] [Levels => [all toggle: \"tiogaLevelsMenu\" => $NOOP ] ] [ChangeLog => $FUNCTION ] ]"; tiogaPlacesMenu: Rope.ROPE = " [ tiogaPlacesMenu [Find => [allleft => $FindNext ] [allmiddle => $FindAny ] [allright => $FindPrev ] ] [Word => [allleft => $FindNextWord ] [allmiddle => $FindAnyWord ] [allright => $FindPrevWord ] ] [Def => [allleft => $FindNextDef ] [allmiddle => $FindAnyDef ] [allright => $FindPrevDef ] ] [Position => $Position ] [Normalize => [allleft => $NormalizeToStart ] [allmiddle => $NormalizeToCaret ] [allright => $NormalizeToEnd ] ] [PrevPlace => $PrevPlace ] [Reselect => $Reselect ] ]"; tiogaLevelsMenu: Rope.ROPE = " [ tiogaLevelsMenu [FirstLevelOnly => $FirstLevelOnly] [MoreLevels => $MoreLevels] [FewerLevels => $FewerLevels] [AllLevels => $AllLevels] ] "; myDescription: Rope.ROPE = Rope.Cat[tiogaBasicMenu, tiogaPlacesMenu, tiogaLevelsMenu]; tiogaMenus: LIST OF Menus.Menu = Menus.ParseDescription[myDescription]; c _ Containers.Create[[name: "#1 Empty Container #1"]]; FOR m: LIST OF Menus.Menu _ tiogaMenus, m.rest UNTIL m = NIL DO IF NOT Menus.AlreadyRegistered[m.first.name] THEN Menus.RegisterMenu[m.first]; Menus.AddMenu[c, m.first.name, FALSE]; ENDLOOP; c _ Containers.Create[[name: "#2 Empty PROTECTED Container #2", guardDestroy: TRUE]]; FOR m: LIST OF Menus.Menu _ tiogaMenus, m.rest UNTIL m = NIL DO IF NOT Menus.AlreadyRegistered[m.first.name] THEN Menus.RegisterMenu[m.first]; Menus.AddMenu[c, m.first.name, FALSE]; ENDLOOP; c _ Containers.Create[[name: "#3 Empty Container #3"]]; FOR m: LIST OF Menus.Menu _ tiogaMenus, m.rest UNTIL m = NIL DO IF NOT Menus.AlreadyRegistered[m.first.name] THEN Menus.RegisterMenu[m.first]; Menus.AddMenu[c, m.first.name, FALSE]; ENDLOOP; c _ Containers.Create[[name: "#7 Empty Container #7"]]; FOR m: LIST OF Menus.Menu _ tiogaMenus, m.rest UNTIL m = NIL DO IF NOT Menus.AlreadyRegistered[m.first.name] THEN Menus.RegisterMenu[m.first]; Menus.AddMenu[c, m.first.name, FALSE]; ENDLOOP; c _ Containers.Create[[name: "#8 Empty Container #8"]]; FOR m: LIST OF Menus.Menu _ tiogaMenus, m.rest UNTIL m = NIL DO IF NOT Menus.AlreadyRegistered[m.first.name] THEN Menus.RegisterMenu[m.first]; Menus.AddMenu[c, m.first.name, FALSE]; ENDLOOP; END.  menutiogatest.mesa; Written by R. Pausch Last Edited by: Pausch, August 26, 1983 6:55 pm Last Edited by: Wyatt, October 7, 1983 2:31 pm AMTypes, RTBasic, Interpreter, AMBridge, Imager, ImagerBasic, MenusPrivate, VFonts, [self: Viewer, input: LIST OF REF ANY] StupidNotifyRecord: Menus.EntryNotifyRecord _ [trigger: LIST[all], notifyData: LIST[$NOOP]]; tiogaBasic: Menus.Menu = [ name: "tiogaBasic", notify: Mynotify, entries: LIST [ [name: "Clear", actions: LIST[StupidNotifyRecord] ], [name: "Reset", guarded: TRUE, actions: LIST[StupidNotifyRecord] ], [name: "Get", actions: LIST[StupidNotifyRecord] ], [name: "GetImpl", actions: LIST[StupidNotifyRecord] ], [name: "PrevFile", actions: LIST[StupidNotifyRecord] ], [name: "Store", guarded: TRUE, actions: LIST[StupidNotifyRecord] ], [name: "Save", actions: LIST[StupidNotifyRecord] ], [name: "Time", actions: LIST[StupidNotifyRecord] ], [name: "Split", actions: LIST[StupidNotifyRecord] ], [name: "Places", actions: LIST[ [trigger: LIST[all], notifyData: LIST[$NOOP], toggle: LIST["tiogaPlaces"] ] ] ], [name: "Levels", actions: LIST[ [trigger: LIST[all], notifyData: LIST[$NOOP], toggle: LIST["tiogaLevels"] ] ] ], [name: "ChangeLog", actions: LIST[StupidNotifyRecord] ] ] ]; tiogaPlaces: Menus.Menu = [ name: "tiogaPlaces", notify: Mynotify, beginsActive: TRUE, entries: LIST [ [name: "Find", displayData: "Find", actions: LIST[StupidNotifyRecord] ], [name: "Word", displayData: "Word", actions: LIST[StupidNotifyRecord] ], [name: "Def", displayData: "Def", actions: LIST[StupidNotifyRecord] ], [name: "Position", displayData: "Position", actions: LIST[StupidNotifyRecord] ], [name: "Normalize", displayData: "Normalize", actions: LIST[StupidNotifyRecord] ], [name: "PrevPlace", displayData: "PrevPlace", actions: LIST[StupidNotifyRecord] ], [name: "Reselect", displayData: "Reselect", actions: LIST[StupidNotifyRecord] ] ] ]; tiogaLevels: Menus.Menu = [ name: "tiogaLevels", notify: Mynotify, beginsActive: TRUE, entries: LIST [ [name: "FirstLevelOnly", displayData: "FirstLevelOnly", actions: LIST[StupidNotifyRecord] ], [name: "MoreLevels", displayData: "MoreLevels", actions: LIST[StupidNotifyRecord] ], [name: "FewerLevels", displayData: "FewerLevels", actions: LIST[StupidNotifyRecord] ], [name: "AllLevels", displayData: "AllLevels", actions: LIST[StupidNotifyRecord] ] ] ]; tiogaMenus: LIST OF Menus.Menu = LIST [tiogaBasic, tiogaPlaces, tiogaLevels]; --note: this would be in an external file, but FileIO hasn't been converted yet  note that the internal character quotes '"' have to be prefaces with a backslash since it's not in a file Also note that it's three separate Ropes because the compiler can't deal with long ones (BOGUS!)... ÊÕ˜Jšœ Ïc™(J™/J™.J˜šÏk ˜ Jšœ™Jšœ™Jšœ ™ Jšœ ™ Jšœ ˜ Jšœ ˜ Jšœ ˜ J™J™ J˜Jšœ˜J™ J˜Jšœ™Jšœ˜—J˜Jšœžœž˜Jšžœ'˜.Jšœž˜J˜J˜J˜˜'šœ'™'JšœAžœ˜G—J˜J˜—Jšœ8žœžœ ™\™J™Jšœ™šœ žœ™Jšœžœ™4Jšœžœ žœ™CJšœžœ™2Jšœžœ™6Jšœžœ™7Jšœžœ žœ™CJšœžœ™3Jšœžœ™3Jšœžœ™4šœžœ™Jšœ!žœ'™LJšœ™—Jšœ™šœžœ™Jšœ!žœ'™LJšœ™—J™Jšœžœ™7J™—J™J™—™J™Jšœ™Jšœžœ™šœ žœ™Jšœ-žœ™HJšœ-žœ™HJšœ+žœ™FJšœ5žœ™PJšœ7žœ™RJšœ7žœ™RJšœ5žœ™OJ™—J™—J™™J™Jšœ™Jšœžœ™šœ žœ™JšœAžœ™\Jšœ9žœ™TJšœ;žœ™VJšœ7žœ™QJ™—J™J™—šœ žœžœžœ(™MJ™J™J™—J™¼J™cJšœžœ˜Jšœ˜˜šœ ˜ Jšœ"˜"Jšœ˜Jšœ'˜'Jšœ˜—šœžœ˜JšœE˜EJšœI˜IJšœF˜FJšœ˜—šœ˜Jšœ!˜!Jšœ˜Jšœ(˜(Jšœ˜—šœ ˜ Jšœ%˜%Jšœ#˜#Jšœ,˜,Jšœ˜—šœ ˜ Jšœ"˜"Jšœ˜Jšœ'˜'Jšœ˜—šœžœ˜JšœE˜EJšœF˜FJšœF˜FJšœ˜—šœ ˜ Jšœ8˜8Jšœ9˜9Jšœ8˜8Jšœ˜—Jšœ˜šœ ˜ Jšœ%˜%Jšœ&˜&Jšœ%˜%Jšœ˜—Jšœ8˜8Jšœ8˜8Jšœ˜J˜J˜J˜J˜—Jšœžœ˜J˜˜šœ ˜ Jšœ%˜%Jšœ"˜"Jšœ$˜$Jšœ˜—šœ ˜ Jšœ)˜)Jšœ&˜&Jšœ(˜(Jšœ˜—šœ˜Jšœ(˜(Jšœ%˜%Jšœ'˜'Jšœ˜—Jšœ˜šœ˜Jšœ-˜-Jšœ+˜+Jšœ*˜*Jšœ˜—Jšœ˜Jšœ˜J˜J˜J˜J˜—Jšœžœ˜J˜˜Jšœ#˜#Jšœ˜Jšœ˜Jšœ˜J˜—J˜J˜Jšœžœ>˜VJ˜Jšœ žœžœ4˜GJ˜J˜Jšœ7˜7š žœžœžœ!žœžœž˜?Jšžœžœ'žœ˜NJšœžœ˜&Jšžœ˜J˜—J˜JšœNžœ˜Uš žœžœžœ!žœžœž˜?Jšžœžœ'žœ˜NJšœžœ˜&Jšžœ˜J˜—J˜Jšœ7˜7š žœžœžœ!žœžœž˜?Jšžœžœ'žœ˜NJšœžœ˜&Jšžœ˜J˜—J˜Jšœ7˜7š žœžœžœ!žœžœž˜?Jšžœžœ'žœ˜NJšœžœ˜&Jšžœ˜J˜—J˜Jšœ7˜7š žœžœžœ!žœžœž˜?Jšžœžœ'žœ˜NJšœžœ˜&Jšžœ˜J˜—J˜Jšžœ˜J˜J˜—…—!‡