Example #1
0
        bool MoveFocusToWidget(FocusWidget widget, DirectionType direction)
        {
            switch (widget)
            {
            case FocusWidget.Widget:
                GrabFocus();
                currentFocus = null;
                return(true);

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

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

            case FocusWidget.None:
                break;
            }

            return(false);
        }