MatchViewer.mesa
Last edited by: David Kurlander - September 1, 1987 2:33:47 pm PDT
Bier, December 30, 1987 9:03:25 pm PST
Pier, September 10, 1987 2:34:23 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;
MatchTool Types
MatchLevel: TYPE = {anywhere, trajLevel, clusterLevel};
SearchOp: TYPE = {disjunction, conjunction};
ReplaceOp: TYPE = {doReplace, doOperations};
MatchData: TYPE = REF MatchDataObj;
MatchDataObj: TYPE = RECORD [
from: ChoiceData, -- From column of buttons
to: ChoiceData, -- To column of buttons
theirData: GGData, -- GGData of Gargoyle viewer to search
hostData: GGData, -- 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
];
MatchTool 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.