DIRECTORY GGBasicTypes, GGInterfaceTypes, GGModelTypes, GGSegmentTypes, GGScene; 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]; SelectSlice: PROC [sliceD: SliceDescriptor, 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] RETURNS [newHot: Sequence]; DeselectEntityAllClasses: PROC [entity: REF ANY, scene: Scene]; DeselectEntity: PROC [entity: REF ANY, scene: Scene, selectClass: SelectionClass]; DeselectAllAllClasses: PROC [scene: Scene]; DeselectAll: PROC [scene: Scene, selectClass: SelectionClass]; DeselectSlice: PROC [slice: Slice, parts: SliceParts, scene: Scene, selectClass: SelectionClass]; DeselectEntireSlice: PROC [slice: Slice, scene: Scene, selectClass: SelectionClass]; DeselectTraj: PROC [traj: Traj, scene: Scene, selectClass: SelectionClass]; DeselectSequence: PROC [seq: Sequence, scene: Scene, selectClass: SelectionClass]; IsSelectedInFull: PROC [slice: Slice, 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 SliceDescriptor]; FindSequenceInList: PUBLIC PROC [traj: Traj, selectedList: LIST OF SliceDescriptor] RETURNS [seq: Sequence]; FindSelectedSlice: PROC [slice: Slice, scene: Scene, selectClass: SelectionClass] RETURNS [sliceD: SliceDescriptor]; 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]; 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: Slice, -- 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, 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]; SliceProc: TYPE = PROC [SliceDescriptor]; OutlineProc: TYPE = PROC [OutlineDescriptor]; DoForEachSelectedSlice: PROC [scene: Scene, selectClass: SelectionClass, sliceProc: SliceProc]; UniformSelections: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [BOOL]; END. δGGSelect.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by Bier on March 9, 1987 7:43:23 pm PST Contents: Procedures dealing selecting and deselecting objects, including both selection actions and selection feedback. Pier, May 14, 1987 4:04:45 pm PDT Kurlander August 25, 1986 2:16:06 pm PDT Select traj is now selected. This overrides any selections on traj's parts. THIS PROC for backward compatibility. Please use SelectSlice THIS PROC for backward compatibility. Please use SelectSlice. Deselect 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 DeselectSlice. Enumerate Selected Objects Returns TRUE iff the slice 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. 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. Returns TRUE if every selected segment (or segment equivalent) has the same looks and every selected fence has the same fill color and every selected text slice has the same font. Obsolete Definitions SelectOutline: PROC [sliceD: OutlineDescriptor, scene: Scene, selectClass: SelectionClass]; SelectEntireOutline: PROC [outline: Outline, scene: Scene, selectClass: SelectionClass]; outline is now selected. This overrides any selections on outline's parts. DeselectOutline: PROC [outline: Outline, parts: SliceParts, scene: Scene, selectClass: SelectionClass]; DeselectEntireOutline: PROC [outline: Outline, scene: Scene, selectClass: SelectionClass]; 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. SelectedStuff: PROC [scene: Scene, selectClass: SelectionClass] RETURNS [sliceDescGen: SliceDescriptorGenerator]; FindSelectedOutline: PROC [outline: Outline, scene: Scene, selectClass: SelectionClass] RETURNS [outlineD: OutlineDescriptor]; If trajectory is not selected at all, this returns NIL. NextOutlineDescriptor: PROC [g: GGModelTypes.OutlineDescriptorGenerator] RETURNS [next: OutlineDescriptor]; DoForEachSelectedOutline: PROC [scene: Scene, selectClass: SelectionClass, outlineProc: OutlineProc]; ΚΫ˜codešœ ™ Kšœ Οmœ1™™>—Kš  œžœ6žœžœ˜iK˜Kšœ™Kš œžœ žœžœ˜?Kš œžœ žœžœ-˜RKš œžœ˜+Kš  œžœ-˜>Kš  œžœN˜aKš œžœ;˜Tš  œžœ9˜KKšœIŸ2 Ÿ™‹—š œžœ<˜RKšŸ@™@—K™K™š œžœ;žœžœ˜`Kšœ3™3—š  œžœ žœžœ-žœžœ˜cKšœH™HKšœ@™@KšœF™FKšœ?™?Kšœ<™<—š  œžœ-žœžœ˜NK™.—Kš œžœ žœžœ-žœžœžœžœžœ˜š œžœ9žœ˜kKšœ3žœ™7—Kš   œžœžœ-žœžœžœ˜vKš  œžœžœžœžœžœ˜lš œžœ;žœ˜tKšœ3žœ™7—Kš œžœ-žœ˜hKš œžœ-žœ4˜~š œžœ-žœ*˜rKšœa™a—Kš œžœžœ˜Xš œžœ-žœ˜jKšœΟ™Ο—K˜Kšœžœžœ˜Ašœžœžœ˜,Kšœžœžœ˜K˜—Kšœžœžœ˜/šœžœžœ˜#KšœΟc)˜:Kšœ‘)˜>Kšœ‘˜6K˜K˜—š œžœ-žœ'˜yK™C—Kš œžœ'žœ˜cK˜Kšœ žœžœžœ˜:š œžœMžœžœžœžœžœ˜§Kšœ™—š œžœžœžœ!˜yK™™—K˜Kšœ žœžœ˜)Kšœ žœžœ˜-K˜Kš œžœC˜_K˜š œžœ-žœžœ˜SK™³—K˜KšŸ™K™Kš  œžœH™[š œžœ?™XK™K—Kš œžœR™gKš œžœ?™Zš œžœ"™?K™ͺ—š œžœžœ9™YK™F—š œžœ"™CK™Α—Kš  œžœ-žœ*™qš œžœ?žœ™~Kšœ3žœ™7—Kš œžœ.žœ™kKš œžœG™eK™K™Kšžœ˜K˜—…—8'χ