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

#include "StdHeaders.h"

#include "RadioGroupBoxCtrl.h"

#include "Dialog.h"

using namespace VectorWorks::VWUI;

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

VWRadioGroupBoxCtrl::~VWRadioGroupBoxCtrl()
{
}

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

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

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

	return (bool)state;
}

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