name: Rope.ROPE ← "EditTool";
info: Info ← TextNode.pZone.NEW[InfoRec];
info.layout ← TextNode.pZone.NEW[LayoutRec];
{
OPEN info;
interrupt ← NEW[BOOL ← FALSE];
layout.entryLeft ← layout.initLeft ← 0;
layout.entryVSpace ← 3;
layout.heightSoFar ← layout.initHeight ← 1;
----------------------------
BuildContainer[info,name]; -- build enclosing viewer
----------------------------
BuildTargetEntry[info]; -- the "target:" field
BuildSourceEntry[info]; -- the "replacement:" field
heights[0] ← layout.heightSoFar+layout.entryVSpace;
layout.heightSoFar ← layout.heightSoFar+2;
----------------------------
BuildSearchButtons[info]; -- the various choices for seaching
ToNext[layout];
BuildInitCapEntry[info]; -- Capitalize like first replaced char or not
ToMiddle[layout];
BuildOperationEntry[info]; -- Do Replace / Do Operations Specified Below
ToNext[layout];
BuildSubstituteEntry[info]; -- the within/after/entire choice
ToNext[layout];
BuildMiniPatternDocEntry[info];
heights[1] ← layout.heightSoFar+layout.entryVSpace+1;
HRule[layout];
----------------------------
BuildLooksButtons[info]; -- caret/selection looks, Looks:, Get, Set, etc.
ToNext[layout]; HRule[layout];
----------------------------
BuildTypeButtons[info]; -- type names
ToNext[layout]; HRule[layout];
----------------------------
BuildStyleButtons[info]; -- style names
ToNext[layout];
heights[2] ← layout.heightSoFar+layout.entryVSpace+1;
HRule[layout];
----------------------------
BuildPropertyButtons[info]; -- property values
HRule[layout];
----------------------------
BuildSortButtons[info]; -- Sort increasing/decreasing; sort text/lines/branches; Sort
ToNext[layout]; HRule[layout];
----------------------------
BuildOperationField[info]; -- the "Operations:" field
VGap[layout];
BuildGetAndSetOpsEntries[info]; -- "GetLast" "SetCom" "GetCom" etc.
VGap[layout];
BuildFileListEntries[info]; -- the "Files:" field and the DoForEachFile command
VGap[layout];
heights[3] ← layout.heightSoFar+layout.entryVSpace+1;
HRule[layout];
----------------------------
BuildExtraButtons[info]; -- the low level edit commands
HRule[layout];
----------------------------
--BuildPatternDocEntry[info];-- -- explaining special chars for patterns
----------------------------
currentHeightIndex ← 0;
ViewerOps.SetOpenHeight[layout.container, heights[currentHeightIndex]];
};