DlgLinkTree.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. #if !defined(AFX_DLGLINKTREE_H__F16898A5_5BF2_11D5_86D8_00002103143B__INCLUDED_)
  13. #define AFX_DLGLINKTREE_H__F16898A5_5BF2_11D5_86D8_00002103143B__INCLUDED_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif // _MSC_VER > 1000
  17. // DlgLinkTree.h : header file
  18. //
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CDlgLinkTree dialog
  21. class CDlgLinkTree : public CDialog
  22. {
  23. // Construction
  24. public:
  25. CDlgLinkTree(CEntity *pen, CPoint pt, BOOL bWhoTargets, BOOL bPropertyNames, CWnd* pParent = NULL);
  26. void AddEntityPtrsRecursiv(CEntity *pen, HTREEITEM hParent, CTString strPropertyName);
  27. void ExpandTree(HTREEITEM pItem, BOOL bExpand, INDEX iMaxLevel=-1, BOOL bNoNextSibling=FALSE);
  28. void ExpandRecursivly(HTREEITEM pItem, BOOL bExpand, BOOL bNoNextSibling);
  29. void CalculateOccupiedSpace(HTREEITEM hItem, CRect &rect);
  30. INDEX GetItemLevel(HTREEITEM item);
  31. void SetNewWindowOrigin(void);
  32. void InitializeTree(void);
  33. CPoint m_pt;
  34. CEntity *m_pen;
  35. HTREEITEM m_HitItem;
  36. CPoint m_ptLastMouse;
  37. CPoint m_ptMouseDown;
  38. CRect m_rectWndOnMouseDown;
  39. // Dialog Data
  40. //{{AFX_DATA(CDlgLinkTree)
  41. enum { IDD = IDD_LINK_TREE };
  42. CTreeCtrl m_ctrTree;
  43. BOOL m_bClass;
  44. BOOL m_bName;
  45. BOOL m_bProperty;
  46. BOOL m_bWho;
  47. //}}AFX_DATA
  48. // Overrides
  49. // ClassWizard generated virtual function overrides
  50. //{{AFX_VIRTUAL(CDlgLinkTree)
  51. public:
  52. virtual BOOL PreTranslateMessage(MSG* pMsg);
  53. protected:
  54. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  55. //}}AFX_VIRTUAL
  56. // Implementation
  57. protected:
  58. // Generated message map functions
  59. //{{AFX_MSG(CDlgLinkTree)
  60. virtual BOOL OnInitDialog();
  61. afx_msg void OnDblclkLinkTree(NMHDR* pNMHDR, LRESULT* pResult);
  62. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  63. afx_msg void OnLtContractAll();
  64. afx_msg void OnLtContractBranch();
  65. afx_msg void OnLtExpandAll();
  66. afx_msg void OnLtExpandBranch();
  67. afx_msg void OnLtLeaveBranch();
  68. afx_msg void OnLtLastLevel();
  69. afx_msg void OnLtClass();
  70. afx_msg void OnLtName();
  71. afx_msg void OnLtProperty();
  72. afx_msg void OnLtWho();
  73. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  74. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  75. //}}AFX_MSG
  76. DECLARE_MESSAGE_MAP()
  77. };
  78. //{{AFX_INSERT_LOCATION}}
  79. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  80. #endif // !defined(AFX_DLGLINKTREE_H__F16898A5_5BF2_11D5_86D8_00002103143B__INCLUDED_)