#ifndef _APL_ACTIVITY_TREE_ITEM_H_
#define _APL_ACTIVITY_TREE_ITEM_H_

#include "aplTreeItem.h"
 
class CaplActivityTreeItem: public CaplTreeItem
{
public:
	CaplActivityTreeItem(CTreeCtrl *tree= 0, CPSMDoc *doc= 0, CaplInstance* inst= 0);
	~CaplActivityTreeItem(){RemoveFromParenContents(m_activity);}
    bool GetName(CString &name);
    bool RefreshItem();
    bool CreateTreeItem(HTREEITEM parent_item);
	bool Expand(UINT action);
	void ShowProperties();
	bool ShowInListCtrl(CListCtrl *list);
	void ShowCmd(long cmd);
	//void ShowToolBarButton(CToolBarCtrl *tb);
	BOOL ShowToolBarButton(CCmdUI* pCmdUI);
    bool TrackPopupMenu(CWnd *wnd, CPoint &point, UINT view_mode= APLICM_NORMALE);
	void GetAccessedInstances(aplExtent &ext);
	
public:
	void ShowHistory();
	void ShowSupProcessTmpl();
	CaplInstance* m_activity;
	aplExtent m_task_history_items;
	aplExtent m_sub_proc_tmpl_items;
};

#endif //_APL_ACTIVITY_TREE_ITEM_H_