Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

206 lines
5.6 KiB

  1. /******************************************************************************
  2. Header File: Project View.H
  3. This defines the class which provides the UI for viewing and manipulating
  4. project level information for the studio.
  5. Copyright (c) 1997 by Microsoft Corporaiton. All Rights Reserved.
  6. A Pretty Penny Enterprises Production.
  7. Change History:
  8. 02-03-1997 Bob_Kjelgaard@Prodigy.Net Created it
  9. ******************************************************************************/
  10. #if defined(LONG_NAMES)
  11. #include "Project Record.H"
  12. #else
  13. #include "ProjRec.H"
  14. #endif
  15. class CProjectView : public CFormView {
  16. protected: // create from serialization only
  17. CProjectView();
  18. CRect crWSVOrgDims ; // Window's original dimensions
  19. CRect crWSVCurDims ; // Window's current dimensions
  20. CRect crTreeCurDims ; // Current tree (m_ctcDriver) control dimensions
  21. CRect crTreeOrgDims ; // Original tree (m_ctcDriver) control dimensions
  22. CRect crLblCurDims ; // Current label dimensions
  23. CRect crLblOrgDims ; // Current label dimensions
  24. bool bResizingOK ; // True iff it is OK to resize the control(s)
  25. DECLARE_DYNCREATE(CProjectView)
  26. // Attributes
  27. public:
  28. //{{AFX_DATA(CProjectView)
  29. enum { IDD = IDD_ProjectForm };
  30. CTreeCtrl m_ctcDriver;
  31. //}}AFX_DATA
  32. CProjectRecord* GetDocument();
  33. // Operations
  34. public:
  35. // Overrides
  36. // ClassWizard generated virtual function overrides
  37. //{{AFX_VIRTUAL(CProjectView)
  38. public:
  39. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  40. protected:
  41. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  42. virtual void OnInitialUpdate(); // called first time after construct
  43. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  44. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  45. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  46. //}}AFX_VIRTUAL
  47. // Implementation
  48. public:
  49. virtual ~CProjectView();
  50. #ifdef _DEBUG
  51. virtual void AssertValid() const;
  52. virtual void Dump(CDumpContext& dc) const;
  53. #endif
  54. protected:
  55. // Messages generated by tree view nodes derived from CProjectNode
  56. afx_msg void OnExpandBranch();
  57. afx_msg void OnCollapseBranch();
  58. afx_msg void OnRenameItem();
  59. afx_msg void OnOpenItem();
  60. //afx_msg void OnGenerateItem();
  61. afx_msg void OnImport();
  62. afx_msg void OnDeleteItem();
  63. afx_msg void OnCopyItem();
  64. afx_msg void OnChangeID();
  65. afx_msg void OnCheckWorkspace();
  66. // Generated message map functions
  67. protected:
  68. //{{AFX_MSG(CProjectView)
  69. afx_msg void OnBeginlabeleditDriverView(NMHDR* pNMHDR, LRESULT* pResult);
  70. afx_msg void OnEndLabelEdit(NMHDR* pNMHDR, LRESULT* pResult);
  71. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  72. afx_msg void OnDblclkDriverView(NMHDR* pNMHDR, LRESULT* pResult);
  73. afx_msg void OnFileParse();
  74. afx_msg void OnKeydownDriverView(NMHDR* pNMHDR, LRESULT* pResult);
  75. afx_msg void OnSize(UINT ntype, int cx, int cy) ;
  76. afx_msg void OnFileInf();
  77. //}}AFX_MSG
  78. DECLARE_MESSAGE_MAP()
  79. };
  80. #ifndef _DEBUG // debug version in Project View.cpp
  81. inline CProjectRecord* CProjectView::GetDocument()
  82. { return (CProjectRecord*)m_pDocument; }
  83. #endif
  84. /////////////////////////////////////////////////////////////////////////////
  85. // CCopyItem dialog
  86. class CCopyItem : public CDialog
  87. {
  88. // Construction
  89. public:
  90. CCopyItem(CWnd* pParent = NULL); // standard constructor
  91. void Init(CString cssrcfile);
  92. // Dialog Data
  93. //{{AFX_DATA(CCopyItem)
  94. enum { IDD = IDD_CopyItem };
  95. CString m_csCopyName;
  96. CString m_csCopyPrompt;
  97. //}}AFX_DATA
  98. // Overrides
  99. // ClassWizard generated virtual function overrides
  100. //{{AFX_VIRTUAL(CCopyItem)
  101. protected:
  102. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  103. //}}AFX_VIRTUAL
  104. // Implementation
  105. protected:
  106. // Generated message map functions
  107. //{{AFX_MSG(CCopyItem)
  108. // NOTE: the ClassWizard will add member functions here
  109. //}}AFX_MSG
  110. DECLARE_MESSAGE_MAP()
  111. };
  112. /////////////////////////////////////////////////////////////////////////////
  113. // CChangeID dialog
  114. class CChangeID : public CDialog
  115. {
  116. // Construction
  117. public:
  118. void Init(CString csrestype, CString csname, int ncurid);
  119. CChangeID(CWnd* pParent = NULL); // standard constructor
  120. // Dialog Data
  121. //{{AFX_DATA(CChangeID)
  122. enum { IDD = IDD_ChangeID };
  123. CString m_csResourceLabel;
  124. CString m_csResourceName;
  125. int m_nCurResID;
  126. int m_nNewResID;
  127. //}}AFX_DATA
  128. // Overrides
  129. // ClassWizard generated virtual function overrides
  130. //{{AFX_VIRTUAL(CChangeID)
  131. protected:
  132. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  133. //}}AFX_VIRTUAL
  134. // Implementation
  135. protected:
  136. // Generated message map functions
  137. //{{AFX_MSG(CChangeID)
  138. //}}AFX_MSG
  139. DECLARE_MESSAGE_MAP()
  140. };
  141. /////////////////////////////////////////////////////////////////////////////
  142. // CDeleteQuery dialog
  143. class CDeleteQuery : public CDialog {
  144. // Construction
  145. public:
  146. CDeleteQuery(CWnd* pParent = NULL); // standard constructor
  147. // Dialog Data
  148. //{{AFX_DATA(CDeleteQuery)
  149. enum { IDD = IDD_DeleteQuery };
  150. CString m_csTarget;
  151. BOOL m_bRemoveFile;
  152. //}}AFX_DATA
  153. void Init(CString csrestype, CString csname) ;
  154. BOOL KillFile() const { return m_bRemoveFile; }
  155. // Overrides
  156. // ClassWizard generated virtual function overrides
  157. //{{AFX_VIRTUAL(CDeleteQuery)
  158. protected:
  159. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  160. //}}AFX_VIRTUAL
  161. // Implementation
  162. protected:
  163. // Generated message map functions
  164. //{{AFX_MSG(CDeleteQuery)
  165. afx_msg void OnNo();
  166. afx_msg void OnYes();
  167. //}}AFX_MSG
  168. DECLARE_MESSAGE_MAP()
  169. };