///////////////////////////////////////////////////////////
// File:			wksp_simplefeature_polygon.h
//
// Author:			Stefan Liersch
// Contact:			stefan.liersch@googlemail.com,
//					stefan.liersch@ufz.de
//
// Date:			2008-04-06
// last modified:	2008-04-06
//
//---------------------------------------------------------
// DESCRIPTION
//---------------------------------------------------------
//
//---------------------------------------------------------
// ToDo
//---------------------------------------------------------
// 
//
///////////////////////////////////////////////////////////

#include "wksp_simplefeature.h"

//---------------------------------------------------------
#ifndef _HEADER_INCLUDED__SAGA_GUI__WKSP_SimpleFeature_Polygon_H
#define _HEADER_INCLUDED__SAGA_GUI__WKSP_SimpleFeature_Polygon_H
//---------------------------------------------------------

class CWKSP_SimpleFeature_Polygon : public CWKSP_SimpleFeature
{
public:
	CWKSP_SimpleFeature_Polygon(CSG_SimpleFeature *pSimpleFeature);
	~CWKSP_SimpleFeature_Polygon(void);

	bool						Get_Style				(wxPen &Pen, wxBrush &Brush, bool &bOutline, wxString *pName = NULL);


protected:

	bool						m_bPoints, m_bOutline;

	wxPen						m_Pen;

	wxBrush						m_Brush;


	virtual void				On_Create_Parameters	(void);
	virtual void				On_DataObject_Changed	(void);
	virtual void				On_Parameters_Changed	(void);

	virtual int					On_Parameter_Changed	(CSG_Parameters *pParameters, CSG_Parameter *pParameter);

	virtual void				_Draw_Initialize		(CWKSP_Map_DC &dc_Map);
	virtual void				_Draw_Shape				(CWKSP_Map_DC &dc_Map, CSG_Shape *pShape, bool bSelection);
	virtual void				_Draw_Label				(CWKSP_Map_DC &dc_Map, CSG_Shape *pShape);

	void						_Draw_Polygon_Points	(CWKSP_Map_DC &dc_Map, CSG_Shape_Polygon *pPolygon);

	virtual void				_Edit_Shape_Draw_Move	(wxDC &dc, CSG_Rect rWorld, double ClientToWorld, wxPoint Point);
	virtual void				_Edit_Shape_Draw		(CWKSP_Map_DC &dc_Map);
	virtual int					_Edit_Shape_HitTest		(CSG_Point Point, double max_Dist, int &iPart, int &iPoint);
	virtual void				_Edit_Snap_Point_ToLine (CSG_Point Point, CSG_Point &snap_Point, double &snap_Dist, CSG_Shape *pShape);

private:

	wxMenu*						On_Edit_Get_Menu_SF		(wxMenu* pMenu);
};
//---------------------------------------------------------

#endif /* _HEADER_INCLUDED__SAGA_GUI__WKSP_SimpleFeature_Polygon_H */
