// CXmlFormItem_ComboBox.h
//

#if !defined(_CXMLFORMITEM_COMBOBOX_H_)
#define _CXMLFORMITEM_COMBOBOX_H_

#include "stdafx.h"
#include "XmlBaseFormItem.h"
#include <vector>

using namespace std;

class CXmlFormItem_ComboBox: public CXmlBaseFormItem
{
public:
	CXmlFormItem_ComboBox();
	virtual ~CXmlFormItem_ComboBox();

// implementation of CXmlSerializable
//
public:
	virtual bool BuildFromXml(IXMLDOMNode* node);
	virtual bool AppendToDOMDocument(IXMLDOMDocument2* xmlDoc, IXMLDOMElement* parentElement);

public:
	virtual void SetValueList(const vector<cmString>& valueList);
	virtual void SetValueList(const cmString& valueList);
	virtual vector<cmString>* GetValueList();

	virtual void SetSorted(bool sorted);
	virtual bool GetSorted();

	virtual enFormItemType GetItemType();
	
	virtual cmString GetXmlNodeName(){return _T("FormItemComboBox");}

protected:
	
	virtual void Clear();
	virtual void SetDefaults();

	vector<cmString> valueList_;
	bool sorted_;
};

#endif //!defined(_CXMLFORMITEM_COMBOBOX_H_)