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 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. ΚI˜codešœ™K™