DIRECTORY ViewerClasses USING [Viewer]; TEditInputExtras: CEDAR DEFINITIONS ~ BEGIN CommandClosure: TYPE ~ RECORD [name: ATOM, proc: CommandClosureProc, data: REF ANY]; CommandClosureProc: TYPE ~ PROC [data: REF ANY, viewer: ViewerClasses.Viewer ¬ NIL, param: REF ¬ NIL] RETURNS [recordAtom: BOOL ¬ TRUE, quit: BOOL ¬ FALSE]; RegisterClosure: PROC [commandClosure: CommandClosure, before: BOOL ¬ TRUE]; UnRegisterClosure: PROC [name: ATOM, proc: CommandClosureProc, match: PROC [data: REF] RETURNS [BOOL] ¬ NIL]; GetCommandNames: PROC RETURNS [LIST OF ATOM]; END. ¬ TEditInputExtras.mesa Copyright Σ 1987, 1991 by Xerox Corporation. All rights reserved. Michael Plass, October 23, 1987 4:13:25 pm PDT A CommandClosure is like a CommandProc, but has a data field (typically immutable) so that the same procedure may implement a number of distinct commands, and an optional param for encapsulating parameters. Refer to impl for details of param handling. Registers a command implemented by a CommandClosure Enumerates the registered CommandClosures that have the given name and proc, and unregisters those for which match returns TRUE; match=NIL is equivalent to match={RETURN [TRUE]}; Returns a list of the names of all registered commands. Κz–(cedarcode) style•NewlineDelimiter ™codešœ™Kšœ Οeœ7™BK™.K™—KšΟk œžœ ˜'K˜KšΠlnœžœž ˜#šœž˜K˜Kš œžœžœžœ"žœžœ˜Tšœžœžœžœžœ!žœ žœžœžœžœžœžœžœ˜œKšœό™όK˜—šΟnœžœ*žœžœ˜LKšœ3™3K˜—š œžœžœ#žœžœžœžœžœ˜mKšœ{žœ$žœžœ™²K˜—š  œžœžœžœžœžœ˜-K™7——K˜Kšžœ˜—…—:`