DIRECTORY GGBasicTypes, GGInterfaceTypes, GGModelTypes, GGSegmentTypes, GGObjects; GGSelect: CEDAR DEFINITIONS = BEGIN BoundBox: TYPE = GGBasicTypes.BoundBox; Caret: TYPE = GGInterfaceTypes.Caret; EntityGenerator: TYPE = GGModelTypes.EntityGenerator; Outline: TYPE = GGModelTypes.Outline; OutlineDescriptor: TYPE = GGModelTypes.OutlineDescriptor; Scene: TYPE = GGModelTypes.Scene; SelectionClass: TYPE = GGSegmentTypes.SelectionClass; Sequence: TYPE = GGModelTypes.Sequence; SequenceGenerator: TYPE = GGModelTypes.SequenceGenerator; Slice: TYPE = GGModelTypes.Slice; SliceParts: TYPE = GGModelTypes.SliceParts; SliceGenerator: TYPE = GGModelTypes.SliceGenerator; SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor; SliceDescriptorGenerator: TYPE = GGModelTypes.SliceDescriptorGenerator; Traj: TYPE = GGModelTypes.Traj; TrajEnd: TYPE = GGModelTypes.TrajEnd; TrajGenerator: TYPE = GGModelTypes.TrajGenerator; SelectAll: PROC [scene: Scene, selectClass: SelectionClass]; SelectOutline: PROC [outline: Outline, parts: SliceParts, scene: Scene, selectClass: SelectionClass]; SelectEntireOutline: PROC [outline: Outline, scene: Scene, selectClass: SelectionClass]; SelectSlice: PROC [slice: Slice, parts: SliceParts, scene: Scene, selectClass: SelectionClass]; SelectEntireSlice: PROC [slice: Slice, scene: Scene, selectClass: SelectionClass]; SelectTraj: PROC [traj: Traj, scene: Scene, selectClass: SelectionClass]; SelectSequence: PROC [seq: Sequence, scene: Scene, selectClass: SelectionClass]; ReselectTraj: PROC [traj: Traj, trajEnd: TrajEnd, scene: Scene, extend: BOOL]; DeselectAllAllClasses: PROC [scene: Scene]; DeselectAll: PROC [scene: Scene, selectClass: SelectionClass]; DeselectEntity: PROC [entity: REF ANY, scene: Scene, selectClass: SelectionClass]; DeselectEntityAllClasses: PROC [entity: REF ANY, scene: Scene]; DeselectOutline: PROC [outline: Outline, parts: SliceParts, scene: Scene, selectClass: SelectionClass]; DeselectEntireOutline: PROC [outline: Outline, scene: Scene, selectClass: SelectionClass]; DeselectTraj: PROC [traj: Traj, scene: Scene, selectClass: SelectionClass]; DeselectSequence: PROC [seq: Sequence, scene: Scene, selectClass: SelectionClass]; DeselectSlice: PROC [slice: Slice, parts: SliceParts, scene: Scene, selectClass: SelectionClass]; IsSelectedInFull: PROC [entity: REF ANY, scene: Scene, selectClass: SelectionClass] RETURNS [BOOL]; IsSelectedInPart: PROC [entity: REF ANY, scene: Scene, selectClass: SelectionClass] RETURNS [BOOL]; NoSelections: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [BOOL]; ListSelectedDescendants: PROC [entity: REF ANY, scene: Scene, selectClass: SelectionClass] RETURNS [components: LIST OF REF ANY]; FindSelectedSequence: PROC [traj: Traj, scene: Scene, selectClass: SelectionClass] RETURNS [seq: Sequence]; ListSelected: PUBLIC PROC [scene: Scene, selectClass: SelectionClass] RETURNS [selectedList: LIST OF REF ANY]; FindSequenceInList: PUBLIC PROC [traj: Traj, selectedList: LIST OF REF ANY] RETURNS [seq: Sequence]; FindSelectedOutline: PROC [outline: Outline, scene: Scene, selectClass: SelectionClass] RETURNS [outlineD: OutlineDescriptor]; FindSelectedSlice: PROC [slice: Slice, scene: Scene, selectClass: SelectionClass] RETURNS [sliceD: SliceDescriptor]; SelectedStuff: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [selectedGen: EntityGenerator]; SelectedSequences: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [seqGen: SequenceGenerator]; SelectedOutlines: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [outDGen: GGModelTypes.OutlineDescriptorGenerator]; SelectedSlices: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [sliceDescGen: SliceDescriptorGenerator]; NextSliceDescriptor: PROC [g: SliceDescriptorGenerator] RETURNS [next: SliceDescriptor]; NextOutlineDescriptor: PROC [g: GGModelTypes.OutlineDescriptorGenerator] RETURNS [next: OutlineDescriptor]; DeletedFromSelection: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [deleted: EntityGenerator]; OutlineSequenceGenerator: TYPE = REF OutlineSequenceGeneratorObj; OutlineSequenceGeneratorObj: TYPE = RECORD [ list: LIST OF OutlineSequence ]; OutlineSequence: TYPE = REF OutlineSequenceObj; OutlineSequenceObj: TYPE = RECORD [ outline: Outline, -- the outline represented by this record fenceSeq: Sequence, -- included parts of the fence trajectory holeSeqs: SequenceGenerator -- included parts of holes ]; SelectedOutlineSequences: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [outSeqGen: OutlineSequenceGenerator]; NextOutlineSequences: PROC [outSeqGen: OutlineSequenceGenerator] RETURNS [outSeq: OutlineSequence]; RunProc: TYPE = PROC [run: Sequence] RETURNS [traj: Traj]; ForEachOutlineRun: PROC [scene: Scene, caret: Caret, selectClass: SelectionClass, runProc: RunProc, segmentsOnly: BOOL _ TRUE, selectNewRuns: BOOL _ FALSE] RETURNS [bBox: BoundBox]; SubstituteForSegment: PROC [traj: Traj, segNum: NAT, newRun: Traj, scene: Scene] RETURNS [bBox: BoundBox, newTraj: Traj]; END. $GGSelect.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by Bier on December 28, 1986 4:25:16 pm PST Contents: Procedures dealing selecting and deselecting objects, including both selection actions and selection feedback. Pier, November 20, 1986 12:22:35 pm PST Kurlander August 25, 1986 2:16:06 pm PDT Select and Deselect outline is now selected. This overrides any selections on outline's parts. traj is now selected. This overrides any selections on traj's parts. THIS PROC for backward compatibility. Please use SelectOutline. THIS PROC for backward compatibility. Please use SelectOutline. traj is now deselected. This overrides any selections on traj's parts. THIS PROC for backward compatibility. Please use DeselectOutline. THIS PROC for backward compatibility. Please use DeselectOutline. Updating selections after objects are modified SaveSelectionsInOutline: PROC [outline: Outline, scene: Scene]; The outline is about to have some of its pieces copies. We want those pieces to inherit selection information from the original. Store this information in the original. SaveSelectionInTraj: PUBLIC PROC [traj: Traj, selectClass: SelectionClass, scene: Scene]; Save selection data internally (in preparation for trajectory surgery) RemakeSelectionsFromOutline: PROC [outline: Outline, scene: Scene]; This outline has just been created by copying parts from an existing outline. The selection information was copied as well. Make sequences from the selection bits, and select these sequences. Enumerate Selected Objects Returns TRUE iff the entity is selected in entirety. Returns TRUE if all or part of entity is selected. These are the cases: 1) entity is a slice. Some outline is selected all or in part. 2) entity is an outline. Some trajectory is selected all or in part. 3) entity is a trajectory. Some joint or segment is selected. 4) entity is a sequence. Some joint or segment is selected Returns TRUE if nothing is currently selected. If trajectory is not selected at all, this returns NIL. If trajectory is not selected at all, this returns NIL. If trajectory is not selected at all, this returns NIL. Returns a generator for all selected entities (i.e. everything which is selected as selectClass). Creates separate outlines for each run on the selected list and puts these runs and any slices on the selected list into the returned EntityGenerator. Used to remember selected elements for use by Undelete. Returns a generator for all selected sequences, grouped by outline. Finds all selected runs (contigous selections of joints and segments, and allows the called to replace them, using a callback proc. This is used for deletion and for changing spline type. IF segmentsOnly is true, ForEachOutlineRun will not call the runProc with runs consisting of a single joint. If selectNewRuns is true, the new runs will be normal selected after ForEachOutlineRun completes. Replaces the specified segment with a new run. Probably shouldn't be in GGSelect, but it uses many of the non-public routines used by ForEachOutlineRun. Κ}˜codešœ ™ Kšœ Οmœ1™Kš œžœ žœžœ-˜RKš œžœ žœžœ˜?Kš œžœR˜gKš œžœ?˜Zš  œžœ9˜KKšœIŸ2 Ÿ™‹—š œžœ<˜RKšŸ2 Ÿ™B—Kš  œžœN˜aK˜K™.K™š œžœ"™?K™ͺ—š œžœžœ9™YK™FK™—š œžœ"™CK™Α—K™K™š  œžœ žœžœ-žœžœ˜cKšœ4™4—š  œžœ žœžœ-žœžœ˜cKšœH™HKšœ@™@KšœF™FKšœ?™?Kšœ<™<—š  œžœ-žœžœ˜NK™.—Kš œžœ žœžœ-žœžœžœžœžœ˜š œžœ9žœ˜kKšœ3žœ™7—Kš  œžœžœ-žœžœžœžœžœ˜nKš œžœžœžœžœžœžœžœ˜dš œžœ?žœ˜~Kšœ3žœ™7—š œžœ;žœ˜tKšœ3žœ™7—š  œžœ-žœ ˜gKšœa™a—Kš œžœ-žœ˜hKš œžœ-žœ4˜~Kš œžœ-žœ*˜rKš œžœžœ˜XKš œžœ.žœ˜kš œžœ-žœ˜jKšœΟ™Ο—K˜Kšœžœžœ˜Ašœžœžœ˜,Kšœžœžœ˜K˜—Kšœžœžœ˜/šœžœžœ˜#KšœΟc)˜Kšœ‘˜6K˜K˜—š œžœ-žœ'˜yK™C—Kš œžœ'žœ˜cK˜Kšœ žœžœžœ˜:š œžœ[žœžœžœžœžœ˜΅Kšœ™—š œžœžœžœ!˜yK™™—Kšžœ˜K˜—…—š%;