/////////////////////////////////////////////////////////////////////////////
// CTL_DialogArrayDataEdition dialog
/////////////////////////////////////////////////////////////////////////////
#ifndef _ED_ACTORS_DIALOG_ARRAY_DATA_EDITION_
#define _ED_ACTORS_DIALOG_ARRAY_DATA_EDITION_

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

#include "CTL_Res.h"
#include <afxtempl.h>

#include "Controls\Ctl_LCtl.hpp"
#include "Data\Ctl_LDat.hpp"

class CTL_Editor_ArrayControl;
class CTL_Editor_BaseFormView;

/////////////////////////////////////////////////////////////////////////////
// CTL_DialogArrayDataEdition dialog

class CTL_DialogArrayDataEdition : public CDialog
{
// Construction
public:
	// standard constructor
	CTL_DialogArrayDataEdition(	CTL_Editor_ArrayControl *_pclParentControl,
								CWnd* _pParent = NULL);  
	
	~CTL_DialogArrayDataEdition();

	void m_fn_vUpdateColors ();
	
	void m_fn_vSetSelectedControl (CTL_Editor_Control *pclCtrl) {m_pclSelectedControl = pclCtrl;};

// Dialog Data
	//{{AFX_DATA(CTL_DialogArrayDataEdition)
	enum { IDD = IDD_CAR_D_EDIT_ARRAY_DATA };
	CString m_csDataName;
	//}}AFX_DATA

private:
//functions
	void m_fn_vCleanup (void) {}; // the lists are cleaned by themselves :-)

	void m_fn_vCreateElementControl (tdstArray *pstArray, int i);

	int m_fn_lGetIndexOfControl (CTL_Editor_Control *pclSeekCtrl);

	void m_fn_vResize ();
	void m_fn_vUpdateView ();
	
//members
	HINSTANCE hOldInstance;

	CTL_Editor_ArrayControl *m_pclParentControl;

	CTL_Editor_ControlList m_clControlList;
	CTL_Editor_DataList m_clDataList;

	CFrameWnd *m_pclFrameControl;
	CTL_Editor_BaseFormView *m_pclView;

	tdstArray m_stSavedArray;

	CTL_Editor_Control *m_pclSelectedControl;

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


protected:

	// Generated message map functions
	//{{AFX_MSG(CTL_DialogArrayDataEdition)
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	virtual void OnOK();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnButtonInsert();
	afx_msg void OnButtonDelete();
	afx_msg void OnButtonUp();
	afx_msg void OnButtonDown();
	//}}AFX_MSG
	
	DECLARE_MESSAGE_MAP()
};


#endif // _ED_ACTORS_DIALOG_ARRAY_DATA_EDITION_
