<> <> <> <> <> <<>> DIRECTORY GGFont, GGInterfaceTypes, GGModelTypes, GGSegmentTypes, GGUserInput, Imager, MatchTurtle, MatchViewer, Rope; Match: CEDAR DEFINITIONS = BEGIN <<>> GGData: TYPE = GGInterfaceTypes.GGData; Segment: TYPE = GGSegmentTypes.Segment; Slice: TYPE = GGModelTypes.Slice; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; Traj: TYPE = GGModelTypes.Traj; <<>> <> ItemID: TYPE = RECORD [ slice: Slice _ NIL, traj: Traj _ NIL, seg: Segment _ NIL ]; LooksInfo: TYPE = REF LooksInfoObj; LooksInfoObj: TYPE = RECORD [ owner: ItemID, shape: MatchTurtle.TurtleHeader _ NIL, class: ATOM, type: REF ANY _ NIL, color: Imager.Color _ NIL, fillColor: Imager.Color _ NIL, string: Rope.ROPE _ NIL, font: GGFont.FontData _ NIL, fontTform: GGFont.FontData _ NIL, dashes: DashInfo _ NIL, joints: Imager.StrokeJoint, -- TYPE = {miter, bevel, round} ends: Imager.StrokeEnd, -- TYPE = {square, butt, round} width: REAL, shapeDef, classDef, typeDef, colorDef, fillColorDef, stringDef, fontDef, fontTformDef, dashesDef, jointsDef, endsDef, widthDef: BOOLEAN _ FALSE ]; DashInfo: TYPE = REF DashInfoObj; DashInfoObj: TYPE = RECORD [ dashed: BOOL _ FALSE, pattern: GGModelTypes.SequenceOfReal _ NIL, offset: REAL _ 0.0, length: REAL _ -1.0 ]; SearchInfo: TYPE = REF SearchInfoObj; SearchInfoObj: TYPE = RECORD [ reverse: BOOL _ FALSE, slice: Slice _ NIL, kids: LIST OF Slice _ NIL, -- in normal order, or reverse order depending on the value of reverse. closedTraj: BOOL _ FALSE, segs: LIST OF Segment _ NIL, -- should belong to first traj on list, if slice is an Outline string: Rope.ROPE _ NIL, empty: BOOL _ FALSE ]; ItemMatch: TYPE = REF ItemMatchObj; ItemMatchObj: TYPE = RECORD [ matcher: ItemID, matchee: ItemID, backwards: BOOL _ FALSE ]; MatchDescriptor: TYPE = REF MatchDObj; MatchDObj: TYPE = RECORD [ posD: MatchTurtle.PositionDescriptor _ NIL, isMatch: BOOL _ FALSE, --a complete match has been found matchedSlices: LIST OF SliceDescriptor _ NIL, mapping: LIST OF ItemMatch _ NIL ]; SearchState: TYPE = REF SearchStateObj; SearchStateObj: TYPE = RECORD [ ahead, behind: LIST OF SearchInfo _ NIL, -- SearchInfo's yet to be matched lastDirection: REF ANY _ NIL, -- specifies direction of last search, macroOps: LIST OF LIST OF REF ANY, -- events stored between StartOps and EndOps macroOn: BOOL _ FALSE -- specifies that we're currently saving To Viewer events ]; <> <> Search: PROC [toSearch: GGData, event: LIST OF REF ANY, refresh: BOOL] RETURNS [found: BOOL]; SearchDisjInit: PROC [them: GGData, event: LIST OF REF ANY]; RemakeDisjList: PROC [theirData: GGData, direction: REF ANY, select: BOOL] RETURNS [toSearch: LIST OF SearchInfo]; SearchDisjNext: PROC [searchList: LIST OF SearchInfo, direction: REF ANY, refresh: BOOL _ TRUE] RETURNS [newSearchList: LIST OF SearchInfo, found: BOOL]; <> ChangeAll: GGUserInput.UserInputProc; GetSearchState: PROC RETURNS [SearchState]; CreateMatchDescriptor: PROC [] RETURNS [matchD: MatchDescriptor]; RememberMatchDescriptor: PROC [matchD: MatchDescriptor]; InitializeSearch: PROC [them: GGData, event: LIST OF REF ANY]; SearchConjNext: PROC [ahead, behind: LIST OF SearchInfo, direction: REF ANY, refresh: BOOL _ TRUE] RETURNS [newAhead, newBehind: LIST OF SearchInfo, found: BOOL]; <> <> HeightSort: PROC [slices: LIST OF Slice, ascending: BOOL] RETURNS [LIST OF Slice]; <> <> CreateSearchInfo: PROC [slice: Slice, direction: REF ANY] RETURNS [searchInfo: SearchInfo]; IsEmptySearchInfo: PROC [searchInfo: SearchInfo] RETURNS [BOOL _ FALSE]; CacheSegsOfFirstTraj: PROC [domain: SearchInfo]; AfterDescriptor: PROC [sliceD: SliceDescriptor, direction: REF ANY] RETURNS [after: SearchInfo _ NIL]; <> <> GetFromLooks: PROC RETURNS [looksList: LIST OF REF ANY _ NIL]; -- returns looks information of objects in the From (source) viewer GetToLooks: PROC RETURNS [looksList: LIST OF REF ANY _ NIL]; -- returns looks information of objects in the To (target) viewer GetLooksOfSlice: PROC [slice: Slice, choice: MatchViewer.ChoiceData, value: BOOL _ TRUE] RETURNS [REF ANY]; GetLooksOfTraj: PROC [traj: Traj, choice: MatchViewer.ChoiceData, value: BOOL _ TRUE] RETURNS [LIST OF LooksInfo]; GetLooksOfSegment: PROC [slice: Slice, traj: Traj, seg: Segment, choice: MatchViewer.ChoiceData, value: BOOL, shape: MatchTurtle.TurtleHeader] RETURNS [looks: LooksInfo]; FindMatchInSlice: PROC [searchInfo: SearchInfo, fromLooks: LIST OF REF ANY, direction: REF ANY, matchD: MatchDescriptor] RETURNS [match: SliceDescriptor _ NIL, rest: SearchInfo _ NIL]; LooksEqual: PROC [l1, l2: LooksInfo] RETURNS [BOOL _ TRUE]; RemoveSelected: PROC [infoList: LIST OF SearchInfo, sliceD: SliceDescriptor]; RemoveDescriptorFromInfo: PROC [sliceD: SliceDescriptor, info: SearchInfo]; <> <> SelectMapped: PROC [scene: GGModelTypes.Scene, matches: LIST OF ItemMatch]; SelectionFilter: PROC [scene: GGModelTypes.Scene, matches: LIST OF ItemMatch] RETURNS [selectList: LIST OF ItemMatch _ NIL]; <<>> <> <> ReplaceOperation: PROC [refresh: BOOL _ TRUE] RETURNS [success: BOOL _ FALSE]; END. <<>>