GGSelect.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Last edited by Bier on October 17, 1985 2:24:13 pm PDT
Contents: Procedures dealing selecting and deselecting objects, including both selection actions and selection feedback.
DIRECTORY
GGInterfaceTypes,
GGModelTypes,
GGObjects;
GGSelect: CEDAR DEFINITIONS =
BEGIN
EntityGenerator: TYPE = GGModelTypes.EntityGenerator;
GargoyleData: TYPE = GGInterfaceTypes.GargoyleData;
Outline: TYPE = GGModelTypes.Outline;
SelectionClass: TYPE = GGInterfaceTypes.SelectionClass;
Sequence: TYPE = GGModelTypes.Sequence;
SequenceGenerator: TYPE = GGModelTypes.SequenceGenerator;
Traj: TYPE = GGModelTypes.Traj;
TrajGenerator: TYPE = GGModelTypes.TrajGenerator;
Select and Deselect
SelectSequence:
PROC [seq: Sequence, gargoyleData: GargoyleData, selectClass: SelectionClass]
RETURNS [union, newMinusOld: Sequence];
Joint number index is now selected.
All joints between start and end (inclusive) are now selected. If traj is closed, then select those joints found by starting at start and going in the direction of increasing index (if increasing is TRUE) or decreasing otherwise.
SelectTraj:
PROC [traj: Traj, gargoyleData: GargoyleData, selectClass: SelectionClass];
traj is now selected. This overrides any selections on traj's parts. traj is not actually placed on the selected lists; a sequence representing traj is.
SelectOutline:
PROC [outline: Outline, gargoyleData: GargoyleData, selectClass: SelectionClass];
outline is now selected. This overrides any selections on outline's parts.
SelectAll: PROC [gargoyleData: GargoyleData, selectClass: SelectionClass];
SelectEntity: PROC [entity: REF ANY, gargoyleData: GargoyleData, selectClass: SelectionClass];
DeselectSequence:
PROC [seq: Sequence, gargoyleData: GargoyleData, selectClass: SelectionClass];
All joints between start and end (inclusive) are now selected. If traj is closed, then select those joints found by starting at start and going in the direction of increasing index (if increasing is TRUE) or decreasing otherwise.
DeselectTraj:
PROC [traj: Traj, gargoyleData: GargoyleData, selectClass: SelectionClass];
traj is now deselected. This overrides any selections on traj's parts.
DeselectOutline: PROC [outline: Outline, gargoyleData: GargoyleData, selectClass: SelectionClass];
DeselectAll: PROC [gargoyleData: GargoyleData, selectClass: SelectionClass];
DeselectEntity: PROC [entity: REF ANY, gargoyleData: GargoyleData, selectClass: SelectionClass];
Enumerate Selected Objects
IsSelected: PROC [entity: REF ANY, gargoyleData: GargoyleData, selectClass: SelectionClass] RETURNS [BOOL];
IsSelectedInPart:
PROC [entity:
REF
ANY, gargoyleData: GargoyleData, selectClass: SelectionClass]
RETURNS [
BOOL];
Returns TRUE if all or part of entity is selected. These are the cases:
1) entity is a cluster. 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 (not yet implemented).
NoSelections:
PROC [gargoyleData: GargoyleData, selectClass: SelectionClass]
RETURNS [
BOOL];
Returns TRUE if nothing is currently selected.
ListSelectedDescendants: PROC [entity: REF ANY, gargoyleData: GargoyleData, selectClass: SelectionClass] RETURNS [components: LIST OF REF ANY];
FindSelectedSequence:
PROC [traj: Traj, gargoyleData: GargoyleData, selectClass: SelectionClass]
RETURNS [seq: Sequence];
If trajectory is not selected at all, this returns NIL.
SelectedEntities:
PROC [gargoyleData: GargoyleData, selectClass: SelectionClass]
RETURNS [selectedGen: EntityGenerator];
Returns a generator for all selected entities (i.e. everything which is selected as selectClass).
SelectedSequences: PROC [gargoyleData: GargoyleData, selectClass: SelectionClass] RETURNS [seqGen: SequenceGenerator];
END.