//
//	Copyright © 2006 Nemetschek North America 
//	All Rights Reserved.
//
// Created by Vladislav Stanev

#include "StdHeaders.h"

#include "TabCtrl.h"

#include "Dialog.h"
#include "TabPaneCtrl.h"

using namespace VectorWorks::VWUI;

VWTabCtrl::VWTabCtrl(TControlID id)
: VWControl( id )
{
}

VWTabCtrl::~VWTabCtrl()
{
}

bool VWTabCtrl::CreateControl(VWDialog* pDlg)
{
	::GS_CreateTabControl( gCBP, pDlg->GetControlID(), (short)fControlID );
	return VWControl::CreateControl( pDlg );;
}

void VWTabCtrl::AddPane(VWTabPaneCtrl* pPane)
{
	::GS_CreateTabPane( gCBP, fpParentDlg->GetControlID(), (short)fControlID, (short)pPane->GetControlID() );
}

TControlID VWTabCtrl::GetActivePaneControlID() const
{
	return ::GS_GetActivePane( gCBP, fpParentDlg->GetControlID(), fControlID );
}

void VWTabCtrl::SetActivePaneControlID(TControlID paneControlID)
{
	::GS_DisplayTabPane( gCBP, fpParentDlg->GetControlID(), fControlID, paneControlID );
}
