<> <> <> <> <> <> <> <> <> <<>> <> <<>> <> <<>> 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]; <<... 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).>> <<>> SetState: PROC [v: ViewerClasses.Viewer, val: State]; <<... called to set the state of the viewer directly.>> <<>> GetState: PROC [v: ViewerClasses.Viewer] RETURNS [State]; <<... called to get the state of the viewer.>> <<>> WasModifiedProc: TYPE = PROC [v: ViewerClasses.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.>> RegisterModifiedProc: PROC [v: ViewerClasses.Viewer, proc: WasModifiedProc]; <<... 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.>> IsViewerEdited: PROC [root: TiogaOps.Ref] RETURNS [edited: BOOL]; <<... returns whether the edited bit of the document (viewer) is set.>> END. <> <> <<>>