#pragma once

#include "aplTreeItem.h"

class CaplRefusalTreeItem : public CaplTreeItem
{
public:
	CaplRefusalTreeItem(CTreeCtrl *tree=0, CPSMDoc *doc=0, CaplInstance *val=0, CaplInstance *folder=0);
	~CaplRefusalTreeItem(void);

	CaplInstance *m_refusal;
	CaplInstance *m_folder;;


	bool GetName(CString &name);
	bool RefreshItem();
	void ShowCmd(long cmd);
	//void ShowToolBarButton(CToolBarCtrl *tb);
	BOOL ShowToolBarButton(CCmdUI* pCmdUI);
	bool TrackPopupMenu(CWnd *wnd, CPoint &point, UINT view_mode= APLICM_NORMALE);
	bool CreateTreeItem(HTREEITEM parent_item);
	bool Expand(UINT action);
	void GetAccessedInstances(aplExtent &ext);
	void GetMainInstances(aplExtent &ext);

	bool PasteItem(CaplTreeItem *item, CPoint *point);

	bool ShowInListCtrl(CListCtrl *list);
	void ShowProperties();
};
