Пример #1
0
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);
}
Пример #2
0
  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();
  }
Пример #3
0
 void TabbedPane::adjustSize()
 {
   adjustTabs();
   adjustWidgetContainer();
 }