// aplTreeApprovalItem.h

#include "aplTreeItem.h"

class CaplAutorizationManager;

class CaplApprovalTreeItem: public CaplTreeItem
{
        //Attributes
public:
	virtual BOOL ShowToolBarButton(CCmdUI* pCmdUI);
	CaplInstance *m_appr;

	static	bool m_ShowStatus;
	static	bool m_ShowPesonRole;
	static	bool m_ShowPerson;

	static bool m_ShowOrgId;
	static bool m_ShowOrgName;

	static bool m_AutoFrezeApproval;
    
	CaplApprovalTreeItem(CTreeCtrl *tree=0, CPSMDoc *doc=0,
		CaplInstance *appr=0);
	~CaplApprovalTreeItem(){RemoveFromParenContents(m_appr);}

    bool GetName(CString &name);
    bool RefreshItem();
    bool TrackPopupMenu(CWnd *wnd, CPoint &point, UINT view_mode= APLICM_NORMALE);
    bool CreateTreeItem(HTREEITEM parent_item);
	void ShowProperties();
	void GetAccessedInstances(aplExtent &ext);
	bool ShowInListCtrl(CListCtrl *list);
	void ShowCmd(long cmd);
};
