// GUIDropZone.h: interface for the GUIDropZone class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GUIDROPZONE_H__2E041B42_C026_4752_8E6E_29AF66970DF6__INCLUDED_)
#define AFX_GUIDROPZONE_H__2E041B42_C026_4752_8E6E_29AF66970DF6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "GUIObjectList.h"

namespace Adept
{
class DropZone;
};

using namespace Adept;

class GUIDropZone : public GUIObjectList
{
private:

protected:
	void Copy(GUIDropZone &obj);
	DropZone *MyDropZone;
	void SyncNodesToData();
	void SyncDataToNodes();
	void Build();
public:
	EdGUIObject *Clone();
	void AddPanel(CObjPanelDlg *pnl,UndoCommand **cmd);
	void AssociateTo(DropZone *dzone);
	GUIDropZone(CString name,Point3D pnt);
	GUIDropZone();
	int Select(Point3D &topleft,Point3D &bottomright);	
	int SelectionDepth(Point3D &pnt) { return EdGUIObject::SelectionDepth(pnt)+GUIObjectList::SelectionDepth(pnt);}	
	int ObjectDepth(Point3D &pnt) 	{return EdGUIObject::ObjectDepth(pnt)+GUIObjectList::ObjectDepth(pnt);}
	bool CanTakeChildren() {return false;}

	void Select();
	int Select(Point3D &pnt);
		

	void RemoveFromMap();
	void AddToMap();

	void SortChildren() {} 
	void OffsetSelection(Point3D &vct); 
	void RotateSelection(UnitQuaternion &rot);
	EdGUIObject *AddDropPoint(Point3D &pnt);
	EdGUIObject *AddNodeIfSelected(Point3D &pnt,bool insert);
	void SetName(CString &name);
	void Dissociate() {  MyDropZone=NULL;}
	void OffsetBy( Point3D &pnt);
	void RotateBy(UnitQuaternion &rot);
	int GroupSelected(UndoCommand **cmd) {return 0;}
	bool UnGroupSelected(UndoCommand **cmd) {return false;}
	void MoveToGroup(EdGUIObject *gobj) {}
	void UpdateVisibility(DWORD visflag) { SetHide(visflag&SHOW_DROPZONES?false:true);}
	void CorrectGroupPosition(Point3D &pnt) {}
	EdGUIObject *GetObjAtPoint(Point3D &pnt);
	void GetExtents(Point3D *tl,Point3D *br);
	void SaveTextInfo(NotationFile *not_file);
	void SyncData() {SyncDataToNodes();}
	bool IsEmpty() {return false;}
	void UpdateMat();

	void Draw(DrawInfo &dinf);
	void DrawTag(DrawInfo &dinf, unsigned long tag_flags);

	void RemoveObject(int idx);

	int GetUnSelIcon() {return ICON_DROPZONE; }
	int GetSelIcon()   {return ICON_DROPZONE; }
	CString GetTypeName() {return ("DropZone");} 


	virtual ~GUIDropZone();

};

#endif // !defined(AFX_GUIDROPZONE_H__2E041B42_C026_4752_8E6E_29AF66970DF6__INCLUDED_)
