/*=========================================================================
* 
* SECdRep.cpp :  Replace dialog - Implementation file
* 
*
* Version			1.0
* Creation date		16/08/97	
* Revision date		18/08/97
*
* Shaitan
*=======================================================================*/
/*
#include "stdafx.h"
#include "acp_base.h"

#include "SECdRep.hpp"

#include "SECTint.hpp"
#include "SECmodif.hpp"

#include "..\Main\Inc\_EditID.h"
#include "TUT.h"
*/

//#################################################################################
// SECT_DialogReplace dialog
//#################################################################################

/*----------------------------------------
----------------------------------------*/
/*
SECT_DialogReplace::SECT_DialogReplace(CWnd* pParent)
	: CDialog(SECT_DialogReplace::IDD, pParent)
{
	// init editor
	m_pSectorInterface = NULL;
}
*/

/*----------------------------------------
----------------------------------------*/
/*
void SECT_DialogReplace::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(SECT_DialogReplace)
	DDX_Control(pDX, SECT_IDC_CINITENV, m_cInitEnv);
	DDX_Control(pDX, SECT_IDC_CNEWENV, m_cNewEnv);
	DDX_Control(pDX, SECT_IDC_CURRENT, m_cEdit);
	DDX_Control(pDX, SECT_IDC_SELECT, m_cSelect);
	DDX_Control(pDX, SECT_IDC_ALL, m_cAll);
	//}}AFX_DATA_MAP
}
*/

/*----------------------------------------
----------------------------------------*/
/*
BEGIN_MESSAGE_MAP(SECT_DialogReplace, CDialog)
	//{{AFX_MSG_MAP(SECT_DialogReplace)
	ON_WM_DESTROY()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
*/

//#################################################################################
// SECT_DialogReplace message handlers
//#################################################################################

/*----------------------------------------
----------------------------------------*/
/*
BOOL SECT_DialogReplace::OnInitDialog (void) 
{
	CPA_BaseObjectList			*pListObjects;
	CPA_BaseObject				*pObject;
	Position					pos;
	int							iIndex;

	CDialog::OnInitDialog();

// FOR TUTORIAL
	TUT_M_vGetTutDll();

	TUT_M_vRegisterControl(m_cInitEnv.m_hWnd,	"OSC_DREP_COMBO_OLDENV",		TUT_e_ComboBox);
	TUT_M_vRegisterControl(m_cNewEnv.m_hWnd,	"OSC_DREP_COMBO_NEWENV",		TUT_e_ComboBox);
    TUT_M_vRegisterControl(m_cEdit.m_hWnd,		"OSC_DREP_BUTTON_EDITED",		TUT_e_Button);
    TUT_M_vRegisterControl(m_cSelect.m_hWnd,	"OSC_DREP_BUTTON_SELECTED",		TUT_e_Button);
    TUT_M_vRegisterControl(m_cAll.m_hWnd,		"OSC_DREP_BUTTON_ALLSECTORS",	TUT_e_Button);
// END TUTORIAL

	// RAZ
	m_cInitEnv.ResetContent();
	m_cNewEnv.ResetContent();
	
	// init combos
	pListObjects = m_pSectorInterface->GetBaseObjectList(C_szEnvironmentTypeName);
	for (pObject = pListObjects->GetHeadElement(pos); pObject;
		 pObject = pListObjects->GetNextElement(pos))
	{
		// initial environment
		iIndex = m_cInitEnv.AddString(pObject->GetNameToDraw());
		m_cInitEnv.SetItemData(iIndex, (DWORD) pObject);
		// new environment
		iIndex = m_cNewEnv.AddString(pObject->GetNameToDraw());
		m_cNewEnv.SetItemData(iIndex, (DWORD) pObject);
	}

	// init radio buttons
	m_cEdit.SetCheck(TRUE);
	m_cSelect.SetCheck(FALSE);
	m_cAll.SetCheck(FALSE);

	return TRUE;  
}
*/

/*----------------------------------------
----------------------------------------*/
/*
void SECT_DialogReplace::OnOK (void)
{
	SECT_ModifReplaceEnvironment *pModif;
	CPA_List<CPA_SuperObject>	 oListSectors;
	CPA_List<CPA_SuperObject>	 *pListSectors;
	SECT_Environment			 *pInitEnv, *pNewEnv;
	int							 iIndex;
	
	// init sector list
	oListSectors.RemoveAll();
	oListSectors.AddTail(m_pSectorInterface->GetEditedSector());

	// get initial environment
	iIndex = m_cInitEnv.GetCurSel();
	pInitEnv = (iIndex != -1) ? (SECT_Environment *) m_cInitEnv.GetItemData(iIndex) : NULL;
	// get final environment
	iIndex = m_cNewEnv.GetCurSel();
	pNewEnv = (iIndex != -1) ? (SECT_Environment *) m_cNewEnv.GetItemData(iIndex) : NULL;
	// no replace => can't close dialog
	if ((!pInitEnv)||(!pNewEnv)||(pInitEnv == pNewEnv))
		return;
	// get sector list
	if (m_cEdit.GetCheck())
		pListSectors = &oListSectors;
	else if (m_cSelect.GetCheck())
		pListSectors = m_pSectorInterface->GetSelectList();
	else
		pListSectors = NULL;

	// ask for modif
	pModif = new SECT_ModifReplaceEnvironment(m_pSectorInterface, E_tm_Replace, pInitEnv, pNewEnv, pListSectors);
	m_pSectorInterface->M_GetEditManager()->AskFor(pModif);

	CDialog::OnOK();
}
*/

/*----------------------------------------
----------------------------------------*/
/*
void SECT_DialogReplace::fn_vInitSectorInterface (Sector_Interface *pInterface)
{
	m_pSectorInterface = pInterface;
}
*/

/*----------------------------------------
----------------------------------------*/
/*
void SECT_DialogReplace::OnDestroy (void)
{
// FOR TUTORIAL
	TUT_M_vGetTutDll();

	TUT_M_vUnregisterControl(m_cInitEnv.m_hWnd);
	TUT_M_vUnregisterControl(m_cNewEnv.m_hWnd);
    TUT_M_vUnregisterControl(m_cEdit.m_hWnd);
    TUT_M_vUnregisterControl(m_cSelect.m_hWnd);
    TUT_M_vUnregisterControl(m_cAll.m_hWnd);
// END TUTORIAL

	CDialog::OnDestroy();
}
*/