/**\brief Adds a Tab to the Tabs collection. */ Tabs *Tabs::AddChild( Widget *widget ){ assert( widget != NULL ); if ( widget->GetType() != "Tab" ){ LogMsg(ERR,"Error attempted to add non-Tab widget to Tab container: %s", widget->GetName().c_str()); return NULL; } Tab* tabwidget = static_cast<Tab*>( widget ); // Call generic to add the widget Container::AddChild( widget ); if ( activetab == NULL) this->activetab = tabwidget; // Adjust Scrollbars to this container tabwidget->w = GetW(); tabwidget->h = GetH()-TAB_HEADER; tabwidget->ResetScrollBars(); return this; }