// classinfodlg_cardinality.h : header file
//
#if !defined(_CLASSINFODLG_CARDINALITY_H_)
#define _CLASSINFODLG_CARDINALITY_H_

#include "enums.h"
#include "AmsEdit.h"
#include "resource.h"
#include "PropertyEditorDlg.h"

class CXmlClassInfo;

/////////////////////////////////////////////////////////////////////////////
// CClassInfoDlg_Cardinality dialog

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

// Dialog Data
	//{{AFX_DATA(CClassInfoDlg_Cardinality)
	enum { IDD = IDD_CLASSINFO_CARDINALITY };
	CAMSIntegerEdit	txtMapMinSize_;
	CAMSIntegerEdit	txtMapMaxSize_;
	CAMSIntegerEdit	txtArrayMinSize_;
	CAMSIntegerEdit	txtArrayMaxSize_;
	CStatic	lblMapSortKey_;
	CButton	chkMapMinSize_;
	CButton	chkMapMaxSize_;
	CButton	chkArrayMinSize_;
	CButton	chkArrayMaxSize_;
	CButton	chkDisplayToolbar_;
	CButton	chkCreateContainerNode_;
	CComboBox	cboMapSortKey_;
	//}}AFX_DATA

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

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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CClassInfoDlg_Cardinality)
	afx_msg void OnOptSingleInstance();
	afx_msg void OnOptArray();
	afx_msg void OnOptMap();
	afx_msg void OnChkArrayMaxSize();
	afx_msg void OnChkArrayMinSize();
	afx_msg void OnChkMapMaxSize();
	afx_msg void OnChkMapMinSize();
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP();

	void UpdateControls(enCardinality cardinality);
	void UpdateRadioButtons();

	enCardinality cardinality_;
	CXmlClassInfo* classInfo_;
};

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

#endif // !defined(_CLASSINFODLG_CARDINALITY_H_)
