UpdateStates() public method

public UpdateStates ( Atk states ) : void
states Atk
return void
Beispiel #1
0
        protected override Atk.StateSet OnRefStateSet()
        {
            Atk.StateSet states = base.OnRefStateSet();

            editableTextExpert.UpdateStates(states);

            states.AddState(Atk.StateType.SingleLine);
            return(states);
        }
Beispiel #2
0
        protected override Atk.StateSet OnRefStateSet()
        {
            Atk.StateSet states = base.OnRefStateSet();

            if (states.ContainsState(Atk.StateType.Defunct))
            {
                return(states);
            }

            states.AddState(Atk.StateType.Transient);
            states.AddState(Atk.StateType.SingleLine);

            if (selectionItemProvider != null)
            {
                states.AddState(Atk.StateType.Selectable);
                if (selectionItemProvider.IsSelected)
                {
                    states.AddState(Atk.StateType.Selected);
                }
            }

            IToggleProvider toggleProvider = ToggleProvider;

            if (toggleProvider != null)
            {
                ToggleState state = toggleProvider.ToggleState;

                if (state == ToggleState.On)
                {
                    states.AddState(Atk.StateType.Checked);
                }
                else
                {
                    states.RemoveState(Atk.StateType.Checked);
                }
            }

            if (expandCollapseProvider != null)
            {
                ExpandCollapseState expandCollapseState
                    = (ExpandCollapseState)Provider.GetPropertyValue(
                          ExpandCollapsePatternIdentifiers.ExpandCollapseStateProperty.Id);
                if (expandCollapseState != ExpandCollapseState.LeafNode)
                {
                    states.AddState(Atk.StateType.Expandable);
                }
                if (expandCollapseState == ExpandCollapseState.Expanded)
                {
                    states.AddState(Atk.StateType.Expanded);
                }
            }

            editableTextExpert.UpdateStates(states);

            return(states);
        }
Beispiel #3
0
        protected override Atk.StateSet OnRefStateSet()
        {
            Atk.StateSet states = base.OnRefStateSet();

            if (states.ContainsState(Atk.StateType.Defunct))
            {
                return(states);
            }

            editableTextExpert.UpdateStates(states);

            states.AddState(multiLine ? Atk.StateType.MultiLine : Atk.StateType.SingleLine);
            states.RemoveState(multiLine ? Atk.StateType.SingleLine : Atk.StateType.MultiLine);

            return(states);
        }
Beispiel #4
0
        protected override Atk.StateSet OnRefStateSet()
        {
            Atk.StateSet states = base.OnRefStateSet();

            if (states.ContainsState(Atk.StateType.Defunct))
            {
                return(states);
            }

            states.AddState(Atk.StateType.Transient);
            states.AddState(Atk.StateType.SingleLine);

            states.AddState(Atk.StateType.Selectable);
            if (selectionItemProvider.IsSelected)
            {
                states.AddState(Atk.StateType.Selected);
            }

            if (toggleProvider != null)
            {
                ToggleState state = toggleProvider.ToggleState;

                if (state == ToggleState.On)
                {
                    states.AddState(Atk.StateType.Checked);
                }
                else
                {
                    states.RemoveState(Atk.StateType.Checked);
                }
            }

            editableTextExpert.UpdateStates(states);

            return(states);
        }