Esempio n. 1
0
void
PanelWidget::removeClickFocus()
{
    TabWidget* parentPane = getParentPane();

    if (parentPane) {
        parentPane->setWidgetClickFocus(this, false);
    }
    if (_gui) {
        _gui->setCurrentPanelFocus(0);
    }
}
Esempio n. 2
0
void
PanelWidget::takeClickFocus()
{
    TabWidget* parentPane = getParentPane();

    if (parentPane) {
        parentPane->setWidgetClickFocus(this, true);
    }
    if (_gui) {
        const RegisteredTabs& tabs = _gui->getRegisteredTabs();
        for (RegisteredTabs::const_iterator it = tabs.begin(); it != tabs.end(); ++it) {
            if (it->second.first != this) {
                it->second.first->removeClickFocus();
            }
        }
        _gui->setCurrentPanelFocus(this);
    }
}