DIRECTORY Atom USING [GetPName, MakeAtom], EditSpan USING [CompareNodeOrder], NodeAddrs USING [GetTextAddr, MapTextAddrs, PutTextAddr, RemTextAddr, TextAddrNotFound], NodeStyleOps USING [StyleNameForNode], Rope USING [IsEmpty, ROPE, Size], TEditDocument USING [Selection, SelectionGrain, SelectionId, TEditDocumentData], TEditInput USING [Cancel, CurrentEvent, MakePointSelection, Repeat, RestoreSelectionA, RestoreSelectionB, SaveSelectionA, SaveSelectionB], TEditInputOps USING [BackSpace, BackWord, Break, Capitalise, ChangeCaretLooks, ChangeLooks, Copy, CopyLooks, CopyFormat, Delete, DeleteNextChar, DeleteNextWord, ExpandAbbreviation, GetFormat, GoToNextChar, GoToNextNode, GoToNextWord, GoToPreviousChar, GoToPreviousNode, GoToPreviousWord, InsertBrackets, InsertChar, InsertLineBreak, InsertRope, InsertTime, Join, MakeControlCharacter, MakeOctalCharacter, Nest, Paste, RegisterAbbrevFailedProc, SaveForPaste, SaveSpanForPaste, SetCommentProp, SetStyleName, SetFormat, SetFormatName, Transpose, UnMakeControlCharacter, UnMakeOctalCharacter, UnNest], TEditLocks USING [Lock, Unlock], TEditMesaOps USING [SetMesaLooksOp], TEditOps USING [CaretLoc, GetSelContents, RegisterFileNameProc], TEditSelection USING [Alloc, CaretAfterSelection, CaretBeforeSelection, Deselect, DoFind, FindWhere, Free, fSel, GrowSelection, GrowSelectionToBlanks, GrowSelectionToSomething, LockSel, MakeSelection, pSel, SelectionRoot, SetSelLooks, sSel, UnlockSel], TextEdit USING [ChangeStyle, ChangeFormat, FetchLooks, PutProp, Size], TextLooks USING [allLooks, Looks, LooksToRope, noLooks, RopeToLooks], TextNode USING [BadArgs, NodeRep, Location, LocOffset, LocRelative, Node, NodeItself, Root, StepForward], TiogaExtraOps USING [], TiogaOps USING [FirstChild, GetRope, LastChild, LastWithin, SearchDir, SelectionErrorCode, ViewerDoc, WhichLooks], TiogaOpsDefs USING [Location, SelectionGrain, Viewer, WhichNodes, WhichSelection]; TiogaOpsImpl: CEDAR MONITOR IMPORTS Atom, EditSpan, NodeAddrs, NodeStyleOps, Rope, TEditInput, TEditInputOps, TEditLocks, TEditMesaOps, TEditOps, TEditSelection, TextEdit, TextLooks, TextNode, TiogaOps EXPORTS TiogaOpsDefs, TiogaOps, TiogaExtraOps = BEGIN OPEN TiogaOps, TiogaOpsDefs; ROPE: TYPE = Rope.ROPE; Node: TYPE = TextNode.Node; -- points to a Tioga node NodeBody: PUBLIC TYPE = TextNode.NodeRep; CallWithLocks: PUBLIC PROC [proc: PROC [root: Node], root: Node _ NIL] = { lockedSel, lockedDoc: BOOL _ FALSE; Cleanup: PROC = { IF lockedSel THEN { UnlockSel; lockedSel _ FALSE }; IF lockedDoc THEN { Unlock[root]; lockedDoc _ FALSE }; }; { ENABLE UNWIND => Cleanup; LockSel; lockedSel _ TRUE; IF root=NIL AND (root _ SelectionRoot[])=NIL THEN { Cleanup; ERROR NoSelection }; Lock[root]; lockedDoc _ TRUE; proc[root] }; Cleanup }; NoSelection: PUBLIC ERROR = CODE; -- raised by CallWithLocks when there is no selection Lock: PUBLIC PROC [root: Node] = { [] _ TEditLocks.Lock[root, "TiogaOpsClient"] }; Unlock: PUBLIC PROC [root: Node] = { TEditLocks.Unlock[root] }; GetSelectionId: PROC [which: WhichSelection] RETURNS [TEditDocument.SelectionId] = { RETURN [SELECT which FROM primary => primary, secondary => secondary, feedback => feedback, ENDCASE => ERROR ] }; LockSel: PUBLIC PROC [which: WhichSelection _ primary] = { TEditSelection.LockSel[GetSelectionId[which], "TiogaOpsClient"] }; UnlockSel: PUBLIC PROC [which: WhichSelection _ primary] = { TEditSelection.UnlockSel[GetSelectionId[which]] }; DocGran: PROC [granularity: SelectionGrain] RETURNS [TEditDocument.SelectionGrain] = { RETURN [SELECT granularity FROM point => point, char => char, word => word, node => node, branch => branch, ENDCASE => ERROR] }; MyGran: PROC [granularity: TEditDocument.SelectionGrain] RETURNS [SelectionGrain] = { RETURN [SELECT granularity FROM point => point, char => char, word => word, node => node, branch => branch, ENDCASE => ERROR] }; DocLoc: PROC [loc: Location] RETURNS [TextNode.Location] = { RETURN [[loc.node, loc.where]] }; MyLoc: PROC [loc: TextNode.Location] RETURNS [Location] = { RETURN [[loc.node, loc.where]] }; GetSelection: PUBLIC PROC [which: WhichSelection _ primary] RETURNS [ viewer: Viewer, start, end: Location, level: SelectionGrain, caretBefore: BOOL, pendingDelete: BOOL] = { sel: TEditDocument.Selection = SELECT which FROM primary => TEditSelection.pSel, secondary => TEditSelection.sSel, feedback => TEditSelection.fSel, ENDCASE => ERROR; RETURN [sel.viewer, MyLoc[sel.start.pos], MyLoc[sel.end.pos], MyGran[sel.granularity], sel.insertion=before, sel.pendingDelete] }; SelectionRoot: PUBLIC PROC [which: WhichSelection _ primary] RETURNS [root: Node] = { RETURN [TEditSelection.SelectionRoot[SELECT which FROM primary => TEditSelection.pSel, secondary => TEditSelection.sSel, feedback => TEditSelection.fSel, ENDCASE => ERROR]] }; SelectionError: PUBLIC ERROR [ec: SelectionErrorCode] = CODE; CheckSelection: PROC [sel: TEditDocument.Selection] = { root, first, last: TextNode.Node; t1, t2: Node; tdd: TEditDocument.TEditDocumentData; IF sel.viewer=NIL OR sel.viewer.destroyed OR (tdd _ NARROW[sel.viewer.data])=NIL OR (root _ tdd.text)=NIL THEN ERROR SelectionError[IllegalViewer]; IF (first _ sel.start.pos.node)=NIL OR (last _ sel.end.pos.node)=NIL THEN ERROR SelectionError[IllegalNode]; IF TextNode.Root[first] # root THEN ERROR SelectionError[WrongDoc]; IF first # last THEN -- make sure nodes in same tree and right order IF EditSpan.CompareNodeOrder[first,last] # before THEN ERROR SelectionError[WrongOrder]; IF sel.start.pos.where # TextNode.NodeItself THEN -- make sure start index is ok IF (t1 _ first)=NIL OR sel.start.pos.where NOT IN [0..TextEdit.Size[t1]] THEN ERROR SelectionError[BadStartOffset]; IF sel.end.pos.where # TextNode.NodeItself THEN -- make sure end index is ok IF (t2 _ last)=NIL OR sel.end.pos.where NOT IN [0..TextEdit.Size[t2]] THEN ERROR SelectionError[BadEndOffset]; IF t1 # NIL AND t1 = t2 THEN -- make sure start is not after end IF sel.start.pos.where > sel.end.pos.where THEN ERROR SelectionError[BadEndOffset]; }; SetSelection: PUBLIC PROC [viewer: Viewer, start, end: Location, level: SelectionGrain _ char, caretBefore: BOOL _ TRUE, pendingDelete: BOOL _ FALSE, which: WhichSelection _ primary] = { ENABLE UNWIND => NULL; tempSel: TEditDocument.Selection _ TEditSelection.Alloc[]; tempSel^ _ SELECT which FROM primary => TEditSelection.pSel^, secondary => TEditSelection.sSel^, feedback => TEditSelection.fSel^, ENDCASE => ERROR; tempSel.viewer _ viewer; tempSel.data _ NARROW[viewer.data]; tempSel.start.pos _ DocLoc[start]; tempSel.end.pos _ DocLoc[end]; tempSel.granularity _ DocGran[level]; tempSel.insertion _ IF caretBefore OR tempSel.granularity=point THEN before ELSE after; tempSel.pendingDelete _ pendingDelete; CheckSelection[tempSel]; TEditSelection.MakeSelection[tempSel, SELECT which FROM primary => primary, secondary => secondary, feedback => feedback, ENDCASE => ERROR]; TEditSelection.Free[tempSel] }; SelectNodes: PUBLIC PROC [viewer: Viewer, start, end: Node, level: SelectionGrain _ node, caretBefore: BOOL _ TRUE, pendingDelete: BOOL _ FALSE, which: WhichSelection _ primary] = { SetSelection[viewer, [start,0], [end, MAX[Rope.Size[GetRope[end]],1]-1], level, caretBefore, pendingDelete, which] }; SelectBranches: PUBLIC PROC [viewer: Viewer, start, end: Node, level: SelectionGrain _ node, caretBefore: BOOL _ TRUE, pendingDelete: BOOL _ FALSE, which: WhichSelection _ primary] = { SelectNodes[viewer, start, LastWithin[end], level, caretBefore, pendingDelete, which] }; SelectDocument: PUBLIC PROC [viewer: Viewer, level: SelectionGrain _ node, caretBefore: BOOL _ TRUE, pendingDelete: BOOL _ FALSE, which: WhichSelection _ primary] = { tdd: TEditDocument.TEditDocumentData _ NARROW[viewer.data]; root: Node _ ViewerDoc[viewer]; SelectBranches[viewer, FirstChild[root], LastChild[root], level, caretBefore, pendingDelete, which] }; CancelSelection: PUBLIC PROC [which: WhichSelection _ primary] = { TEditSelection.Deselect[GetSelectionId[which]] }; SaveSelA: PUBLIC PROC = { [] _ TEditInput.SaveSelectionA[] }; RestoreSelA: PUBLIC PROC = { [] _ TEditInput.RestoreSelectionA[] }; SaveSelB: PUBLIC PROC = { [] _ TEditInput.SaveSelectionB[] }; RestoreSelB: PUBLIC PROC = { [] _ TEditInput.RestoreSelectionB[] }; GrowSelection: PUBLIC PROC = { TEditSelection.GrowSelection[] }; GrowSelectionToBlanks: PUBLIC PROC = { TEditSelection.GrowSelectionToBlanks[] }; GrowSelectionToSomething: PUBLIC PROC [left, right: PROC [CHAR] RETURNS [BOOLEAN]] = { TEditSelection.GrowSelectionToSomething[left, right] }; SearchWhere: PROC [whichDir: SearchDir] RETURNS [TEditSelection.FindWhere] = { RETURN [SELECT whichDir FROM forwards => forwards, backwards => backwards, anywhere => anywhere, ENDCASE => ERROR] }; FindText: PUBLIC PROC [viewer: Viewer, rope: ROPE _ NIL, whichDir: SearchDir _ forwards, which: WhichSelection _ primary, case: BOOL _ TRUE -- case => case of characters is significant -- ] RETURNS [found: BOOL] = { IF rope=NIL THEN rope _ TEditOps.GetSelContents[]; RETURN [TEditSelection.DoFind[ viewer: viewer, rope: rope, id: GetSelectionId[which], case: case, findWhere: SearchWhere[whichDir]]] }; FindWord: PUBLIC PROC [viewer: Viewer, rope: ROPE _ NIL, whichDir: SearchDir _ forwards, which: WhichSelection _ primary, case: BOOL _ TRUE -- case => case of characters is significant -- ] RETURNS [found: BOOL] = { IF rope=NIL THEN rope _ TEditOps.GetSelContents[]; RETURN [TEditSelection.DoFind[viewer: viewer, rope: rope, case: case, id: GetSelectionId[which], findWhere: SearchWhere[whichDir], word: TRUE]] }; FindDef: PUBLIC PROC [viewer: Viewer, rope: ROPE _ NIL, whichDir: SearchDir _ forwards, which: WhichSelection _ primary, case: BOOL _ TRUE -- case => case of characters is significant -- ] RETURNS [found: BOOL] = { IF rope=NIL THEN rope _ TEditOps.GetSelContents[]; RETURN [TEditSelection.DoFind[viewer: viewer, rope: rope, case: case, id: GetSelectionId[which], findWhere: SearchWhere[whichDir], word: TRUE, def: TRUE]] }; LocRelative: PUBLIC PROC [location: Location, count: INT, break: NAT _ 1, skipCommentNodes: BOOL _ FALSE] RETURNS [Location] = { RETURN [MyLoc[TextNode.LocRelative[DocLoc[location], count, break, skipCommentNodes]]]; }; LocOffset: PUBLIC PROC [loc1, loc2: Location, break: NAT _ 1, skipCommentNodes: BOOL _ FALSE] RETURNS [count: INT] = { count _ TextNode.LocOffset[DocLoc[loc1], DocLoc[loc2], break, skipCommentNodes ! TextNode.BadArgs => ERROR BadArgs]; }; BadArgs: PUBLIC ERROR=CODE; GetCaret: PUBLIC PROC RETURNS [loc: Location] = { RETURN [MyLoc[TEditOps.CaretLoc[]]] }; CaretBefore: PUBLIC PROC = { TEditSelection.CaretBeforeSelection[] }; CaretAfter: PUBLIC PROC = { TEditSelection.CaretAfterSelection[] }; CaretOnly: PUBLIC PROC = { [] _ TEditInput.MakePointSelection[] }; GoToNextCharacter: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.GoToNextChar[n] }; GoToNextWord: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.GoToNextWord[n] }; GoToNextNode: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.GoToNextNode[n] }; GoToPreviousCharacter: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.GoToPreviousChar[n] }; GoToPreviousWord: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.GoToPreviousWord[n] }; GoToPreviousNode: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.GoToPreviousNode[n] }; ToPrimary: PUBLIC PROC = { TEditInputOps.Copy[primary] }; ToSecondary: PUBLIC PROC = { TEditInputOps.Copy[secondary] }; Transpose: PUBLIC PROC = { TEditInputOps.Transpose[] }; InsertRope: PUBLIC PROC [rope: ROPE] = { TEditInputOps.InsertRope[rope] }; InsertChar: PUBLIC PROC [char: CHAR] = { TEditInputOps.InsertChar[char] }; InsertLineBreak: PUBLIC PROC = { TEditInputOps.InsertLineBreak[] }; BackSpace: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.BackSpace[n] }; BackWord: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.BackWord[n] }; DeleteNextCharacter: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.DeleteNextChar[n] }; DeleteNextWord: PUBLIC PROC [n: INT _ 1] = { TEditInputOps.DeleteNextWord[n] }; InsertTime: PUBLIC PROC = { TEditInputOps.InsertTime[] }; InsertBrackets: PUBLIC PROC [left, right: CHAR] = { TEditInputOps.InsertBrackets[left, right] }; MakeControlCharacter: PUBLIC PROC = { TEditInputOps.MakeControlCharacter[] }; UnMakeControlCharacter: PUBLIC PROC = { TEditInputOps.UnMakeControlCharacter[] }; MakeOctalCharacter: PUBLIC PROC = { TEditInputOps.MakeOctalCharacter[] }; UnMakeOctalCharacter: PUBLIC PROC = { TEditInputOps.UnMakeOctalCharacter[] }; ExpandAbbreviation: PUBLIC PROC = { TEditInputOps.ExpandAbbreviation[] }; Delete: PUBLIC PROC = { TEditInputOps.Delete[] }; Paste: PUBLIC PROC = { TEditInputOps.Paste[] }; SaveForPaste: PUBLIC PROC = { TEditInputOps.SaveForPaste[] }; SaveSpanForPaste: PUBLIC PROC [startLoc, endLoc: Location, grain: SelectionGrain _ char] = { TEditInputOps.SaveSpanForPaste[DocLoc[startLoc], DocLoc[endLoc], DocGran[grain]] }; AllLower: PUBLIC PROC = { TEditInputOps.Capitalise[allLower] }; AllCaps: PUBLIC PROC = { TEditInputOps.Capitalise[allCaps] }; InitialCaps: PUBLIC PROC = { TEditInputOps.Capitalise[initCaps] }; FirstCap: PUBLIC PROC = { TEditInputOps.Capitalise[firstCap] }; MesaFormatting: PUBLIC PROC = { [] _ TEditMesaOps.SetMesaLooksOp[] }; Repeat: PUBLIC PROC = { [] _ TEditInput.Repeat[] }; Undo: PUBLIC PROC = { [] _ TEditInput.Cancel[] }; Break: PUBLIC PROC = { TEditInputOps.Break[] }; Join: PUBLIC PROC = { TEditInputOps.Join[] }; Nest: PUBLIC PROC = { TEditInputOps.Nest[] }; UnNest: PUBLIC PROC = { TEditInputOps.UnNest[] }; SetSelectionLooks: PUBLIC PROC [which: WhichSelection _ primary] = { TEditSelection.SetSelLooks[SELECT which FROM primary => TEditSelection.pSel, secondary => TEditSelection.sSel, feedback => TEditSelection.fSel, ENDCASE => ERROR] }; FetchLooks: PUBLIC PROC [node: Node, index: INT] RETURNS [ROPE] = { RETURN [TextLooks.LooksToRope[TextEdit.FetchLooks[node,index]]] }; SetLooks: PUBLIC PROC [looks: ROPE, which: WhichLooks _ selection] = { lks: TextLooks.Looks = TextLooks.RopeToLooks[looks]; IF which=selection THEN TEditInputOps.ChangeLooks[add: lks, remove: TextLooks.allLooks] ELSE TEditInputOps.ChangeCaretLooks[add: lks, remove: TextLooks.allLooks] }; AddLooks: PUBLIC PROC [looks: ROPE, which: WhichLooks _ selection] = { lks: TextLooks.Looks = TextLooks.RopeToLooks[looks]; IF which=selection THEN TEditInputOps.ChangeLooks[add: lks, remove: TextLooks.noLooks] ELSE TEditInputOps.ChangeCaretLooks[add: lks, remove: TextLooks.noLooks] }; SubtractLooks: PUBLIC PROC [looks: ROPE, which: WhichLooks _ selection] = { lks: TextLooks.Looks = TextLooks.RopeToLooks[looks]; IF which=selection THEN TEditInputOps.ChangeLooks[add: TextLooks.noLooks, remove: lks] ELSE TEditInputOps.ChangeCaretLooks[add: TextLooks.noLooks, remove: lks] }; ClearLooks: PUBLIC PROC [which: WhichLooks _ selection] = { IF which=selection THEN TEditInputOps.ChangeLooks[add: TextLooks.noLooks, remove: TextLooks.allLooks] ELSE TEditInputOps.ChangeCaretLooks[add: TextLooks.noLooks, remove: TextLooks.allLooks] }; CopyLooks: PUBLIC PROC = { TEditInputOps.CopyLooks[] }; GetFormat: PUBLIC PROC [node: Node] RETURNS [ROPE] = { name: ATOM = node.formatName; RETURN [IF name=NIL THEN "default" ELSE Atom.GetPName[name]] }; ForEachNode: PROC [which: WhichNodes, proc: PROC [TextNode.Node]] = { pSel: TEditDocument.Selection = TEditSelection.pSel; SELECT which FROM root => proc[TextNode.Root[pSel.start.pos.node]]; selection => FOR node: TextNode.Node _ pSel.start.pos.node, TextNode.StepForward[node] DO proc[node]; IF node = pSel.end.pos.node THEN EXIT; ENDLOOP; ENDCASE => ERROR }; SetFormat: PUBLIC PROC [format: ROPE, which: WhichNodes _ selection] = { Set: PROC [ref: TextNode.Node] = { TEditInputOps.SetFormatName[format, ref] }; ForEachNode[which, Set] }; SetNodeFormat: PUBLIC PROC [format: ROPE, node: Node] = { root: TextNode.Node; formatName: ATOM _ IF format.IsEmpty THEN NIL ELSE Atom.MakeAtom[format]; root _ TextNode.Root[node]; [] _ TEditLocks.Lock[root, "TiogaOpsSetNodeFormat"]; TextEdit.ChangeFormat[node, formatName, NIL, root]; TEditLocks.Unlock[root] }; SetNodeStyle: PUBLIC PROC [style: ROPE, node: Node] = { root: TextNode.Node _ TextNode.Root[node]; [] _ TEditLocks.Lock[root, "TiogaOpsSetNodeStyle"]; TextEdit.ChangeStyle[node, style, NIL, root]; TEditLocks.Unlock[root] }; CaretNodeFormat: PUBLIC PROC = { TEditInputOps.SetFormat[] }; InsertFormat: PUBLIC PROC = { TEditInputOps.GetFormat[] }; CopyFormat: PUBLIC PROC = { TEditInputOps.CopyFormat[] }; GetStyle: PUBLIC PROC [node: Node] RETURNS [ROPE] = { name: ATOM ~ NodeStyleOps.StyleNameForNode[node]; RETURN [IF name=NIL THEN "default" ELSE Atom.GetPName[name]] }; SetStyle: PUBLIC PROC [style: ROPE, which: WhichNodes _ selection] = { Set: PROC [ref: TextNode.Node] = { TEditInputOps.SetStyleName[style, ref] }; ForEachNode[which, Set] }; IsComment: PUBLIC PROC [node: Node] RETURNS [BOOL] = { txt: Node = node; RETURN [txt # NIL AND txt.comment] }; SetComment: PUBLIC PROC = { TEditInputOps.SetCommentProp[TRUE] }; SetNotComment: PUBLIC PROC = { TEditInputOps.SetCommentProp[FALSE] }; SetProp: PUBLIC PROC [name: ATOM, value: REF, which: WhichNodes _ selection] = { Put: PROC [node: TextNode.Node] = { TextEdit.PutProp[node, name, value, TEditInput.CurrentEvent[]] }; ForEachNode[which, Put] }; RegisterAbbrevFailedProc: PUBLIC PROC [proc: PROC RETURNS [BOOL]] = { TEditInputOps.RegisterAbbrevFailedProc[proc] }; RegisterFileNameProc: PUBLIC PROC [ proc: PROC [ROPE, Viewer] RETURNS [fileName: ROPE, search: ROPE] ] = { TEditOps.RegisterFileNameProc[proc] }; PutTextKey: PUBLIC PROC [node: Node, where: INT, key: REF] = { NodeAddrs.PutTextAddr[node, key, where] }; GetTextKey: PUBLIC PROC [node: Node, key: REF] RETURNS [loc: Location] = { where: INT; n: Node; [n, where] _ NodeAddrs.GetTextAddr[node, key ! NodeAddrs.TextAddrNotFound => GOTO Error]; RETURN [[n, where]]; EXITS Error => ERROR TextKeyNotFound }; TextKeyNotFound: PUBLIC ERROR = CODE; RemoveTextKey: PUBLIC PROC [node: Node, key: REF] = { NodeAddrs.RemTextAddr[node, key] }; MapTextKeys: PUBLIC PROC [node: Node, proc: PROC [key: REF, where: INT] RETURNS [BOOLEAN]] RETURNS [BOOLEAN] = { Do: PROC [addr: REF, location: INT] RETURNS [BOOLEAN] = { RETURN [proc[addr, location]] }; RETURN [NodeAddrs.MapTextAddrs[node, Do]] }; END. DTiogaOpsImpl.mesa Copyright Ó 1985, 1988 by Xerox Corporation. All rights reserved. written by Bill Paxton. June 1982 last written by Paxton. December 28, 1982 12:38 pm Last Edited by: Paxton, January 10, 1983 4:14 pm Last Edited by: Maxwell, January 19, 1983 12:31 pm Last Edited by: Plass, March 29, 1985 3:52:36 pm PST Rick Beach, March 28, 1985 10:14:40 am PST Doug Wyatt, February 17, 1988 3:04:23 pm PST Document Locks Selections Find Location procedures Caret (for primary selection) Edits requiring secondary selections Editing applying to primary selection Node Editing Looks sets the selection looks from the looks of the character next to the caret Formats Styles Comment Property Node Property Lists Miscellaneous call-back procedures Text keys: persistent "addresses" for characters in text nodes Associates the key with the given offset in the text node. Key moves with the text as edits take place in the node. Key doesn't move to new node. May use same key with different nodes without interference. Tells you where the key is in the node at the current time. Ê7˜codešÏc™KšœB™BKš!™!Kš2™2Kšœœ™0K™2K™4K™*K™,—K™šÏk ˜ Kšœžœ˜ Kšœ žœ˜"Kšœ žœI˜XKšœ žœ˜&Kšœžœ žœ˜!Kšœžœ=˜PKšœ žœz˜ŠKšœžœÂ˜ÕKšœ žœ˜ Kšœ žœ˜$Kšœ žœ2˜@Kšœžœè˜üKšœ žœ8˜FKšœ žœ6˜EKšœ žœ[˜iKšœžœ˜Kšœ žœd˜rKšœ žœ@˜R—K˜KšÐbl œž ˜Kšžœ¦˜­Kšžœ(˜/šžœžœ˜"K˜Kšžœžœžœ˜Kšœžœ˜5Kšœ žœžœ˜)—headšœ™š Ïn œžœžœžœžœ˜JKšœžœžœ˜#š œžœ˜Kšžœ žœžœ˜3Kšžœ žœžœ˜6Kšœ˜—šœžœžœ ˜Kšœžœ˜š žœžœžœžœžœ˜3Kšœ žœ˜—Kšœžœ˜K˜ —K˜ —K˜Kšœ žœžœžœ5˜WK˜Kš œžœžœA˜RK˜Kš œžœžœ,˜?K˜š œžœžœ ˜Tšžœžœž˜Kšœ˜Kšœ˜Kšœ˜Kšžœžœ˜——K˜š œžœžœ&˜:KšœB˜B—K˜š  œžœžœ&˜˜Ž—šœ™š  œžœžœ˜Nšžœžœ ž˜Kšœ˜Kšœ˜Kšœ˜Kšžœžœ˜K˜——š œžœžœžœžœ žœ žœžœžœ,œžœ žœ˜×Kšžœžœžœ"˜2šžœ˜Kšœ6˜6Kšœ2˜2—K˜—š œžœžœžœžœ žœ žœžœžœ,œžœ žœ˜×Kšžœžœžœ"˜2šžœ'˜-Kšœ2˜2Kšœ(žœ˜1K˜——š œžœžœžœžœ žœ žœžœžœ,œžœ žœ˜ÖKšžœžœžœ"˜2šžœ'˜-Kšœ2˜2Kšœ(žœžœ˜<———šœ™š  œž œžœ žœžœžœžœ˜€KšžœQ˜WKšœ˜K˜—š  œž œžœžœžœžœ žœ˜všœP˜PKšœžœ ˜#—Kšœ˜K˜—Kšœ žœžœžœ˜—šœ™Kš  œžœžœžœžœ ˜XK˜Kš  œžœžœ-˜EK˜Kš  œžœžœ,˜CK˜Kš  œžœžœ,˜BK˜Kš œžœžœžœ*˜PK˜Kš  œžœžœžœ*˜KK˜Kš  œžœžœžœ*˜KK˜Kš œžœžœžœ.˜XK˜Kš œžœžœžœ.˜SK˜Kš œžœžœžœ.˜S—šœ$™$Kš  œžœžœ#˜9K˜Kš  œžœžœ%˜=K˜Kš  œžœžœ!˜7—šœ%™%Kš  œžœžœžœ'˜JK˜Kš  œžœžœžœ'˜JK˜Kš œžœžœ'˜CK˜Kš  œžœžœžœ'˜EK˜Kš œžœžœžœ&˜CK˜Kš œžœžœžœ,˜TK˜Kš œžœžœžœ,˜OK˜Kš  œžœžœ"˜9K˜š œžœžœžœ˜3K˜,K˜—Kš œžœžœ,˜MK˜Kš œžœžœ.˜QK˜Kš œžœžœ*˜IK˜Kš œžœžœ,˜MK˜Kš œžœžœ*˜IK˜Kš œžœžœ˜1K˜Kš œžœžœ˜/K˜Kš  œžœžœ$˜=K˜š œžœžœ?˜\K˜SK™—Kš œžœžœ*˜?K˜Kš œžœžœ)˜=K˜Kš  œžœžœ*˜BK˜Kš œžœžœ*˜?K˜Kš œžœžœ*˜EK˜Kš œžœžœ ˜3K˜Kš œžœžœ ˜1—šœ ™ Kš œžœžœ˜/K˜Kš œžœžœ˜-K˜Kš œžœžœ˜-K˜Kš œžœžœ˜1—šœ™š œžœžœ&˜DKšœJ™Jšœžœž˜,Kšœ˜Kšœ!˜!Kšœ ˜ Kšžœžœ˜—K™—š   œžœžœžœžœžœ˜CKšžœ<˜BK˜—š œžœžœ žœ$˜FKšœ4˜4šžœž˜K˜?—KšžœH˜LK˜—š œžœžœ žœ$˜FKšœ4˜4šžœž˜K˜>—KšžœG˜KK˜—š  œžœžœ žœ$˜KKšœ4˜4šžœž˜K˜>—KšžœG˜KK˜—š  œžœžœ$˜;šžœž˜K˜M—šž˜K˜UK˜——Kš  œžœžœ!˜7—šœ™š   œžœžœžœžœ˜6Kšœžœ˜š žœžœžœžœ žœ˜?K˜——š  œžœžœ˜EK˜4šžœž˜K˜1˜ šžœGž˜LK˜ Kšžœžœžœ˜&Kšžœ˜——Kšžœžœ˜K˜——š  œžœžœ žœ$˜HKš œžœE˜NK˜K˜—š  œžœžœ žœ˜9K˜Kš œ žœžœžœžœžœ˜IK˜K˜4Kšœ(žœ˜3Kšœ˜—K˜š  œžœžœ žœ˜7K˜*K˜3Kšœ"žœ˜-Kšœ˜—K˜Kš œžœžœ!˜=K˜Kš  œžœžœ!˜:K˜Kš  œžœžœ"˜9—šœ™š  œžœžœžœžœ˜5Kšœžœ'˜1š žœžœžœžœ žœ˜?K˜——š œžœžœ žœ$˜FKš œžœC˜LK˜——šœ™š   œžœžœžœžœ˜6K˜Kšžœžœžœ˜%K˜—Kš  œžœžœ"žœ˜AK˜Kš  œžœžœ"žœ˜F—šœ™š  œžœžœžœ žœ$˜Pš œžœ˜#K˜A—K˜——šœ#™#š  œž œžœžœžœ˜EKšœ/˜/—K™š œž œ žœžœ žœ žœ žœ˜jKšœ&˜&——šœ>™>š  œž œžœžœ˜>KšœÐ™ÐKšœ*˜*—K˜š  œž œžœžœ˜JK™;Kšœžœ˜ K˜˜.Kšœžœ˜*—Kšžœ˜Kšžœ žœ˜'—K˜Kšœžœžœžœ˜%K˜š  œž œžœ˜5Kšœ#˜#—K˜š  œž œ žœžœžœ žœžœžœžœžœ˜pš œžœžœ žœžœžœ˜9Kšžœ˜ —Kšžœ&˜,—K˜—K˜Kšžœ˜K˜K˜K˜—…—GV^Ñ