#ifndef _APL_PROCESS_TMPL_TREE_ITEM_H_
#define _APL_PROCESS_TMPL_TREE_ITEM_H_

#include "aplTreeItem.h"
 
class CaplProcessTmplTreeItem: public CaplTreeItem
{
public:
	CaplProcessTmplTreeItem(CTreeCtrl *tree= 0, CPSMDoc *doc= 0, CaplInstance* inst= 0);
    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);

	bool PasteItem(CaplTreeItem *item, CPoint *point);
	
public:
	void CreateWfProcess();
	void ShowHistory();
	void ShowActivityList();
	CaplInstance* m_proc_tmpl;
	CaplInstance* m_folder;
	aplExtent m_activity_items;
	aplExtent m_proc_tmpl_history_items;
};

#endif //_APL_PROCESS_TMPL_TREE_ITEM_H_