/*
 =======================================================================================
  Name        : DlgFile.h
 
  Author      : vincent lhullier            Date :27/07/97
 
  Description : header file for dialog box to choose list of obtained file
 =======================================================================================
  Modification -> Author :                  Date :
  Description :
 =======================================================================================
 */

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __FILEDLG_H__
#define __FILEDLG_H__
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#include "MajData.h"
#include "resource.h"
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

/*
 =======================================================================================
	CDialogFileList dialog
 =======================================================================================
 */
class CDialogFileList : public CDialog
{
  //private data members
  private:
	CTreeCtrl			*m_p_oTree;
	tdstProject			*m_p_stProjectTree;
	tdstFileListConfig	*m_p_stConfig;
	char				*m_szRootProject;
	char				m_cConfigType;
	CImageList			m_oImageList;
	CImageList			m_oLegendImageList;
	HICON				m_a_hIcon[7];
	HICON				m_hIconKey;
	char				m_cConfig;

	int					m_iOldCx;
	int					m_iOldCy;

	BOOL				m_bLegend;
	BOOL				m_bExpand;

  // Construction
  public:
	CDialogFileList(CWnd* pParent = NULL);   // standard constructor
	~CDialogFileList();
	//void m_fn_vSetRootProject (tdstProject *_p_stRootProj) { m_p_oProjectTree = _p_stRootProj; }
	//void m_fn_vSetFileListConfig( tdstFileListConfig *_p_stConfig ) { m_p_ostConfig = _p_stConfig;}
	void m_fn_vSetConfigType( char _cConfigType );

  // Dialog Data
	//{{AFX_DATA(CDialogFileList)
	enum { IDD = IDD_DIALOG_FILELIST };
	//}}AFX_DATA

  // specific functions
  private:
	void	m_fn_vAddProjectContentInTree	( tdstProject *_p_stProj, BOOL _bGetCauseRecurse );
	void	m_fn_vChangeProjectImage		( tdstProject *_p_stProj, BOOL _bGetCauseRecurse );
	void	m_fn_vChangeProjectFilesImage	( tdstProject *_p_stProj );
	int		m_fn_iGetProjectImage			( tdstProject *_p_stProj );
	void	m_fn_vSetButton					( HTREEITEM hItem );

	void	m_fn_vChooseConfig				( void );
	void	m_fn_vExportConfig				( void );
	void	m_fn_vImportConfig				( void );

  // Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDialogFileList)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

  // Implementation
  protected:

	// Generated message map functions
	//{{AFX_MSG(CDialogFileList)
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangedTreeVss(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnCheckObtain();
	afx_msg void OnCheckRecurse();
	virtual void OnOK();
	afx_msg void OnButtonObtainall();
	afx_msg void OnButtonObtainnothing();
	afx_msg void OnButtonHelp();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnSizing( UINT nSide, LPRECT lpRect );
	afx_msg void OnDestroy();
	afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMIS);
	afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDIS);
	afx_msg void OnButtonLegend0();
	afx_msg void OnButtonLegend1();
	afx_msg void OnButtonLegend2();
	afx_msg void OnButtonLegend3();
	afx_msg void OnButtonLegend4();
	afx_msg void OnButtonLegend5();
	afx_msg void OnButtonLegend6();
	afx_msg void OnButtonLegend7();
	afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
	afx_msg void OnSelchangeTabLegend(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnCheckConfig();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#endif /*__FILEDLG_H__*/
