MatchViewer.mesa
Last edited by: David Kurlander - September 1, 1987 2:33:47 pm PDT
Bier, September 4, 1987 3:57:07 pm PDT
DIRECTORY
AtomButtons, AtomButtonsTypes, Buttons, Commander, GGBasicTypes, GGInterfaceTypes, GGModelTypes, Rope;
MatchViewer: CEDAR DEFINITIONS = BEGIN
GGData: TYPE = GGInterfaceTypes.GGData;
Point: TYPE = GGBasicTypes.Point;
Slice: TYPE = GGModelTypes.Slice;
SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor;
Some Important Types
MatchLevel: TYPE = {anywhere, trajLevel, sliceLevel};
SearchOp: TYPE = {disjunction, conjunction};
ReplaceOp: TYPE = {doReplace, doOperations};
MatchData: TYPE = REF MatchDataObj;
MatchDataObj: TYPE = RECORD [
from: ChoiceData,
to: ChoiceData,
theirData: GGData ← NIL, -- GGData of Gargoyle viewer to search
hostData: GGData ← NIL, -- GGData of Gargoyle whose SlackProcess (and menu) we're using
commander: Commander.Handle, -- commander through which MatchTool was invoked
matchLevel: MatchLevel, -- level of search (anywhere, trajLevel, sliceLevel)
searchOp: SearchOp, -- connective for items in search
replaceOp: ReplaceOp, -- action to perform upon Yes or ChangeAll(doReplace, doOperations)
lastCaretPos: Point, -- useful until Eric adds the EditProc
replaceOpButton, levelButton, searchOpButton: AtomButtons.EnumTypeRef,
exactMatch, rotationInv, scaleInv: AtomButtons.TwoState,
polarity, structure, matchNodes: AtomButtons.TwoState,
contextSensitive: AtomButtons.TwoState,
toleranceButton: AtomButtonsTypes.GraphicsState
];
ChoiceData: TYPE = REF ChoiceDataObj;
ChoiceDataObj: TYPE = RECORD [
shape: AtomButtons.TwoState,
class: AtomButtons.TwoState,
type: AtomButtons.TwoState,
color: AtomButtons.TwoState,
fillColor: AtomButtons.TwoState,
string: AtomButtons.TwoState,
font: AtomButtons.TwoState,
fontTform: AtomButtons.TwoState,
dash: AtomButtons.TwoState,
joints: AtomButtons.TwoState,
ends: AtomButtons.TwoState,
width: AtomButtons.TwoState
];
And Some Important Procedures
GetMatchData: PROC RETURNS [MatchData]; -- returns the central MatchData structure (in which is stored all sorts of goodies)
GetFromData: PROC RETURNS [GGData]; -- returns the GGData of the "From" Gargoyle Viewer
GetToData: PROC RETURNS [GGData]; -- returns the GGData of the "To" Gargoyle Viewer
GetGrepData: PROC RETURNS [GGData]; -- returns the GGData of "grep" scene
GetMatchTolerance: PROC RETURNS [REAL];
GetContextSensitive: PROC [matchData: MatchData] RETURNS [contextSensitive: BOOL];
GetGGInputFocus: PROC RETURNS [theirData: GGData ← NIL]; -- returns the GGData of the current input focus (NIL if not a Gargoyle viewer)
ErrorFeedback: PROC [message: Rope.ROPE]; -- flashes an error message on the MatchTool feedback line
CenterSel: Buttons.ButtonProc; -- centers the selection of a ggData in a biscroller
END.