DIRECTORY Rope USING [ROPE], TextEdit USING [CapChange, Ref], TextLooks USING [Look, Looks], TextNode USING [Location, Ref, RefTextNode, Offset], TEditDocument USING [Selection, SelectionGrain, SelectionId], TEditLocks USING [Access]; TEditInputOps: CEDAR DEFINITIONS = BEGIN OPEN TEditDocument; CallWithLocks: PROC [ proc: PROC [root: TextEdit.Ref, tSel: Selection], access: TEditLocks.Access _ write]; CallWithBothLocked: PROC [ proc: PROC [ sourceRoot, destRoot: TextEdit.Ref, tSel, srcSel, targetSel: Selection], targetSel, srcSel: Selection, sourceAccess: TEditLocks.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: PROC [count: INT _ 1]; GoToPreviousChar: PROC [count: INT _ 1]; GoToNextWord: PROC [count: INT _ 1]; GoToPreviousWord: PROC [count: INT _ 1]; GoToNextNode: PROC [count: INT _ 1]; GoToPreviousNode: PROC [count: INT _ 1]; FindPrevWord: PROC [node: TextNode.RefTextNode, offset: TextNode.Offset] RETURNS [nChars: CARDINAL]; FindNextWord: PROC [node: TextNode.RefTextNode, start: TextNode.Offset] RETURNS [nChars: CARDINAL]; MakeControlCharacter: PROC ; UnMakeControlCharacter: PROC ; MakeOctalCharacter: PROC ; UnMakeOctalCharacter: PROC ; DoPendingDelete: PROC ; Delete: PROC [saveForPaste: BOOLEAN _ TRUE] ; Paste: PROC; SaveForPaste: PROC; SaveSpanForPaste: PROC [ startLoc, endLoc: TextNode.Location, grain: TEditDocument.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] ; CopyType: PROC [target: SelectionId _ primary] ; Transpose: PROC [target: SelectionId _ primary] ; TransposeLooks: PROC [target: SelectionId _ primary] ; TransposeType: 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: TextNode.Ref _ NIL, startBoundaryOffset: TextNode.Offset _ 0, endBoundaryOffset: TextNode.Offset _ LAST[TextNode.Offset]] RETURNS [found, wenttoend: BOOL]; Find: PROC; Position: PROC; InsertTime: PROC; Capitalise: PROC [flavor: TextEdit.CapChange] ; ModifyLook: PROC [look: TextLooks.Look, op: ModifyOp] ; ModifyCaretLook: PROC [look: TextLooks.Look, op: ModifyOp] ; ModifyOp: TYPE = {add, remove} ; ChangeLooks: PROC [add, remove: TextLooks.Looks] ; ChangeCaretLooks: PROC [add, remove: TextLooks.Looks] ; SetStyle: PROC ; SetStyleName: PROC [name: Rope.ROPE, node: TextNode.Ref _ NIL]; ReloadStyle: PROC ; ReloadStyleName: PROC [name: Rope.ROPE]; SetType: PROC ; GetType: PROC ; SetTypeName: PROC [name: Rope.ROPE, node: TextNode.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. ,-- TEditInputOps.mesa, Edited by Paxton on December 31, 1982 2:16 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 TEditBufferedInputImpl -- Exactly as InsertChar, but returns immediately, forking a repaint process. This is -- intended for use with user type-in. See TEditBufferedInputImpl -- 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 ΚΎ˜JšΟcD™DJ˜šΟk ˜ Jšœžœžœ˜Jšœ žœ˜ Jšœ žœ˜Jšœ žœ&˜4Jšœžœ*˜=Jšœ žœ ˜J˜—Jšœžœ˜"J˜Jšžœžœ˜J˜šΟn œžœ˜Jšœžœ'˜1Jšœ#˜#J˜—šŸœžœ˜šœžœ˜ Jšœ#˜#Jšœ$˜$—Jšœ˜Jšœ ž˜!J˜—šŸ œžœž œ˜$JšL™LJ˜—šŸ œžœ žœ˜#Jš'™'J˜—šŸœžœ˜JšA™AJ˜—šŸœžœž œ˜,JšV™VJšB™BJ˜—šŸœžœ žœ˜,JšV™VJšB™BJ˜—JšŸœž œ-˜OJ˜šŸ œžœ žœ˜!JšQ™QJ˜—šŸœžœ žœ˜ JšL™LJ˜—šŸœžœ žœ˜&JšL™LJ˜—šŸœžœ žœ˜&JšG™GJ˜—šœ™JšŸ œžœ žœ˜$JšŸœžœ žœ˜(JšŸ œžœ žœ˜$JšŸœžœ žœ˜(JšŸ œžœ žœ˜$šŸœžœ žœ˜(J˜——šŸ œžœ6˜HJšžœ žœ˜J˜—šŸ œžœ5˜GJšžœ žœ˜J˜—JšŸœžœ˜JšŸœžœ˜J˜JšŸœžœ˜JšŸœžœ˜J˜JšŸœžœ˜J˜šŸœžœžœžœ˜-Jš ™ J˜—šŸœžœ˜ Jš6™6J˜—šŸ œžœ˜Jš&™&J˜—šŸœžœ˜JšœJ˜JJ™HJ™—šŸœžœ˜ Jš(™(J˜—šŸœžœ˜ JšF™FJšI™IJ˜—šŸœžœ˜ Jš;™;J˜—šŸœžœ˜ Jš>™>J˜—šŸœžœ"˜,JšC™CJ˜—JšŸ œžœžœžœ˜:J˜šŸœžœ"˜,JšC™CJ˜—šŸ œžœ"˜1Jš@™@J˜—šŸœžœ"˜0Jš?™?J˜—šŸ œžœ"˜1JšA™AJ˜—šŸœžœ"˜6Jš>™>J˜—šŸ œžœ"˜5Jš>™>J˜—šŸœžœžœ˜)JšE™EJ˜—šŸœžœžœ˜1JšC™CJ˜—š Ÿœžœžœžœ žœ˜IJšC™CJ˜—šŸ œžœ žœ˜%Jš@™@J˜—Jš Ÿ œžœ žœžœ žœ˜Jš(™(Jš+™+J˜—JšŸœžœžœ˜%J˜š Ÿœžœžœžœžœ˜;Jš4™4Jš™Jš%™%J˜—šŸœžœ˜Jš)™)J˜—šŸœžœžœ˜.Jš0™0Jš?™?J˜—JšŸ œžœ žœžœ˜(J˜Jšžœ˜J˜—…—."