#if !defined(_CLASSINFODLG_GLOBAL_H_)
#define _CLASSINFODLG_GLOBAL_H_

#include "resource.h"
#include "PropertyEditorDlg.h"
#include <string>
#include "CfgEdit.h"
#include "CfgItemName.h"

using namespace std;

class CXmlClassInfo;

// ClassInfoDlg_Global.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CClassInfoDlg_Global dialog

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

// Dialog Data
	//{{AFX_DATA(CClassInfoDlg_Global)
	enum { IDD = IDD_CLASSINFO_GENERAL };
	CButton	chkInherit_;
	CComboBox	cboClassList_;
	CCfgEdit	txtClassDescription_;
	CCfgEdit	txtClassCaption_;
	CCfgItemName	txtClassName_;
	CCfgEdit	txtContainerCaption_;
	//}}AFX_DATA
	
public:
	virtual void SetData(CXmlBaseElement* element);
	virtual void StoreData();
	void OnDataUpdate();

	void SetClassName(const wstring& name);

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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CClassInfoDlg_Global)
	virtual BOOL OnInitDialog();
	afx_msg void OnKillFocusTxtClassname();
	afx_msg void OnSelChangeCboClassList();
	afx_msg void OnChkInherit();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP();

	void UpdateControls();
	void UpdateWindowSize();

	CXmlClassInfo* classInfo_;
	CBrush bkBrush_;
	bool initialized_;
};

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

#endif // !defined(_CLASSINFODLG_GLOBAL_H_)
