DIRECTORY TiogaButtons USING [TiogaButton], TiogaOps USING [Location, Ref], ViewerClasses USING [Viewer]; TiogaButtonsExtras: CEDAR DEFINITIONS = BEGIN OPEN TiogaButtons; EnumerateTiogaButtons: PROC [ v: ViewerClasses.Viewer, Test: PROC [TiogaButton] RETURNS [BOOL], start: TiogaOps.Location _ [NIL, 0], end: TiogaOps.Location _ [NIL, INT.LAST] ] RETURNS [BOOL]; IsTiogaButtons: PROC [ViewerClasses.Viewer] RETURNS [BOOL]; IsEntireNode: PROC [TiogaButton] RETURNS [BOOL]; State: TYPE = { buttoning, editing }; StateButton: PROC [v: ViewerClasses.Viewer, show: BOOL _ TRUE]; SetState: PROC [v: ViewerClasses.Viewer, val: State]; GetState: PROC [v: ViewerClasses.Viewer] RETURNS [State]; WasModifiedProc: TYPE = PROC [v: ViewerClasses.Viewer]; RegisterModifiedProc: PROC [v: ViewerClasses.Viewer, proc: WasModifiedProc]; IsViewerEdited: PROC [root: TiogaOps.Ref] RETURNS [edited: BOOL]; END. ΐTiogaButtonsExtras.Mesa Copyright c 1984, 1985 Xerox Corporation. All rights reserved. Created by Rick Beach, May 2, 1985 2:32:00 pm PDT Hal Murray, December 22, 1986 10:58:48 am PST Willie-Sue, January 23, 1987 3:54:24 pm PST Last tweaked by Mike Spreitzer on June 8, 1988 12:46:00 pm PDT Polle Zellweger (PTZ) June 14, 1988 2:56:52 pm PDT Don Baker, August 12, 1988 10:31:41 am PDT This interface allows user editing on the underlying file. Clients can turn on a button which will let the user toggle between editing and buttoning states, or the client can change the state directly. Notification of changes to the document are given only in the buttoning state and a notification is given when the user or the client sets the state back to buttoning. TiogaButtons will not change the "edited" state of the document. Note that it is an implementation restriction that there cannot be multiple TiogaButtons viewers on one document. It is permissible, however, to have any number of Tioga viewers on a document which also has a TiogaButtons viewer. WrongViewerClass raised if v isn't a TiogaButtons viewer. Returns TRUE to stop the enumeration. default value means begin of whole document. default value means end of whole document. Result is TRUE iff Test returned TRUE. ... called to show (TRUE) or hide (FALSE) the button on the viewer which allows the user to toggle between editing the underlying document and buttoning. Initially, the button is hidden for upward compatibility. Does nothing if the viewer is not a top level viewer (can't have it's own buttons). ... called to set the state of the viewer directly. ... called to get the state of the viewer. ... called by TiogaButtons to allow the client to redo the buttons upon reentering the buttoning state or after some non-user document edit, like with an active docuement, while in "button mode". All previously created buttons are removed before this call is made. ... called to register a procedure to be called in the event of a change to the document. To "unregister" the procedure, register NIL as the proc. ... returns whether the edited bit of the document (viewer) is set. Polle Zellweger (PTZ) June 14, 1988 2:56:52 pm PDT changes to: IsEntireNode Κ7˜code™Kšœ Οmœ4™?K™1K™-K™+K™>K™2Kšœ*™*—˜K™σK™K™@K™Kšœζ™ζ—K™šΟk ˜ Kšœ žœ˜!Kšœ žœ˜Kšœžœ ˜—K˜KšΠlnœžœž ˜%Kšœžœžœ˜K˜šΟnœž˜šœ˜šœ˜Kšœ9™9—š œžœžœžœ˜(K™%—šœžœ˜$K™,—šœžœžœžœ˜(K™*—Kšœ˜—šžœžœ˜K™&——K˜Kš œžœžœžœ˜;K˜Kš  œžœžœžœ˜0K˜šœžœ˜%K˜—š  œžœ!žœžœ˜?Kšœžœ žœ™©K™—š œžœ'˜5K™3K™—š œžœžœ ˜9K™*K™—šœžœžœ˜7Kšœ‰™‰K˜—š œžœ2˜LKšœƒžœ ™“K˜—š œžœžœ žœ˜AK™CK˜—K˜Kšžœ˜™2Kšœ Οr ™—K™—…—†}