// MainDialogSettings.h : header file
//
#if !defined(_MAINDIALOGSETTINGS_H_)
#define _MAINDIALOGSETTINGS_H_

#include <vector>
#include "BaseDialog.h"
#include "CfgComboBox.h"
#include "CfgEdit.h"
#include "FCool.h"
#include "cmString.h"
#include "EnTabCtrl.h"
#include "MainDialogSettings_General.h"
#include "MainDialogSettings_Tree.h"

using namespace std;

/////////////////////////////////////////////////////////////////////////////
// CMainDialogSettings dialog

class CXmlMainDialog;
class CXmlProject;
class CPropertyEditorDlg;


class CMainDialogSettings : public CBaseDialog
{
// Construction
public:
	CMainDialogSettings(CWnd* pParent = NULL);   // standard constructor
	~CMainDialogSettings();

	void SetMainDialogSettings(CXmlMainDialog* mainDialogSettings);
	void SetProject(CXmlProject* project);

// Dialog Data
	//{{AFX_DATA(CMainDialogSettings)
	enum { IDD = IDD_MAIN_DIALOG_SETTINGS };
	CButton	btnOk_;
	CButton	btnCancel_;
	//}}AFX_DATA

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

// Implementation
protected:
	
	void DrawBackground(CDC* pDC);

	// Generated message map functions
	//{{AFX_MSG(CMainDialogSettings)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg void OnSelchangeTabProperties(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP();

	
	void UpdateWindowSize();
	void UpdateSelChild();

	CXmlMainDialog* mainDialogSettings_;
	cmString lastIconDir_;
	CImageList imageList_;
	vector<CPropertyEditorDlg*> propertyEditors_;
	CPropertyEditorDlg* lastSelChild_;

	CEnTabCtrl tab_;
	CFont font_;
	CXmlProject* project_;
	bool initialized_;

	CMainDialogSettings_General generalDlg_;
	CMainDialogSettings_Tree treeDlg_;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(_MAINDIALOGSETTINGS_H_)
