bool TabWidget::handleKeyDown(Common::KeyState state) { if (state.hasFlags(Common::KBD_SHIFT) && state.keycode == Common::KEYCODE_TAB) adjustTabs(kTabBackwards); else if (state.keycode == Common::KEYCODE_TAB) adjustTabs(kTabForwards); return Widget::handleKeyDown(state); }
TabbedPane::TabbedPane( Widget * tabContainer /*= NULL*/, Widget *widgetContainer /*= NULL*/ ) : highestTab(0), tabPadding(0), resizeTabContent(false), selectedTab(reinterpret_cast<Tab*>(NULL),reinterpret_cast<Widget*>(NULL)) { if(tabContainer) { isMaintainingTabContainer = false; this->tabContainer = tabContainer; } else { isMaintainingTabContainer = true; this->tabContainer = new EmptyWidget(); } if(widgetContainer) { isMaintainingWidgetContainer = false; this->widgetContainer = widgetContainer; } else { isMaintainingWidgetContainer = true; this->widgetContainer = new EmptyWidget(); } addPrivateChild(this->tabContainer); addPrivateChild(this->widgetContainer); setTabable(true); setFocusable(true); setReverseTabable(false); adjustTabs(); }
void TabbedPane::adjustSize() { adjustTabs(); adjustWidgetContainer(); }