#if !defined(_CATEGORYFIELDEDITORDLG_H_)
#define _CATEGORYFIELDEDITORDLG_H_

// categoryfieldeditordlg.h : header file
//
#include "resource.h"
#include "CfgEdit.h"

class CXmlClassInfo;
class CXmlGuiCategoryField;
class CXmlGuiCategoryInfoList;

/////////////////////////////////////////////////////////////////////////////
// CCategoryFieldEditorDlg dialog

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

// Dialog Data
	//{{AFX_DATA(CCategoryFieldEditorDlg)
	enum { IDD = IDD_CATEGORY_FIELD };
	CStatic	lblDescription_;
	CEdit	txtCategory_;
	CStatic	lblRelated_;
	CStatic	lblCaption_;
	CButton	cmdOk_;
	CButton	cmdCancel_;
	CCfgEdit txtDescription_;
	CCfgEdit	txtCaption_;
	CStatic	lblCategoryName_;
	CComboBox	cboRelatedClassMember_;
	//}}AFX_DATA

public:
	void Init(CXmlClassInfo* classInfo, 
			  CXmlGuiCategoryField* categoryField,
			  CXmlGuiCategoryInfoList* categoryList,
			  const cmString& categoryName);
	
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCategoryFieldEditorDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnOK();
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CCategoryFieldEditorDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSelChangeField();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP();

	void UpdateWindowSize();

	bool initialized_;

	CXmlGuiCategoryField* categoryField_;
	CXmlClassInfo* classInfo_;
	CXmlGuiCategoryInfoList* categoryList_;
	cmString categoryName_;
	bool editMode_;
};

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

#endif // !defined(_CATEGORYFIELDEDITORDLG_H_)
