IndexToolViewer.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Created by Rick Beach, July 6, 1983 5:28 pm
Rick Beach, April 6, 1985 8:53:30 pm PST
DIRECTORY
ChoiceButtons USING [EnumTypeRef],
IndexTree USING [Index],
NumberLabels USING [NumberLabel],
Rope USING [ROPE],
TextNode USING [Ref],
ViewerClasses USING [Viewer];
IndexToolViewer: CEDAR DEFINITIONS
= BEGIN
ROPE: TYPE = Rope.ROPE;
IndexToolHandle: TYPE = REF IndexToolHandleRec;
IndexToolHandleRec: TYPE = RECORD [
toolViewer: ViewerClasses.Viewer, -- the IndexTool viewer itself (for ChoiceButtons)
indexViewer: ViewerClasses.Viewer, -- the facsimile index
kindOfIndex: ATOM, -- for example: $Index, $AuthorIndex, $InterfaceIndex, $CommandIndex
index: IndexTree.Index,
rootIndexBranch: TextNode.Ref,
documentViewer: ViewerClasses.Viewer ← NIL,
indexPhrasesContainer: ViewerClasses.Viewer,
sortAsPhrasesContainer: ViewerClasses.Viewer,
seePhrasesContainer: ViewerClasses.Viewer,
kindOfEntry: ATOM, -- for example: $Ordinary, $See, $SeeAlso, $Definition, $Example
kindOfEntryChoices: ChoiceButtons.EnumTypeRef,
startPosition: CARDINAL,
startPositionLabel: NumberLabels.NumberLabel,
endPosition: CARDINAL,
endPositionLabel: NumberLabels.NumberLabel,
entries: CARDINAL,
entriesLabel: NumberLabels.NumberLabel,
seeCount: CARDINAL,
seeCountLabel: NumberLabels.NumberLabel,
nestingCount: CARDINAL,
nestingCountLabel: NumberLabels.NumberLabel
];
CreateIndexFromDocument: PROCEDURE [documentName: ROPENIL,
kindOfIndex: ROPENIL]
RETURNS [indexToolHandle: IndexToolHandle];
CreateIndexFromViewer: PROCEDURE [documentViewer: ViewerClasses.Viewer,
kindOfIndex: ROPENIL]
RETURNS [indexToolHandle: IndexToolHandle];
NewTool: PROCEDURE [documentName: ROPE, kindOfIndex: ROPE]
RETURNS [indexToolHandle: IndexToolHandle ← NEW[IndexToolHandleRec]];
END.