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

#include "StdHeaders.h"

#include "LineAttributePopupCtrl.h"

#include "Dialog.h"

using namespace VectorWorks::VWUI;

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

VWLineAttributePopupCtrl::~VWLineAttributePopupCtrl()
{
}

bool VWLineAttributePopupCtrl::CreateControl(VWDialog* pDlg)
{
	::GS_CreateLineAttributePopup( gCBP, pDlg->GetControlID(), fControlID );
	return VWControl::CreateControl( pDlg );
}

void VWLineAttributePopupCtrl::GetSelectedAttribute(short& outLineStyle, short& outLineWeight) const
{
	::GS_GetLineAttributeData( gCBP, fpParentDlg->GetControlID(), fControlID, outLineStyle, outLineWeight );
}

void VWLineAttributePopupCtrl::SetSelectedAttribute(short lineStyle, short lineWeight)
{
	::GS_SetLineAttributeData( gCBP, fpParentDlg->GetControlID(), fControlID, lineStyle, lineWeight );
}
