// act_res_treeitem.h

#include "aplTreeItem.h"

class CaplBPResourceTreeItem: public CaplTreeItem
{
        //Attributes
public:
	CaplInstance *m_inst;
	CaplInstance *m_bp_rev;
	CaplInstance *m_lot;
	aplExtent m_all_items;

	CaplTreeItem *m_my_prd_item;

	CaplBPResourceTreeItem(CTreeCtrl *tree=0, CPSMDoc *doc=0,
		CaplInstance *inst=0);
	~CaplBPResourceTreeItem(){RemoveFromParenContents(m_inst);}

    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);

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

	//void CreateCharacteristic(CaplInstance *val=0);
	//void CreateCharacteristicGroup(CaplInstance *group=0);
	void ShowCmd(long cmd);
	BOOL ShowToolBarButton(CCmdUI* pCmdUI);
};