#if !defined(AFX_WFSELTEMPLATESTREE_H__8D89D27A_E2FF_42CD_85D3_D71692F2C703__INCLUDED_)
#define AFX_WFSELTEMPLATESTREE_H__8D89D27A_E2FF_42CD_85D3_D71692F2C703__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// WfSelTemplatesTree.h : header file
//
#include <apl_api.h>

class CaplTreeItemData;
class CaplWFTemplateView;
class CSelectProcessTemplDlg;
/////////////////////////////////////////////////////////////////////////////
// CWfSelTemplatesTree view

class CWfSelTemplatesTree : public CaplTreeView
{
protected:
	CWfSelTemplatesTree();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CWfSelTemplatesTree)

// Attributes
public:
	bool m_bEditorMode;
	
	CaplAPI *m_api;
	CaplWorkFlowManager *m_wf_mgr;

	CaplWFTemplateView *m_graph_view;

	CSelectProcessTemplDlg *m_parent_select_dlg;

	aplExtent m_templates;
	CaplInstance *m_sel_template;

	CaplTAggr <CaplTreeItemData*,CaplTreeItemData*,APLAGGR_LIST|APLAGGR_AUTOKILLREF> m_items;

// Operations
public:

	bool UpdateTemplates();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CWfSelTemplatesTree)
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CWfSelTemplatesTree();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(CWfSelTemplatesTree)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnItemexpanding(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSelchanged(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_WFSELTEMPLATESTREE_H__8D89D27A_E2FF_42CD_85D3_D71692F2C703__INCLUDED_)
