31 if (mModalFocusedWidget && mModalFocusedWidget != widget)
34 mModalFocusedWidget =
nullptr;
37 gcn::FocusHandler::requestModalFocus(widget);
44 if (mModalFocusedWidget == widget)
46 gcn::FocusHandler::releaseModalFocus(widget);
53 gcn::FocusHandler::requestModalFocus(
mModalStack.front());
63 gcn::FocusHandler::remove(widget);
68 gcn::FocusHandler::tabNext();
75 gcn::FocusHandler::tabPrevious();
84 gcn::Widget *widget = mFocusedWidget->getParent();
88 auto *window =
dynamic_cast<Window*
>(widget);
92 window->requestMoveToTop();
96 widget = widget->getParent();
void checkForWindow()
Checks to see if the widget tabbed to is in a window, and if it is, it requests the window be moved t...
void requestModalFocus(gcn::Widget *widget) override
Sets modal focus to a widget.
void remove(gcn::Widget *widget) override
Removes a widget from the focus handler.
void releaseModalFocus(gcn::Widget *widget) override
Releases modal focus of a widget.
std::list< gcn::Widget * > mModalStack
Stack of widgets that have requested modal forcus.
void tabPrevious() override
void tabNext() override
Overloaded to allow windows to move to the top when one of their widgets is tabbed to when tabbing th...