// CallBacks
//
// YB
///////////////////////
#include "StdAfx.h"

#include "EMECClBk.hpp"

#include "EMECCStr.hpp"
#include "_MECCard.hpp"

//************************************************************************************
BOOL TME_fn_bControlCanBeDisplayedCallBack(CTL_Editor_Control *_pclSenderControl)
{
	return TRUE;
}

//************************************************************************************
void TME_fn_vCallBackWhenADataHasChanged(CTL_Editor_Data *_pclChangedData,
																				 CTL_tdeUpdateReason _eReason,
																				 long _lUserDefinedReason /*/ 0*/)
{
	if ( _eReason == CTL_UPDATE_REASON__DATA_MODIFIED_BY_USER )
	{
		//Gets Parent Card
		CTL_OwnerData *pclOwnerData = _pclChangedData->m_pub_fn_pclGetOwnerDataWithName(TME_g_c_cs_DataOwnerData_ParentCard);
		if ( pclOwnerData != NULL )
		{
			CPA_Meca_Card *pclParentCard = (CPA_Meca_Card *)pclOwnerData->m_pub_fn_pvGetDataPtr();

			pclParentCard->fn_vNotifySave();
		}
	}
}

