Example #1
0
	void Tabber::showTab(Tab& tab)
	{
		if(m_currentTab)
		{
			m_currentTab->hide();
			m_currentTab->header().deactivate();
		}
		tab.show();
		tab.header().activate();
		m_currentTab = &tab;
	}
Example #2
0
	void Tabber::removeTab(Tab& tab)
	{
		if(&tab == m_currentTab)
			m_currentTab = nullptr;

		tab.header().destroy();
		tab.destroy();

		if(m_tabs.containerContents().size() > 0)
			this->showTab(size_t(0));
		if(m_tabs.containerContents().size() == 1)
			m_headers.hide();
	}