Exemplo n.º 1
0
        bool MoveFocusToWidget(FocusWidget widget, DirectionType direction)
        {
            switch (widget)
            {
            case FocusWidget.BackButton:
                currentFocus = PreviousButton;
                return(PreviousButton.ChildFocus(direction));

            case FocusWidget.NextButton:
                currentFocus = NextButton;
                return(NextButton.ChildFocus(direction));

            case FocusWidget.MenuButton:
                currentFocus = DropDownButton;
                return(DropDownButton.ChildFocus(direction));

            case FocusWidget.Tabs:
            case FocusWidget.TabCloseButton:
                GrabFocus();
                currentFocus = null;
                QueueDraw();
                return(true);

            case FocusWidget.None:
                break;
            }
            return(false);
        }