// MemberInfoDlg_Validation.h : header file
//
#if !defined(_MEMBERINFODLG_VALIDATION_H_)
#define _MEMBERINFODLG_VALIDATION_H_

#include "PropertyEditorDlg.h"
#include "CfgComboBox.h"
#include "enums.h"
#include "cmString.h"

class CXmlMemberInfo;
class CXmlBaseElement;

class CMemberInfoDlg_ValidationInterval;
class CMemberInfoDlg_ValidationStaticEnum;
class CMemberInfoDlg_ValidationDynamicEnum;

/////////////////////////////////////////////////////////////////////////////
// CMemberInfoDlg_Validation dialog

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

// Dialog Data
	//{{AFX_DATA(CMemberInfoDlg_Validation)
	enum { IDD = IDD_MEMBERINFO_VALIDATION };
	CCfgComboBox	cboValidationMode_;
	//}}AFX_DATA

public:	
	void StoreData();
	void SetData(CXmlBaseElement* element);
	void OnDataUpdate();

	void OnOK(){};
	void OnCancel(){};

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMemberInfoDlg_Validation)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CMemberInfoDlg_Validation)
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangeCboValidationMode();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP();

	void DrawBackground(CDC* pDC);
	void DrawTipRect(CDC* pDC);
	void UpdateWindowSize();

	CXmlMemberInfo* memberInfo_;
	enDataType dataType_;

	CMemberInfoDlg_ValidationInterval* intervalDlg_;
	CMemberInfoDlg_ValidationStaticEnum* staticEnumDlg_;
	CMemberInfoDlg_ValidationDynamicEnum* dynamicEnumDlg_;

	CWnd* selDialog_;
	bool initialized_;
	
	bool showTipRect_;
	cmString tipText_;
	
};

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

#endif // !defined(_MEMBERINFODLG_VALIDATION_H_)
