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

#include "StdHeaders.h"

#include "CustomCtrlAttrs.h"


using namespace VectorWorks::VWUI;


// ---------------------------------------------------------------------------------------------------------------
VWCustomCtrlPen::VWCustomCtrlPen()
{
//	fStyle	= kCustomCtrlPenStyle_Solid;
	fSize	= 1;
	fColor.Set8( 255, 255, 255 );
}

VWCustomCtrlPen::VWCustomCtrlPen(Uint8 red, Uint8 green, Uint8 blue)
{
//	fStyle	= kCustomCtrlPenStyle_Solid;
	fSize	= 1;
	fColor.Set8( red, green, blue );
}

VWCustomCtrlPen::VWCustomCtrlPen(Uint8 red, Uint8 green, Uint8 blue, Sint16 size)
{
//	fStyle	= kCustomCtrlPenStyle_Solid;
	fSize	= size;
	fColor.Set8( red, green, blue );
}
/*
VWCustomCtrlPen::VWCustomCtrlPen(ECustomCtrlPenStyle style, Uint8 red, Uint8 green, Uint8 blue)
{
	fStyle	= style;
	fSize	= 1;
	fColor.Set8( red, green, blue );
}

VWCustomCtrlPen::VWCustomCtrlPen(ECustomCtrlPenStyle style, Uint8 red, Uint8 green, Uint8 blue, Uint16 size)
{
	fStyle	= style;
	fSize	= size;
	fColor.Set8( red, green, blue );
}
*/
VWCustomCtrlPen::VWCustomCtrlPen(const VWCustomCtrlPen& src)
{
	this->operator = ( src );
}

VWCustomCtrlPen::~VWCustomCtrlPen()
{
}

VWCustomCtrlPen& VWCustomCtrlPen::operator=(const VWCustomCtrlPen& src)
{
	fSize	= src.fSize;
	fColor	= src.fColor;
//	fStyle	= src.fStyle;
	return *this;
}

Sint16 VWCustomCtrlPen::GetSize() const
{
	return fSize;
}

void VWCustomCtrlPen::SetSize(Sint16 size)
{
	fSize	= size;
}

GSColor VWCustomCtrlPen::GetColor() const
{
	return fColor;
}

void VWCustomCtrlPen::SetColor(Uint8 red, Uint8 green, Uint8 blue)
{
	fColor.Set8( red, green, blue );
}


/*
ECustomCtrlPenStyle	VWCustomCtrlPen::GetStyle() const
{
	return fStyle;
}
*/
// ---------------------------------------------------------------------------------------------------------------
VWCustomCtrlBrush::VWCustomCtrlBrush()
{
//	fStyle		= kCustomCtrlBrushStyle_Solid;
	fColor.Set8( 0, 0, 0 );
}

VWCustomCtrlBrush::VWCustomCtrlBrush(Uint8 red, Uint8 green, Uint8 blue)
{
//	fStyle		= kCustomCtrlBrushStyle_Solid;
	fColor.Set8( red, green, blue );
}
/*
VWCustomCtrlBrush::VWCustomCtrlBrush(ECustomCtrlBrushStyle style, Uint8 red, Uint8 green, Uint8 blue)
{
	fStyle		= style;
	fColor.Set8( red, green, blue );
}*/

VWCustomCtrlBrush::VWCustomCtrlBrush(const VWCustomCtrlBrush& src)
{
	this->operator = ( src );
}

VWCustomCtrlBrush::~VWCustomCtrlBrush()
{
}

VWCustomCtrlBrush& VWCustomCtrlBrush::operator=(const VWCustomCtrlBrush& src)
{
	fColor	= src.fColor;
//	fStyle	= src.fStyle;
	return *this;
}

GSColor VWCustomCtrlBrush::GetColor() const
{
	return fColor;
}

void VWCustomCtrlBrush::SetColor(Uint8 red, Uint8 green, Uint8 blue)
{
	fColor.Set8( red, green, blue );
}

/*
ECustomCtrlBrushStyle VWCustomCtrlBrush::GetStyle() const
{
	return fStyle;
}*/

// ---------------------------------------------------------------------------------------------------------------
VWCustomCtrlFont::VWCustomCtrlFont()
{
	fFontName			= "Arial";
	fSize				= 12;
	fbBold				= false;
	fbItalic			= false;
	fbUnderlined		= false;
	fdRotation			= 0;
	fbBaselineMirror	= false;
}

VWCustomCtrlFont::VWCustomCtrlFont(const TXString& fontName, Uint32 size)
{
	fFontName			= fontName;
	fSize				= size;
	fbBold				= false;
	fbItalic			= false;
	fbUnderlined		= false;
	fdRotation			= 0;
	fbBaselineMirror	= false;
}

VWCustomCtrlFont::VWCustomCtrlFont(const TXString& fontName, Uint32 size, bool bBold, bool bItalic, bool bUnderlined)
{
	fFontName			= fontName;
	fSize				= size;
	fbBold				= bBold;
	fbItalic			= bItalic;
	fbUnderlined		= bUnderlined;
	fdRotation			= 0;
	fbBaselineMirror	= false;
}

VWCustomCtrlFont::VWCustomCtrlFont(const VWCustomCtrlFont& src)
{
	this->operator = ( src );
}

VWCustomCtrlFont::~VWCustomCtrlFont()
{
}

VWCustomCtrlFont& VWCustomCtrlFont::operator=(const VWCustomCtrlFont& src)
{
	fFontName			= src.fFontName;
	fSize				= src.fSize;
	fbBold				= src.fbBold;
	fbItalic			= src.fbItalic;
	fbUnderlined		= src.fbUnderlined;
	fdRotation			= src.fdRotation;
	fbBaselineMirror	= src.fbBaselineMirror;
	return *this;
}

TXString VWCustomCtrlFont::GetFontName() const
{
	return fFontName;
}

Uint32 VWCustomCtrlFont::GetFontSize() const
{
	return fSize;
}

void VWCustomCtrlFont::SetFont(const TXString& name, Uint32 size)
{
	fFontName	= name;
	fSize		= size;
}

bool VWCustomCtrlFont::GetBold() const
{
	return fbBold;
}

bool VWCustomCtrlFont::GetItalic() const
{
	return fbItalic;
}

bool VWCustomCtrlFont::GetUnderlined() const
{
	return fbUnderlined;
}

void VWCustomCtrlFont::SetStyle(bool bold, bool italic, bool underlined)
{
	fbBold			= bold;
	fbItalic		= italic;
	fbUnderlined	= underlined;
}

double VWCustomCtrlFont::GetRotation() const
{
	return fdRotation;
}

void VWCustomCtrlFont::SetRotation(double rot)
{
	fdRotation	= rot;
}

bool VWCustomCtrlFont::GetBaselineMirror() const
{
	return fbBaselineMirror;
}

void VWCustomCtrlFont::SetBaselineMirror(bool mirror)
{
	fbBaselineMirror	= mirror;
}

