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

#include "StdHeaders.h"

#include "SliderCtrl.h"

#include "Dialog.h"

using namespace VectorWorks::VWUI;

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

VWSliderCtrl::~VWSliderCtrl()
{
}

bool VWSliderCtrl::CreateControl(VWDialog* pDlg, long lSliderSize)
{
	::GS_CreateControl( gCBP, pDlg->GetControlID(), fControlID, kSliderControl, (unsigned char*)"", lSliderSize );
	return VWControl::CreateControl( pDlg );
}


long VWSliderCtrl::GetSliderValue() const
{
	long value = 0;
	::GS_GetControlData( gCBP, fpParentDlg->GetControlID(), fControlID, value );
	return value;
}

void VWSliderCtrl::SetSliderValue(long value)
{
	::GS_SetControlData( gCBP, fpParentDlg->GetControlID(), fControlID, value );
}
