// aplBPInstTreeItem.h: interface for the CaplBPInstTreeItem class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_APLBPINSTTREEITEM_H__7C846D55_34E8_4368_A938_C600AA75EAAE__INCLUDED_)
#define AFX_APLBPINSTTREEITEM_H__7C846D55_34E8_4368_A938_C600AA75EAAE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "aplTreeItem.h"

class CaplBPInstTreeItem : public CaplTreeItem  
{
public:
	CaplInstance *m_inst;
	CaplInstance *m_folder;
	CaplInstance *m_classifier;
	CaplInstance *m_rel;
	CaplInstance *m_par_bp_inst;
	CaplInstance *m_subitem;
	CaplInstance *m_project;
	aplExtent m_all_items;
	aplExtent m_all_res;
	int m_index;
	aplExtent m_sub_bps;
	aplExtent m_parent_bps;

	CaplBPInstTreeItem(CTreeCtrl *tree, CPSMDoc *doc,CaplInstance *inst);
	virtual ~CaplBPInstTreeItem();
    bool CreateTreeItem(HTREEITEM parent_item); 
	bool GetName(CString &name);
    bool RefreshItem();
	bool TrackPopupMenu(CWnd *wnd, CPoint &point, UINT view_mode= APLICM_NORMALE);
	bool Expand(UINT action);
	void ShowProperties();
	bool PasteItem(CaplTreeItem *item, CPoint *point);
	bool PasteFile(LPCTSTR file, CPoint *point);
	void RemoveRelation();

	bool ShowInListCtrl(CListCtrl *list);
 	void GetAccessedInstances(aplExtent &ext);

	void CreateBPInst();
	void CreateBPResource();
	//void CreateCharacteristic(CaplInstance *val=0);
	//void CreateCharacteristicGroup(CaplInstance *group=0);
	void ShowCmd(long cmd);
	BOOL ShowToolBarButton(CCmdUI* pCmdUI);
	void ShowAllBaseObjects();
	void ShowAllResources(bool showMsg = true);
};

#endif // !defined(AFX_APLBPINSTTREEITEM_H__7C846D55_34E8_4368_A938_C600AA75EAAE__INCLUDED_)
