// aplOrganizationTreeItem.h: interface for the CaplOrganizationTreeItem class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_APLORGANIZATIONTREEITEM_H__76632A00_17F1_43B1_B11F_9A32155E6E78__INCLUDED_)
#define AFX_APLORGANIZATIONTREEITEM_H__76632A00_17F1_43B1_B11F_9A32155E6E78__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "aplTreeItem.h"
#include "StepData.h"	// Added by ClassView
#include "aplValue.h"	// Added by ClassView

class CaplOrganizationTreeItem : public CaplTreeItem  
{
public:
	CaplOrganizationTreeItem(CTreeCtrl *tree, CPSMDoc *pDoc, CaplInstance *inst=0);
	virtual ~CaplOrganizationTreeItem();
	
	virtual bool RefreshItem();
	virtual void ShowProperties();
	virtual bool TrackPopupMenu(CWnd *wnd, CPoint &point, UINT view_mode= APLICM_NORMALE);
//	void CreateCharacteristic(CaplInstance *val=0);
	aplExtent m_organization;
	aplExtent m_person;
	virtual void ShowCmd(long cmd);
	virtual BOOL ShowToolBarButton(CCmdUI* pCmdUI);
	virtual void GetAccessedInstances(aplExtent &ext);
	virtual bool PasteItem(CaplTreeItem *item, CPoint *point=0);
	bool PasteFile(LPCTSTR file, CPoint *point);
	virtual bool ShowInListCtrl(CListCtrl *list);
	virtual bool Expand(UINT action);
	virtual bool CreateTreeItem(HTREEITEM parent_item);
	virtual bool GetName(CString &name);
	
	CaplInstance *m_org_rel;
	CaplInstance *m_inst;
	CaplInstance *m_classifier;
	CaplInstance *m_used_inst_rel;
	aplExtent m_all_prd_instances;
	aplExtent m_all_parents;
	
	void ShowAllPrdInst();
	void ShowAllParentOrgs();

	CaplInstance *m_folder;
};

#endif // !defined(AFX_APLORGANIZATIONTREEITEM_H__76632A00_17F1_43B1_B11F_9A32155E6E78__INCLUDED_)
