예제 #1
0
 /// <summary>
 /// Adds the given state to the top of the focus stack.
 /// </summary>
 public void AddFocus(State state)
 {
     if (focusState.Count > 0)
         GetFocusedState().OnBlur();
     focusState.Add(state);
     state.OnFocus();
 }
예제 #2
0
 /// <summary>
 /// Adds the given state to the top of the focus stack.
 /// </summary>
 public void AddFocus(State state)
 {
     if (focusState.Count > 0)
     {
         GetFocusedState().OnBlur();
     }
     focusState.Add(state);
     state.OnFocus();
 }
예제 #3
0
 /// <summary>
 /// Puts the given state on the top of the focus stack and removes all previous copies of the state from lower levels.
 /// If this state does not exist in the focus stack it will still be added to the top.
 /// </summary>
 public void BringToFront(State state)
 {
     State cur = GetFocusedState();
     focusState.RemoveAll(i => i == state);
     focusState.Add(state);
     if (GetFocusedState() != cur)
     {
         GetFocusedState().OnBlur();
         state.OnFocus();
     }
 }
예제 #4
0
        /// <summary>
        /// Puts the given state on the top of the focus stack and removes all previous copies of the state from lower levels.
        /// If this state does not exist in the focus stack it will still be added to the top.
        /// </summary>
        public void BringToFront(State state)
        {
            State cur = GetFocusedState();

            focusState.RemoveAll(i => i == state);
            focusState.Add(state);
            if (GetFocusedState() != cur)
            {
                GetFocusedState().OnBlur();
                state.OnFocus();
            }
        }