//ROMTEAM StickObjects (Gabi Dumitrascu 02/02/98)

/*=========================================================================
* edtdsel.hpp :  class EDT_DialogSelect
*
* Version			1.0
* Creation date		
* Revision date
*
* CPA2 Gabi Dumitrascu 98-02-02
*=======================================================================*/
#ifdef ACTIVE_EDITOR

#ifndef __DIALOGSEL_HPP__
#define __DIALOGSEL_HPP__

#include "EDTRes.h"

//**************************************
#ifndef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
#endif
//**************************************

class EDT_HierarchyEditor;
class EDT_SuperObject;
class CPA_Interface;

/////////////////////////////////////////////////////////////////////////////
// EDT_DialogSelect form view

class EDT_DialogSelect : public CFormView
{
protected:
	EDT_HierarchyEditor *m_pEditor;
	// super object
	CPA_SuperObject	*m_pDstObject, *m_pSrcObject;

	int m_iCrtDstPoint, m_iCrtSrcPoint;
	MTH3D_tdstVector  m_stDstPoints[3], m_stSrcPoints[3];

	BOOL m_bWrongObject;

public:
	// standard constructor
	EDT_DialogSelect (CWnd* pParent = NULL);

	CPA_Interface * GetInterface (void); 

	//CPA2 Nicolae Suparatu 98-02-10
	EDT_DialogEdit *m_edit;
	//End CPA2 Nicolae Suparatu 98-02-10
	
	// dialog
	void fn_vInitDialog     (EDT_HierarchyEditor *pEditor, FRMBase *pFrame);
	void fn_vUpdateDialog   (void);
	BOOL fn_bIsSelecting	();
	void fn_vSetPoint		(tdstMousePos *p_stPos, HIE_tdstPickInfo *p_stPickInfo);

protected:
	// Form Data
	//{{AFX_DATA(EDT_DialogSelect)
	enum { IDD = EDT_IDD_DIALOGSELECT };
	CButton	m_ckSelectSrc;
	CButton	m_ckSelectDst;
	CEdit	m_PosZ33;
	CEdit	m_PosZ3;
	CEdit	m_PosZ22;
	CEdit	m_PosZ2;
	CEdit	m_PosZ11;
	CEdit	m_PosZ1;
	CEdit	m_PosY33;
	CEdit	m_PosY3;
	CEdit	m_PosY22;
	CEdit	m_PosY2;
	CEdit	m_PosY11;
	CEdit	m_PosY1;
	CEdit	m_PosX33;
	CEdit	m_PosX3;
	CEdit	m_PosX22;
	CEdit	m_PosX2;
	CEdit	m_PosX11;
	CEdit	m_PosX1;
	CButton	m_bMove;
	//}}AFX_DATA

	void fn_vUpdateDstDialog(void);
	void fn_vUpdateSrcDialog(void);

	BOOL fn_bIsSelectingDst	() { return m_ckSelectDst.GetCheck(); }
	BOOL fn_bIsSelectingSrc	() { return m_ckSelectSrc.GetCheck(); }

	void fn_vSetDstPoint	(tdstMousePos *p_stPos, HIE_tdstPickInfo *p_stPickInfo);
	void fn_vSetSrcPoint	(tdstMousePos *p_stPos, HIE_tdstPickInfo *p_stPickInfo);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(EDT_DialogSelect)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation

protected:
	// Generated message map functions
	//{{AFX_MSG(EDT_DialogSelect)
	afx_msg void OnDestroy();
	afx_msg void OnMove();
	afx_msg void OnSelectDst();
	afx_msg void OnSelectSrc();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//////////////////////////////////////////////////////////////////////
// interface for the EDT_DialogSelectType class.
//////////////////////////////////////////////////////////////////////
/*=========================================================================
* Version			1.0
* Creation date		9 september 1998
* Revision date		9 september 1998
* Author : Silviu Simen
*=======================================================================*/

class EDT_DialogSelectType : public CDialog
{
private:
	CPA_Interface* m_p_oInterface;

public:
	BOOL				m_bWasOK;
	CString				m_csSelSector;
	unsigned long		m_ulSelType;

	EDT_DialogSelectType	(CPA_Interface *p_oInterface, CWnd* pParent = NULL);
	virtual ~EDT_DialogSelectType();

	CPA_Interface*  GetInterface (void) { return m_p_oInterface; }

	void Init (void);

// Dialog Data
	//{{AFX_DATA(EDT_DialogSelectType)
	enum { IDD = EDT_IDD_DIALOGSELECTTYPES };
	CListBox	m_cSectors;
	CListBox	m_cTypes;
	//}}AFX_DATA

protected:

	//{{AFX_VIRTUAL(EDT_DialogSelectType)
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	virtual void OnOK( ) ;
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};


#endif //__DIALOGSEL_HPP__
#endif // ACTIVE_EDITOR



/////////////////////////////////////////////////////////////////////////////


//ENDROMTEAM StickObjects (Gabi Dumitrascu)



