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

#include "StdHeaders.h"

#include "CheckGroupBoxCtrl.h"

#include "Dialog.h"

using namespace VectorWorks::VWUI;

VWCheckGroupBoxCtrl::VWCheckGroupBoxCtrl(TControlID id)
: VWControlsContainer( id )
{
}

VWCheckGroupBoxCtrl::~VWCheckGroupBoxCtrl()
{
}

bool VWCheckGroupBoxCtrl::CreateControl(VWDialog* pDlg, const TXString& text, bool bHasFrame/*=true*/)
{
	::GS_CreateCheckBoxGroupBox( gCBP, pDlg->GetControlID(), (short) fControlID, text, bHasFrame );
	return VWControl::CreateControl( pDlg );
}

bool VWCheckGroupBoxCtrl::GetState() const
{
	Boolean			state		= 0;

	::GS_GetBooleanItem( gCBP, fpParentDlg->GetControlID(), fControlID, state );

	return (bool)state;
}

void VWCheckGroupBoxCtrl::SetState(bool state)
{
	::GS_SetBooleanItem( gCBP, fpParentDlg->GetControlID(), fControlID, state );
}
