/*=========================================================================
*
* EDTSpec.hpp
*
*
* Version			1.0
* Creation date
* Revision date
*
* Shaitan
*=======================================================================*/
#ifdef ACTIVE_EDITOR

#ifndef __EDTSPEC_HPP__
#define __EDTSPEC_HPP__

//**************************************
#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
//**************************************

#include "itf/CPAEnum.hpp"
#include "itf/CPAListB.hpp"

class EDT_HierarchyEditor;
class EDT_SuperObject;
class EDT_SubMenu;


/*===========================================================================
*		Description:	Class EDT_Specific
*		Creation date:
*		Author:			Shaitan
*---------------------------------------------------------------------------
*		Revision date:                        Author:
*=========================================================================*/
class EDT_SpecificEditor
{
protected:
	EDT_HierarchyEditor	*m_pEditor;
	BOOL				m_bIsLoadingWorld;
	CString				m_csStaticFileName;
	CString				m_csDynamicFileName;

public:
	EDT_SpecificEditor (EDT_HierarchyEditor *pEditor);
	~EDT_SpecificEditor (void);

	EDT_HierarchyEditor * GetEditor (void)		{ return m_pEditor; }
	
	CString GetStaticFileName		(void)		{ return m_csStaticFileName; }
	CString GetDynamicFileName		(void)		{ return m_csDynamicFileName; }

	CString GetModifSectionName		(void);

	void	fn_vSpecificInit		(void); 


/*===========================================================================
	General
=========================================================================*/

public:
	
// submenu
	long fn_lDefineSubmenu		(EDT_SubMenu *p_oSubMenu, UINT uiStartID);
	void fn_vOnSubmenuCommand	(UINT uiCmdMsg);

// parent
//ANNECY Shaitan EmptySectors 25/02/98
//	EDT_SuperObject * GetDefaultParentFromPos	(tdstPosition *p_stPosition, tdeTypeSO eTypeInsert);
//ENDANNECY Shaitan EmptySectors
	EDT_SuperObject * GetDefaultParentForPaste	(EDT_SuperObject *pEdObj);
	
// permissions
	BOOL fn_bCanBeParent	(EDT_SuperObject *pNewParent, CPA_List<CPA_SuperObject> *pChilds);
	BOOL fn_bCanBeParent	(EDT_SuperObject *pNewParent, EDT_SuperObject *pChild);
	long fn_lCanMoveObjects	(CPA_List<CPA_SuperObject> *pObjectsToMove);

// type SO
	BOOL	fn_bCanChangeTypeSO		(EDT_SuperObject *pEdObj, tdeTypeSO eType);
	void    fn_vInitTypeSO			(EDT_SuperObject *pEdObj, EDT_SuperObject *pParent);

// load
	EDT_SuperObject * fn_pInitEditorMap		(HIE_tdxHandleToSuperObject hRoot);

/*===========================================================================
	Specific
=========================================================================*/

public:

	
//ANNECY Shaitan EmptySectors 25/02/98
//	void fn_vInitSectorsParameters (EDT_SuperObject *pSRoot);
//ENDANNECY Shaitan EmptySectors

// permissions
	BOOL fn_bCheckParentAndType (EDT_SuperObject *pEdObj, EDT_SuperObject *pParent);
	BOOL fn_bCheckSectorMove	(EDT_SuperObject *pEdObj, long *p_lNbBreak, BOOL bSelected);
//ANNECY Shaitan EmptySectors 25/02/98
	BOOL fn_bCheckSaveStatus (tdeSaveStatus eStatus, EDT_SuperObject *pParent);
//ENDANNECY Shaitan EmptySectors


// super-object type
	tdeTypeSO GetTypeFromFile	(CString csFileName);
	BOOL fn_bIsValidType		(tdeTypeSO eTypeSO);
};


#endif // __EDTSPEC_HPP__
#endif // ACTIVE_EDITOR

