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.

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