// XmlMainDialog.h: interface for the CXmlProject class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(_XMLMAINDIALOG_H_)
#define _XMLMAINDIALOG_H_

#include "XmlBaseElement.h"
#include "XmlMainDialogTree.h"
#include "enums.h"
#include "cmString.h"

using namespace std;

class CXmlMainDialog: public CXmlBaseElement  
{
public:
	CXmlMainDialog();
	virtual ~CXmlMainDialog();

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

	void Clear();

	void SetIconFileName(const cmString& fileName);
	cmString GetIconFileName() const;

	void SetInitialSize(enMainDlgSize initialSize);
	enMainDlgSize GetInitialSize() const;

	void SetCaption(const cmString& caption);
	cmString GetCaption() const;

	void SetSplitterPos(int splitterPos);
	int GetSplitterPos() const;
	
	CXmlMainDialogTree* GetTreeSettings();

	void SetDefaults();

	static cmString GetXmlNodeName() {return _T("MainDialog");}

protected:
	
	enMainDlgSize initialSize_;
	cmString caption_;
	cmString iconFileName_;
	int splitterPos_;
	CXmlMainDialogTree treeSettings_;
};

#endif // !defined(_XMLMAINDIALOG_H_)