/*=========================================================================
* 
* SECdSel.hpp :  class SECT_DialogSel
* 
*
* Version			1.0
* Creation date		
* Revision date
*
* Shaitan
*=======================================================================*/
#ifndef __SECT_D_SEL_HPP__
#define __SECT_D_SEL_HPP__

#include "SECTres.h"

class Sector_Interface;
class SECT_DialogSel;

/*===========================================================================
*		Description:	Class for the SoundEventListBox
*		Creation date:	
*		Author:			Shaitan
*---------------------------------------------------------------------------
*		Revision date:                                                                                          Author:         
*=========================================================================*/
class SECT_SndEvListBox : public CPA_SortedListBox
{
protected:
	Sector_Interface	*m_pSectorInterface;
	SECT_DialogSel		*m_pDialogSel;

public:
	SECT_SndEvListBox();
	~SECT_SndEvListBox() { }

	void fn_vInitDialogParameters	(SECT_DialogSel *pDialogSel);
	BOOL fn_bIsInCurrentList		(CPA_SaveObject *pSoundEvent);

	void DrawItem (LPDRAWITEMSTRUCT lpDIS);
};


/*===========================================================================
*		Description:	Class for the Dialog
*		Creation date:	
*		Author:			Shaitan
*---------------------------------------------------------------------------
*		Revision date:                                                                                          Author:         
*=========================================================================*/

class SECT_DialogSel : public CFormView
{
// Construction
protected:
	Sector_Interface  *m_pSectorInterface;
	CPA_SuperObject	  *m_pSelectedSector;
	CPA_SuperObject	  *m_pEditedSector;
	char			  m_szName[256];
	BOOL			  m_bInitialised;

public:
// standard constructor
	SECT_DialogSel (CWnd* pParent = NULL);   

// get functions
	CPA_SuperObject		* GetEditedSector		(void) { return m_pEditedSector; }
	CPA_SuperObject		* GetSelectedSector		(void) { return m_pSelectedSector; }
	Sector_Interface	* GetSectorInterface	(void) { return m_pSectorInterface; }

// Dialog
	void fn_vInitDialog		 (Sector_Interface *p_oDLL, CWnd *pParent);
	void fn_vReinitDialog	 (CPA_SuperObject *pSector, CPA_SuperObject *pEditedSector);
	void fn_vInitControls	 (BOOL bEnable);

	void fn_vOnCheckList (CButton *pControl, tdeTypeList eType);
	void fn_vUpdateCheck (void);

	void fn_vInitSoundEventList		(void);
	void fn_vUpdateSoundEventList	(SECT_SoundEventElement *pSoundEvent);

protected:
	
// Dialog Data
	//{{AFX_DATA(SECT_DialogSel)
	enum { IDD = SEC_IDD_DIALOGSELECT };
	CButton				m_cSymetric;
	CComboBox			m_cComboSector;
	CButton				m_cVirtual;
	CButton				m_cGraphic;
	CSpinButtonCtrl		m_cGraphicSpin;
	CEdit				m_cGraphicLevel;
	CButton				m_cGraphicMode;
	CButton				m_cCollision;
	CButton				m_cActivity;
	CButton				m_cSound;
	CSpinButtonCtrl		m_cSoundSpin;
	CEdit				m_cSoundLevel;
	CButton				m_cSoundEvent;
	SECT_SndEvListBox	m_cSoundEventList;
	//}}AFX_DATA

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


// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(SECT_DialogSel)
	afx_msg void OnSelChangeComboSector();
	afx_msg void OnSymetric();
	afx_msg void OnGraphic();
	afx_msg void OnGraphicSpin(NMHDR * pNMHDR, LRESULT * pResult);
	afx_msg void OnGraphicMode();
	afx_msg void OnCollision();
	afx_msg void OnActivity();
	afx_msg void OnSound();
	afx_msg void OnSoundSpin(NMHDR * pNMHDR, LRESULT * pResult);
	afx_msg void OnSoundEvent();
	afx_msg void OnSelChangeSoundEventList(NMHDR * pNMHDR, LRESULT * pResult);
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
	afx_msg void OnSize(UINT, int, int);
	afx_msg void OnDestroy();	
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	BOOL OnCommand(WPARAM wParam, LPARAM lParam);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#endif //__SECT_D_SEL_HPP__
