// XmlMainDialogTree.h: interface for the CXmlMainDialogTree class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(_XMLMAINDIALOGTREE_H_)
#define _XMLMAINDIALOGTREE_H_

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

using namespace std;

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

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

	void Clear();
	
	void SetDefaults();

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

	void SetHideRootNode(bool hide);
	bool GetHideRootNode() const;

	void SetSingleNodeExpand(bool expand);
	bool GetSingleNodeExpand() const;

	void SetHasButtons(bool hasButtons);
	bool GetHasButtons() const;

	void SetHasLines(bool hasLines);
	bool GetHasLines() const;

	void SetFullRowSelect(bool select);
	bool GetFullRowSelect() const;

	void SetShowSelectionAlways(bool showSelection);
	bool GetShowSelectionAlways() const;

	void SetLinesAtRoot(bool value);
	bool GetLinesAtRoot() const;

	void SetIndent(int indent);
	int GetIndent() const;

protected:
	bool hideRootNode_;
	bool singleNodeExpand_;
	bool hasButtons_;
	bool hasLines_;
	bool fullRowSelect_;
	bool showSelectionAlways_;
	bool linesAtRoot_;
	int indent_;
};

#endif // !defined(_XMLMAINDIALOGTREE_H_)