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.

107 lines
2.8 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. FltrNode.h
  7. FILE HISTORY:
  8. */
  9. #ifndef _SFLTNODE_H
  10. #define _SFLTNODE_H
  11. #ifndef _IPSMHAND_H
  12. #include "ipsmhand.h"
  13. #endif
  14. #ifndef _SPDDB_H
  15. #include "spddb.h"
  16. #endif
  17. class CSearchFilters;
  18. /*---------------------------------------------------------------------------
  19. Class: CSpecificFilterHandler
  20. ---------------------------------------------------------------------------*/
  21. class CSpecificFilterHandler : public CIpsmHandler
  22. {
  23. public:
  24. CSpecificFilterHandler(ITFSComponentData* pTFSComponentData);
  25. ~CSpecificFilterHandler();
  26. // Interface
  27. public:
  28. // base handler functionality we override
  29. OVERRIDE_NodeHandler_HasPropertyPages();
  30. OVERRIDE_NodeHandler_CreatePropertyPages();
  31. OVERRIDE_NodeHandler_OnAddMenuItems();
  32. OVERRIDE_NodeHandler_OnCommand();
  33. OVERRIDE_NodeHandler_GetString()
  34. { return (nCol == 0) ? GetDisplayName() : NULL; }
  35. // Base handler notifications we handle
  36. OVERRIDE_BaseHandlerNotify_OnExpand();
  37. OVERRIDE_BaseHandlerNotify_OnDelete();
  38. OVERRIDE_BaseHandlerNotify_OnPropertyChange();
  39. // Result handler functionality we override
  40. OVERRIDE_BaseResultHandlerNotify_OnResultSelect();
  41. OVERRIDE_BaseResultHandlerNotify_OnResultUpdateView();
  42. OVERRIDE_ResultHandler_OnGetResultViewType();
  43. OVERRIDE_ResultHandler_GetVirtualString();
  44. OVERRIDE_ResultHandler_GetVirtualImage();
  45. OVERRIDE_ResultHandler_AddMenuItems();
  46. OVERRIDE_ResultHandler_Command();
  47. STDMETHODIMP CacheHint(int nStartIndex, int nEndIndex);
  48. STDMETHODIMP SortItems(int nColumn,
  49. DWORD dwSortOptions,
  50. LPARAM lUserParam);
  51. // base handler overrides
  52. virtual HRESULT LoadColumns(ITFSComponent *, MMC_COOKIE, LPARAM, LPARAM);
  53. // CHandler overridden
  54. virtual HRESULT OnRefresh(ITFSNode *, LPDATAOBJECT, DWORD, LPARAM, LPARAM);
  55. // multi select support
  56. virtual const GUID * GetVirtualGuid(int nIndex)
  57. {
  58. return &GUID_IpsmSpecificFilterNodeType;
  59. }
  60. public:
  61. // CMTIpsmHandler functionality
  62. virtual HRESULT InitializeNode(ITFSNode * pNode);
  63. virtual int GetImageIndex(BOOL bOpenImage);
  64. ITFSQueryObject* OnCreateQuery(ITFSNode * pNode);
  65. public:
  66. // implementation specific
  67. HRESULT InitData(ISpdInfo * pSpdInfo);
  68. HRESULT UpdateStatus(ITFSNode * pNode);
  69. void SetColumnInfo();
  70. // Implementation
  71. private:
  72. // Command handlers
  73. HRESULT OnDelete(ITFSNode * pNode);
  74. HRESULT UpdateViewType(
  75. ITFSNode * pNode,
  76. FILTER_TYPE NewFltrType
  77. );
  78. private:
  79. SPISpdInfo m_spSpdInfo;
  80. CSearchFilters * m_pDlgSrchFltr;
  81. FILTER_TYPE m_FltrType;
  82. };
  83. #endif _LINES_H