Source code of Windows XP (NT5)
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.

150 lines
4.2 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996-1997 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // SplitFrm.h
  7. //
  8. // Abstract:
  9. // Definition of the CSplitterFrame class.
  10. //
  11. // ImplementationFile:
  12. // SplitFrm.cpp
  13. //
  14. // Author:
  15. // David Potter (davidp) May 1, 1996
  16. //
  17. // Revision History:
  18. //
  19. // Notes:
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22. #ifndef _SPLITFRM_H_
  23. #define _SPLITFRM_H_
  24. /////////////////////////////////////////////////////////////////////////////
  25. // Forward Class Declarations
  26. /////////////////////////////////////////////////////////////////////////////
  27. class CSplitterFrame;
  28. /////////////////////////////////////////////////////////////////////////////
  29. // External Class Declarations
  30. /////////////////////////////////////////////////////////////////////////////
  31. class CClusterDoc;
  32. class CClusterTreeView;
  33. class CClusterListView;
  34. class CClusterItem;
  35. class CExtensions;
  36. class CTreeItem;
  37. /////////////////////////////////////////////////////////////////////////////
  38. // CSplitterFrame
  39. /////////////////////////////////////////////////////////////////////////////
  40. class CSplitterFrame : public CMDIChildWnd
  41. {
  42. DECLARE_DYNCREATE(CSplitterFrame)
  43. public:
  44. CSplitterFrame();
  45. // Attributes
  46. protected:
  47. CSplitterWnd m_wndSplitter;
  48. CClusterDoc * m_pdoc;
  49. int m_iFrame;
  50. BOOL m_bDragging;
  51. CImageList * m_pimagelist;
  52. CClusterItem * m_pciDrag;
  53. public:
  54. CClusterDoc * Pdoc(void) const { return m_pdoc; }
  55. int NFrameNumber(void) const { return m_iFrame; }
  56. BOOL BDragging(void) const { return m_bDragging; }
  57. CImageList * Pimagelist(void) const { return m_pimagelist; }
  58. CClusterItem * PciDrag(void) const { return m_pciDrag; }
  59. // Operations
  60. public:
  61. CClusterTreeView * PviewTree(void) const { return (CClusterTreeView *) m_wndSplitter.GetPane(0, 0); }
  62. CClusterListView * PviewList(void)const { return (CClusterListView *) m_wndSplitter.GetPane(0, 1); }
  63. void CalculateFrameNumber();
  64. void InitFrame(IN OUT CClusterDoc * pdoc);
  65. void ConstructProfileValueName(
  66. OUT CString & rstrName,
  67. IN LPCTSTR pszPrefix
  68. ) const;
  69. void BeginDrag(
  70. IN OUT CImageList * pimagelist,
  71. IN OUT CClusterItem * pci,
  72. IN CPoint ptImage,
  73. IN CPoint ptStart
  74. );
  75. void ChangeDragCursor(LPCTSTR pszCursor);
  76. void AbortDrag(void);
  77. // For customizing the default messages on the status bar
  78. virtual void GetMessageString(UINT nID, CString& rMessage) const;
  79. protected:
  80. CMenu * PmenuPopup(void) const;
  81. void Cleanup(void);
  82. // Overrides
  83. // ClassWizard generated virtual function overrides
  84. //{{AFX_VIRTUAL(CSplitterFrame)
  85. public:
  86. virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  87. protected:
  88. virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  89. //}}AFX_VIRTUAL
  90. // Implementation
  91. public:
  92. virtual ~CSplitterFrame(void);
  93. #ifdef _DEBUG
  94. virtual void AssertValid(void) const;
  95. virtual void Dump(CDumpContext& dc) const;
  96. #endif
  97. protected:
  98. CExtensions * m_pext;
  99. CExtensions * Pext(void) const { return m_pext; }
  100. void OnButtonUp(UINT nFlags, CPoint point);
  101. // Generated message map functions
  102. protected:
  103. //{{AFX_MSG(CSplitterFrame)
  104. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  105. afx_msg void OnDestroy();
  106. afx_msg void OnUpdateLargeIconsView(CCmdUI* pCmdUI);
  107. afx_msg void OnUpdateSmallIconsView(CCmdUI* pCmdUI);
  108. afx_msg void OnUpdateListView(CCmdUI* pCmdUI);
  109. afx_msg void OnUpdateDetailsView(CCmdUI* pCmdUI);
  110. afx_msg void OnLargeIconsView();
  111. afx_msg void OnSmallIconsView();
  112. afx_msg void OnListView();
  113. afx_msg void OnDetailsView();
  114. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  115. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  116. afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  117. //}}AFX_MSG
  118. #ifdef _DEBUG
  119. afx_msg void OnMDIActivate(BOOL bActivate, CWnd* pActivateWnd, CWnd* pDeactivateWnd);
  120. #endif
  121. afx_msg void OnUpdateExtMenu(CCmdUI* pCmdUI);
  122. afx_msg LRESULT OnUnloadExtension(WPARAM wparam, LPARAM lparam);
  123. DECLARE_MESSAGE_MAP()
  124. }; //*** class CSplitterFrame
  125. /////////////////////////////////////////////////////////////////////////////
  126. #endif // _SPLITFRM_H_