DIRECTORY Rope USING [ROPE], TextEdit USING [CapChange], TiogaLooks USING [Look, Looks], TiogaNode USING [Location, Ref, RefBranchNode, RefTextNode, Offset], TiogaDocument USING [Selection, SelectionGrain, SelectionId], TiogaLocks USING [Access]; TiogaInputOps: CEDAR DEFINITIONS = BEGIN OPEN TiogaDocument; CallWithLocks: PROC [ proc: PROC [root: TiogaNode.RefBranchNode, tSel: Selection], access: TiogaLocks.Access _ write]; CallWithBothLocked: PROC [ proc: PROC [ sourceRoot, destRoot: TiogaNode.RefBranchNode, tSel, srcSel, targetSel: Selection], targetSel, srcSel: Selection, sourceAccess: TiogaLocks.Access]; InsertChar: PROC [char: CHARACTER] ; InsertRope: PROC [rope: Rope.ROPE]; InsertLineBreak: PROC; BufferedInsertChar: PROC [char: CHARACTER] ; BufferedInsertText: PROC [text: Rope.ROPE] ; WaitForInsertToFinish: PROCEDURE; -- returns after buffered input has completed BackSpace: PROC [count: INT _ 1]; BackWord: PROC [count: INT _ 1]; DeleteNextChar: PROC [count: INT _ 1]; DeleteNextWord: PROC [count: INT _ 1]; GoToNextChar, GoToPreviousChar, GoToNextWord, GoToPreviousWord, GoToNextNode, GoToPreviousNode: PROC [count: INT _ 1]; FindPrevWord: PROC [node: TiogaNode.RefTextNode, offset: TiogaNode.Offset] RETURNS [nChars: CARDINAL]; FindNextWord: PROC [node: TiogaNode.RefTextNode, start: TiogaNode.Offset] RETURNS [nChars: CARDINAL]; MakeControlCharacter, UnMakeControlCharacter: PROC ; MakeOctalCharacter, UnMakeOctalCharacter: PROC ; DoPendingDelete: PROC ; Delete: PROC [saveForPaste: BOOLEAN _ TRUE] ; Paste: PROC; SaveForPaste: PROC; SaveSpanForPaste: PROC [ startLoc, endLoc: TiogaNode.Location, grain: TiogaDocument.SelectionGrain]; Break: PROC; Join: PROC; Nest: PROC; UnNest: PROC; Move: PROC [target: SelectionId _ primary] ; CheckReadonly: PROC [targetSel: Selection] RETURNS [BOOL]; Copy: PROC [target: SelectionId _ primary] ; CopyLooks: PROC [target: SelectionId _ primary] ; CopyFormat: PROC [target: SelectionId _ primary] ; Transpose: PROC [target: SelectionId _ primary] ; TransposeLooks: PROC [target: SelectionId _ primary] ; TransposeFormat: PROC [target: SelectionId _ primary] ; InsertBrackets: PROC [left, right: CHAR]; SelectMatchingBrackets: PROC [left, right: CHAR]; DoSelectMatchingBrackets: PROC [left, right: CHAR] RETURNS [found: BOOL]; NextViewer: PROC [forward: BOOLEAN] ; DoNextViewer: PROC [forward: BOOLEAN] RETURNS [found: BOOL]; FindPlaceholders: PROCEDURE [next: BOOLEAN]; DoFindPlaceholders: PROCEDURE [next, gotoend: BOOL, startBoundaryNode, endBoundaryNode: TiogaNode.Ref _ NIL, startBoundaryOffset: TiogaNode.Offset _ 0, endBoundaryOffset: TiogaNode.Offset _ LAST[TiogaNode.Offset]] RETURNS [found, wenttoend: BOOL]; Find: PROC; Position: PROC; InsertTime: PROC; Capitalise: PROC [flavor: TextEdit.CapChange] ; ModifyLook: PROC [look: TiogaLooks.Look, op: ModifyOp] ; ModifyCaretLook: PROC [look: TiogaLooks.Look, op: ModifyOp] ; ModifyOp: TYPE = {add, remove} ; ChangeLooks: PROC [add, remove: TiogaLooks.Looks] ; ChangeCaretLooks: PROC [add, remove: TiogaLooks.Looks] ; SetStyle: PROC ; SetStyleName: PROC [name: Rope.ROPE, node: TiogaNode.Ref _ NIL]; ReloadStyle: PROC ; ReloadStyleName: PROC [name: Rope.ROPE]; SetFormat: PROC ; GetFormat: PROC ; SetFormatName: PROC [name: Rope.ROPE, node: TiogaNode.Ref _ NIL]; SetCommentProp: PROC [flag: BOOLEAN]; RegisterAbbrevFailedProc: PROC [proc: PROC RETURNS [BOOL]]; ExpandAbbreviation: PROC; LoadAbbreviations: PROC [dictName: Rope.ROPE]; EditFailed: PROC [msg: Rope.ROPE _ NIL]; END. *-- TiogaInputOps.mesa, Edited by Paxton on June 17, 1983 1:02 pm -- Inserts a character in the document at the primary selection and repaints -- like InsertChar, but for entire rope -- insert a CR and then copies blanks from front of previous line -- Exactly as InsertChar, but returns immediately, forking a repaint process. This is -- intended for use with user type-in. See TiogaBufferedInputImpl -- Exactly as InsertChar, but returns immediately, forking a repaint process. This is -- intended for use with user type-in. See TiogaBufferedInputImpl -- Deletes the character preceeding the insertion point and repaints the document -- Deletes the word preceeding the insertion point and repaints the document -- Deletes the character after the insertion point and repaints the document -- Deletes the word after the insertion point and repaints the document -- commands for moving caret -- Deletes the primary selection -- insert the last deletion at current insertion point -- save the selection for future Paste -- like SaveForPaste, but saves the given span rather than the selection -- break node at current insertion point -- copies text of current insertion point node to end of previous node -- then deletes node and makes point selection at place where joined them -- move the selection to a deeper nesting level in the tree -- move the selection to a shallower nesting level in the tree -- Move the contents of the other selection to the target selection -- Copy the contents of the other selection to the target selection -- Copy the looks of the other selection to the target selection -- Copy the type of the other selection to the target selection -- Transpose the contents of the primary and secondary selections -- Transpose the looks of the primary and secondary selections -- Transpose the types of the primary and secondary selections -- insert left char at start of selection, right char after selection -- extend selection until includes matching left and right brackets -- extend selection until includes matching left and right brackets -- move selection to next viewer in left-right, top-bottom order -- find next instance of selected text -- find location corresponding to selected number -- insert the current date and time -- Perform the capitalisation operation on the target selection -- change the looks of a selection -- change the looks of a selection caret -- wholesale change of the selection looks -- wholesale change of the caret looks -- sets style of caret node to word before caret -- sets style of caret node to given name -- if node is nil, sets style for caret node -- reloads style of caret node -- reloads named style -- sets type of caret node to word before caret -- inserts type of caret node -- sets type of caret node to given name -- if node is nil, sets type for caret node -- called if ExpandAbbreviation finds an unknown key -- call with NIL to unregister -- only one proc registered at a time -- expand abbreviation at insertion point -- abbreviatiions files are loaded automatically -- can call this to force reloading after have changed contents ΚX˜JšΟc@™@J˜šΟk ˜ Jšœžœžœ˜Jšœ žœ ˜Jšœ žœ˜Jšœ žœ5˜DJšœžœ*˜=Jšœ žœ ˜J˜—Jšœžœ˜"J˜Jšžœžœ˜J˜šΟn œžœ˜Jšœžœ2˜™>J˜—šŸœžœ"˜,JšC™CJ˜—JšŸ œžœžœžœ˜:J˜šŸœžœ"˜,JšC™CJ˜—šŸ œžœ"˜1Jš@™@J˜—šŸ œžœ"˜2Jš?™?J˜—šŸ œžœ"˜1JšA™AJ˜—šŸœžœ"˜6Jš>™>J˜—šŸœžœ"˜7Jš>™>J˜—šŸœžœžœ˜)JšE™EJ˜—šŸœžœžœ˜1JšC™CJ˜—š Ÿœžœžœžœ žœ˜IJšC™CJ˜—šŸ œžœ žœ˜%Jš@™@J˜—Jš Ÿ œžœ žœžœ žœ˜