/*=============================================================================
 *
 *  Filename:      CMatObj.hpp
 *  Version:            1.0
 *  Date:								06/11/96
 *  Author:             B.G.
 *
 *  Description:    editor material class
 *
 *===========================================================================*/

#ifndef __CMATOBJ_HPP__
#define __CMATOBJ_HPP__

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

#include <afxtempl.h>
#include <afxcview.h>

#include "Acp_base.h"
#include "itf.h"
#include "gmt.h"
#include "scr.h"
#include "dpt.h"
#include "x:\cpa\main\inc\_editid.h"


class tdoEditorCollideMaterial : public CPA_SaveObject
{
public:
	tdoEditorCollideMaterial(
		CPA_FileObject *_p_oOwnerFile,
		CString _csId,
		BOOL _bSectionAlreadyExists,
		GMT_tdxHandleToCollideMaterial _hTemplateCollideMaterial
	);
	~tdoEditorCollideMaterial();

	GMT_tdxHandleToCollideMaterial m_hGetEngineMaterial() { return m_hCollideMaterial; }
	static void m_vCallBackSaveCMT( // save the visual material section
		SCR_tdst_File_Description *_p_stFile,
		char *_p_szSectionName,
		void *_p_vData,
		SCR_tde_Ntfy_Action _eAction
	);
	void m_vAssociateEngineMaterial(GMT_tdxHandleToCollideMaterial _hCollideMaterial, BOOL _bSectionAlreadyExists);
	BOOL m_bIsReferenced();
	void m_vLoadAssociatedEngineMaterial();
	BOOL m_bGetHighlightColor(GEO_tdstColor *_p_stColor = NULL);
	void m_vSetHighlightColor(GEO_tdstColor _stColor);
	void m_vEnableHighlight(BOOL _bEnable = TRUE) { m_bIsHighlighted = _bEnable; }

	static SCR_tdst_Link_Table *m_p_stGetAssociatedLinkTable();
	static BOOL m_bIsEngineMaterialValid(GMT_tdxHandleToCollideMaterial _hCollideMaterial);
	//static CString m_csGetBaseDataPath();
	static void m_vInvalidateEngineMaterial(GMT_tdxHandleToCollideMaterial &r_hCollideMaterial);
	static CString m_csGetMaterialType();
	static CString m_csGetScriptExtension();

	//overloads from base class
	virtual void *GetData(void) { return m_hCollideMaterial; } 
  virtual long GetDataType(void) { return 0; };
  virtual tdeMissingCriteria fn_eCheckUnicity(const CString csNewName) { return fn_eCheckUnicityWithOwner(csNewName); }

	//virtual void fn_vNotify(SCR_tde_Ntfy_Action _eAction);
	//CString GetReferencedSectionName(void);
//ROMTEAM WorldEditor (Cristi Petrescu 11/12/97)
    WORD m_uwTypeOfZonesUsingMe (void);
//ENDROMTEAM WorldEditor (Cristi Petrescu)

private:
	GMT_tdxHandleToCollideMaterial m_hCollideMaterial;
	BOOL m_bIsHighlighted;
	GEO_tdstColor m_stHighlightColor;
};

#endif /* __CMATOBJ_HPP__ */
