#ifndef __SHAPE_H_INCLUDED_
#define __SHAPE_H_INCLUDED_

#include "..\incs\sst\ucb.h"
#include "indix.h"

class INDIX_API CShape : public CIndicater
{
public:
	enum SHAPE_TYPE{
		ST_RECT  =0,   //generic rectangle, 
		ST_ROUND ,     //rectangle with rounded rectangle
		ST_ELLIPSE,    //ellipse
	};

	CShape(void);
	virtual ~CShape(void);

	virtual BOOL Serialize(HANDLE device, BOOL bIn ) ;

	virtual void Show(CDelegate* pDelegate,int mode, BOOL bForce);	
	virtual CUCObj* Clone(  CUCObj *twin);
	virtual void OnEndTrack(CDelegate* pDelegate,HGPD hCur,  GPoint point, int nHitTest) ;

	int GetShapeType() { return m_shapeType; };
	void SetShapeType(CShape::SHAPE_TYPE type);


	GRgb    GetBorderColor() { return m_borderColor; };
	virtual void    SetBorderColor(GRgb& val);

	virtual void   SetCtrlRect(int left, int top, UINT width, UINT height) ;
	//virtual void SetClientRect(int x, int y, int w, int h);

protected:
	GRgb m_borderColor;

private:
	void UpdateShapeMask(int type);

	RV_HANDLE DrawRect(HGDC dc, RV_HANDLE hStroke);
	RV_HANDLE DrawRectR(HGDC dc, RV_HANDLE hStroke);
	RV_HANDLE DrawEllipse(HGDC dc, RV_HANDLE hStroke);

	RvMask  m_shapeMask;

	SHAPE_TYPE m_shapeType;
	//BOOL m_bFilled;

};








#endif  //ENDIF OF __SHAPE_H_INCLUDED_

