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.

140 lines
4.7 KiB

  1. #if !defined(AFX_RESULTSPANEVIEW_H__7D4A6865_9056_11D2_BD45_0000F87A3912__INCLUDED_)
  2. #define AFX_RESULTSPANEVIEW_H__7D4A6865_9056_11D2_BD45_0000F87A3912__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // ResultsPaneView.h : header file
  7. //
  8. #include <mmc.h>
  9. #include "ScopePaneItem.h"
  10. #include "ResultsPaneItem.h"
  11. #include "ListViewColumn.h"
  12. typedef int (*RPIFINDPROC) (const ResultsPaneItemArray& ResultsItems, LPARAM param);
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CResultsPaneView command target
  15. class CResultsPaneView : public CCmdTarget
  16. {
  17. DECLARE_DYNCREATE(CResultsPaneView)
  18. // Construction/Destruction
  19. public:
  20. CResultsPaneView();
  21. virtual ~CResultsPaneView();
  22. // Create/Destroy
  23. public:
  24. virtual bool Create(CScopePaneItem* pOwnerItem);
  25. virtual void Destroy();
  26. // Owner ScopeItem Members
  27. public:
  28. CScopePaneItem* GetOwnerScopeItem();
  29. void SetOwnerScopeItem(CScopePaneItem* pOwnerItem);
  30. protected:
  31. CScopePaneItem* m_pOwnerScopeItem;
  32. // ListView Column Members
  33. public:
  34. int GetColumnCount() const;
  35. CListViewColumn* GetColumn(int iIndex);
  36. void SetColumn(int iIndex, CListViewColumn* pColumn);
  37. int AddColumn(CListViewColumn* pColumn);
  38. void RemoveColumn(int iIndex);
  39. protected:
  40. ListViewColumnArray m_Columns;
  41. // Results Pane Item Members
  42. public:
  43. int GetItemCount() const;
  44. CResultsPaneItem* GetItem(int iIndex);
  45. int AddItem(CResultsPaneItem* pItem, bool bResizeColumn = false);
  46. virtual void RemoveItem(int iIndex);
  47. void RemoveItem(CResultsPaneItem* pItem);
  48. void RemoveItem(const CString& sName);
  49. int FindItem(RPIFINDPROC pFindProc, LPARAM param);
  50. bool UpdateItem(CResultsPaneItem* pItem);
  51. void UpdateAllItems();
  52. void RemoveAllItems();
  53. bool GetSelectedItems(ResultsPaneItemArray& rpiaSelectedItems);
  54. int GetUpperPaneSelectedCount(); // v-marfin 59644 : Added this function to fetch the selected
  55. // count from the upper results pane.
  56. protected:
  57. ResultsPaneItemArray m_ResultItems;
  58. // Property Sheet Members
  59. public:
  60. bool IsPropertySheetOpen();
  61. bool InvokePropertySheet(CResultsPaneItem* pItem);
  62. // Context Menu Members
  63. public:
  64. bool InvokeContextMenu(const CPoint& pt, CResultsPaneItem* pItem, int iSelectedCount);
  65. // Results Pane Members - tracks each results pane open on a particular results view
  66. public:
  67. void AddResultsPane(CResultsPane* pPane);
  68. CResultsPane* GetResultsPane(int iIndex);
  69. int GetResultsPanesCount();
  70. void RemoveResultsPane(CResultsPane* pPane);
  71. protected:
  72. CTypedPtrArray<CObArray,CResultsPane*> m_ResultsPanes;
  73. // MMC Notify Handlers
  74. public:
  75. virtual HRESULT OnActivate(BOOL bActivate);
  76. virtual HRESULT OnAddMenuItems(CResultsPaneItem* pItem, LPCONTEXTMENUCALLBACK piCallback,long __RPC_FAR *pInsertionAllowed);
  77. virtual HRESULT OnBtnClick(CResultsPaneItem* pItem, MMC_CONSOLE_VERB mcvVerb);
  78. virtual HRESULT OnCommand(CResultsPane* pPane, CResultsPaneItem* pItem, long lCommandID);
  79. virtual HRESULT OnContextHelp(CResultsPaneItem* pItem);
  80. virtual HRESULT OnCreatePropertyPages(CResultsPaneItem* pItem, LPPROPERTYSHEETCALLBACK lpProvider, INT_PTR handle);
  81. virtual HRESULT OnDblClick(CResultsPaneItem* pItem);
  82. virtual HRESULT OnDelete(CResultsPaneItem* pItem);
  83. virtual HRESULT OnGetResultViewType(CString& sViewType,long& lViewOptions);
  84. virtual HRESULT OnMinimized(BOOL bMinimized);
  85. virtual HRESULT OnPropertyChange(LPARAM lParam);
  86. virtual HRESULT OnQueryPagesFor(CResultsPaneItem* pItem);
  87. virtual HRESULT OnRefresh();
  88. virtual HRESULT OnRename(CResultsPaneItem* pItem, const CString& sNewName);
  89. virtual HRESULT OnRestoreView(MMC_RESTORE_VIEW* pRestoreView, BOOL* pbHandled);
  90. virtual HRESULT OnSelect(CResultsPane* pPane, CResultsPaneItem* pItem, BOOL bSelected);
  91. virtual HRESULT OnShow(CResultsPane* pPane, BOOL bSelecting, HSCOPEITEM hScopeItem);
  92. virtual HRESULT OnViewChange(CResultsPaneItem* pItem, LONG lArg, LONG lHintParam);
  93. // MFC Operations
  94. public:
  95. // Overrides
  96. // ClassWizard generated virtual function overrides
  97. //{{AFX_VIRTUAL(CResultsPaneView)
  98. public:
  99. virtual void OnFinalRelease();
  100. //}}AFX_VIRTUAL
  101. // MFC Implementation
  102. protected:
  103. // Generated message map functions
  104. //{{AFX_MSG(CResultsPaneView)
  105. // NOTE - the ClassWizard will add and remove member functions here.
  106. //}}AFX_MSG
  107. DECLARE_MESSAGE_MAP()
  108. // Generated OLE dispatch map functions
  109. //{{AFX_DISPATCH(CResultsPaneView)
  110. // NOTE - the ClassWizard will add and remove member functions here.
  111. //}}AFX_DISPATCH
  112. DECLARE_DISPATCH_MAP()
  113. DECLARE_INTERFACE_MAP()
  114. };
  115. /////////////////////////////////////////////////////////////////////////////
  116. //{{AFX_INSERT_LOCATION}}
  117. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  118. #endif // !defined(AFX_RESULTSPANEVIEW_H__7D4A6865_9056_11D2_BD45_0000F87A3912__INCLUDED_)