// CPACMNDg.hpp : header file
/////////////////////////////////////////////////////////////////////////////
#ifndef _CPACMCDG_HPP_
#define _CPACMCDG_HPP_

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

#include "EdAcIRes.h"

//For Families
class CPA_Family;

/////////////////////////////////////////////////////////////////////////////
// EdActors_ModelCreationDialog dialog

class EdActors_ModelCreationDialog : public CDialog
{
// Construction
public:		
	// standard constructor
	EdActors_ModelCreationDialog(CWnd* pParent = NULL);   

 	//Destructor
	~EdActors_ModelCreationDialog();

// Dialog Data
	//{{AFX_DATA(EdActors_ModelCreationDialog)
	enum { IDD = IDD_CAR_D_MODEL_CREATION };
	CString	m_csNewModelName;
	BOOL	m_bQuickView;
	int		m_iFilterChoice;
	BOOL	m_bIsAGenDoor;
	CString	m_csStartWith;
	CString	m_csContaining;
	//}}AFX_DATA

private:
	HINSTANCE hOldInstance;

	//Background color
	COLORREF m_colrefBackGroundColor;

	//The current list of Families
//	CPA_List<CPA_BaseObject> m_clFamilyList;
	CPA_BaseObjectList *m_pclFamilyList;

	//Bitmap
	struct m_stBitmapDescription
	{
		CString csFileName;
		HBITMAP hBitmap;
		CSize csSize;
		BOOL bLoaded;
	};

	CPA_List<struct m_stBitmapDescription> m_clListOfBitmapsForActors;
	CPA_List<struct m_stBitmapDescription> m_clListOfBitmapsForGenDoors;

	HBITMAP m_hBitmap;
	HBITMAP m_hNoBitmap;
	CSize m_csBitmapSize;
	CBitmap m_clBitmapNoImage;

	//Families
	struct m_stFamilyDescription
	{
		CPA_Family *pclFamily;
		BOOL bIsAGenDoorFamily;
	};

	CPA_List<struct m_stFamilyDescription> m_clListOfFamilies;

	CPA_Family *m_pclSelectedFamily;
	CPA_SuperObject *m_pclCreatedModel;

	CString m_csBitmapName;

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

// Implementation
public:
	CPA_SuperObject *m_fn_pclGetNewModel();
	CString m_fn_csGetBitmapName();

protected:

	// Generated message map functions
	//{{AFX_MSG(EdActors_ModelCreationDialog)
	virtual void OnOK();
	virtual BOOL OnInitDialog();
	afx_msg void OnDblclkListFamilies();
	afx_msg void OnSelchangeListFamilies();
	afx_msg void OnSelchangeListBitmaps();
	afx_msg void OnRadioAllFamilies();
	afx_msg void OnRadioLoadedFamilies();
	afx_msg void OnRadioUnloadedFamilies();
	afx_msg void OnDrawItem( int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct );
	afx_msg void OnCheckGenDoor();
	afx_msg void OnChangeEditContaining();
	afx_msg void OnChangeEditStartWith();
	afx_msg void OnCheckAspect();
	afx_msg void OnDestroy();
	//}}AFX_MSG

private:
	BOOL m_pri_fn_bIsAGenDoorFamily(CPA_Family *_pclFamily);
	BOOL m_fn_bGetBitmapSize(CString csFileName, CSize *sz);
	void m_fn_vDisplayFilteredFamilies();
	void m_fn_vFillListBoxWithBitmapNames(CPA_List<struct m_stBitmapDescription> *);

	DECLARE_MESSAGE_MAP()
};

#endif //_CPACMCDG_HPP_

