//
//	Copyright © 2007 Nemetschek North America 
//	All Rights Reserved.
//
// Created by Vladislav Stanev

#pragma once

#include "Control.h"

namespace VectorWorks
{
	namespace VWUI
	{
		class VWTreeCtrl;
		// ---------------------------------------------------------------------------------------------------------------
		class VWTreeCtrlItem
		{
			friend class VWTreeCtrl;
		protected:
							VWTreeCtrlItem();
							VWTreeCtrlItem(TControlID dialogID, TControlID controlID, int itemID);

		public:
							VWTreeCtrlItem(const VWTreeCtrlItem& src);
			virtual			~VWTreeCtrlItem();

			VWTreeCtrlItem&	operator=(const VWTreeCtrlItem& src);

		public:
//			size_t			GetChildItemsCount() const;
//			VWTreeCtrlItem	GetChildItemAt(size_t index) const;
			
			VWTreeCtrlItem	AddChildItem(const TXString& text);
			VWTreeCtrlItem	InsertChildItem(const TXString& text, VWTreeCtrlItem afterItem = VWTreeCtrlItem());
			void			DeleteItem();

//			VWTreeCtrlItem	GetParentItem();
//			VWTreeCtrlItem	GetNextSiblingItem();
//			VWTreeCtrlItem	GetPrevSiblingItem();

		public:
			bool			IsValid() const;

			void			ExpandItem(bool bExpand);
			void			SelectItem();
			void			SetItemData(long data);
			long			GetItemData() const;

		private:
			TControlID			fDialogID;
			TControlID			fControlID;
			int					fThisItemID;
		};
	}
}