public IEnumerator Apply() { SelectionManager = MetaSelectionSet.ConstructPayloadSelectionSet(Bound, Bars, NormalState, SelectedState, NoneSelectedState, NormalStateMulti, SelectedStateMulti, NoneSelectedStateMulti); var clickSelector = PayloadSelectorFactory.InstantiateClickSelect(SelectionManager, gameObject); clickSelector.SelectionMode.OperationToPerform = SelectionOperation.SelectOnly; var controlClickSelector = PayloadSelectorFactory.InstantiateClickSelect(SelectionManager, gameObject, new InputModifiers() { Control = true }); controlClickSelector.SelectionMode.OperationToPerform = SelectionOperation.ToggleFullySelected; var rowSelect = PayloadSelectorFactory.InstantiateRowColumnSelect(SelectionManager); rowSelect.SelectionMode.OperationToPerform = SelectionOperation.SelectOnly; var controlRowSelect = PayloadSelectorFactory.InstantiateRowColumnSelect(SelectionManager); controlRowSelect.SelectionMode.OperationToPerform = SelectionOperation.ToggleFullySelected; PayloadSelectorFactory.InstantiateSelectAll(SelectionManager); var iterator = SelectionManager.TransmitAll(); while (iterator.MoveNext( )) { yield return(null); } }
public void ApplyPoints() { SelectionManager = MetaSelectionSet.ConstructPayloadSelectionSet(Bound, ScatterPoints, NormalState, SelectedState, NoneSelectedState, NormalStateMulti, SelectedStateMulti, NoneSelectedStateMulti); PayloadSelectorFactory.InstantiateSelectAll(SelectionManager); PayloadSelectorFactory.InstantiateFrustumSelect(SelectionManager); var clickSelector = PayloadSelectorFactory.InstantiateClickSelect(SelectionManager, gameObject); clickSelector.SelectionMode.OperationToPerform = SelectionOperation.Select; }
public void Render(VisualPayload payload, IMetaSelectable selectable) { RenderAxisLabel(payload); // Optional 'Axis title' // Labels along an axis: var mode = AxisMode.GetLastKeyValue(payload.Data); if (mode == AxialLabelAxisMode.Discrete) { // create equality criteria var normalSelector = PayloadSelectorFactory.InstantiateCriterionEqualsSelect(selectable); normalSelector.SelectionMode.OperationToPerform = SelectionOperation.SelectOnly; normalSelector.CriterionField = (mut) => AxisIndexVariable.GetValue(mut); normalSelector.ArrityLevels = AxisIndexVariable.NumberOfIntermediates; var toggleSelector = PayloadSelectorFactory.InstantiateCriterionEqualsSelect(selectable); toggleSelector.SelectionMode.OperationToPerform = SelectionOperation.ToggleFullySelected; toggleSelector.RequiredModifiers = new InputModifiers() { Control = true }; toggleSelector.CriterionField = (mut) => AxisIndexVariable.GetValue(mut); toggleSelector.ArrityLevels = AxisIndexVariable.NumberOfIntermediates; normalSelector.FieldLastKey = AxisIndexVariable.AbsoluteKey; toggleSelector.FieldLastKey = AxisIndexVariable.AbsoluteKey; var discreteCriterionSelectors = new List <ICriterionMetaSelector>() { normalSelector, toggleSelector }; RenderItemLabelsDiscrete(payload, discreteCriterionSelectors); } else if (mode == AxialLabelAxisMode.Continuous) { // create range criteria var normalRangeSelector = PayloadSelectorFactory.InstantiateCriterionRangeSelect(selectable); normalRangeSelector.SelectionMode.OperationToPerform = SelectionOperation.SelectOnly; normalRangeSelector.CriterionField = (mut) => ComparisonValue.GetValue(mut); normalRangeSelector.ArrityLevels = ComparisonValue.NumberOfIntermediates; var toggleRangeSelector = PayloadSelectorFactory.InstantiateCriterionRangeSelect(selectable); toggleRangeSelector.SelectionMode.OperationToPerform = SelectionOperation.ToggleFullySelected; toggleRangeSelector.RequiredModifiers = new InputModifiers() { Control = true }; toggleRangeSelector.CriterionField = (mut) => ComparisonValue.GetValue(mut); toggleRangeSelector.ArrityLevels = ComparisonValue.NumberOfIntermediates; normalRangeSelector.FieldLastKey = ComparisonValue.AbsoluteKey; toggleRangeSelector.FieldLastKey = ComparisonValue.AbsoluteKey; var continuousCriterionSelectors = new List <ICriterionMetaSelector>() { normalRangeSelector, toggleRangeSelector }; RenderItemLabelsContinuous(payload, continuousCriterionSelectors); } }