#if !defined(AFX_TREEDLG_H__8BD6F6DC_72A0_4A32_90E2_F33C43AA489F__INCLUDED_)
#define AFX_TREEDLG_H__8BD6F6DC_72A0_4A32_90E2_F33C43AA489F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TreeDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// TreeDlg dialog
typedef struct{
	HTREEITEM item;
	ShapeElement *pShape;
}TreeNode;//树节点与模型元素绑定结构

class TreeDlg : public CDialog
{
// Construction
public:
	void OpenSource();
	void AddActivityGraph(ShapeActivityGraph* sg ,HTREEITEM par);
	void AddClass(ShapeClass *pc , HTREEITEM par);
	void AddNamespace(ShapeNamespace* n , HTREEITEM par = NULL);
	CString TrunckEnter(CString str );
	void GenFromSynch(DecodeQueue &que ,ShapeActivityGraph*shapeAG ,ShapeActivity *shape );
	void GenFromControlFlow(DecodeQueue &que , ShapeActivityGraph *shapeCF ,ShapeControlFlow *shape);//生成控制流类
	void GenFromOperation(DecodeQueue& que , UMLOperation ope ,ShapeActivityGraph*pAg= NULL);
	void GenFromAttribute(DecodeQueue &que, UMLAttribute att);
	void GenFromActivityGraph(DecodeQueue &que, ShapeActivityGraph *shape);
	void GenFromClass(DecodeQueue &que , ShapeClass *shape);
	void GenFromNamespace(DecodeQueue& que, ShapeNamespace *shape);
	void GenMiddleLanguage(CString fn );
	void SetMenuState( CMenu *menu , int selElementType , BOOL hasChild);
	CImageList m_Images;

	TreeDlg(CWnd* pParent = NULL);   // standard constructor
	~TreeDlg();
// Dialog Data
	//{{AFX_DATA(TreeDlg)
	enum { IDD = IDD_DIALOG_TREE };
	CTreeCtrl	m_TreeCtrl;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(TreeDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(TreeDlg)
	afx_msg void OnSize(UINT nType, int cx, int cy);
	virtual BOOL OnInitDialog();
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnMenuitemDelActivityDiagram();
	afx_msg void OnMenuitemDelClass();
	afx_msg void OnMenuitemDelClassDiagram();
	afx_msg void OnMenuitemDelPackage();
	afx_msg void OnMenuitemNewActivityDiagram();
	afx_msg void OnMenuitemNewClass();
	afx_msg void OnMenuitemNewClassDiagram();
	afx_msg void OnMenuitemNewPackage();
	afx_msg void OnMenuitemSpec();
	afx_msg void OnDblclkTree1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnMenuitemTempCode();
	afx_msg void OnMenuitemRefreshControlflow();
	afx_msg void OnMenuitemCreateJava();
	afx_msg void OnMenuitemClose();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_TREEDLG_H__8BD6F6DC_72A0_4A32_90E2_F33C43AA489F__INCLUDED_)
