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.

137 lines
3.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 2000
  6. //
  7. // File: cpview.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #ifndef __CONTROLPANEL_VIEW_H
  11. #define __CONTROLPANEL_VIEW_H
  12. #include "cpguids.h"
  13. #include "cputil.h"
  14. namespace DUI = DirectUI;
  15. namespace CPL {
  16. //
  17. // Control Panel category enumeration.
  18. //
  19. // These values MUST remain unchanged.
  20. // They correspond directly to the values stored for the SCID_CONTROLPANELCATEGORY
  21. // value associated with each CPL in the registry.
  22. //
  23. enum eCPCAT
  24. {
  25. eCPCAT_OTHER,
  26. eCPCAT_APPEARANCE,
  27. eCPCAT_HARDWARE,
  28. eCPCAT_NETWORK,
  29. eCPCAT_SOUND,
  30. eCPCAT_PERFMAINT,
  31. eCPCAT_REGIONAL,
  32. eCPCAT_ACCESSIBILITY,
  33. eCPCAT_ARP,
  34. eCPCAT_ACCOUNTS,
  35. eCPCAT_NUMCATEGORIES
  36. };
  37. //
  38. // ICplWebViewInfo represents a single menu displayed in the
  39. // webview left pane.
  40. //
  41. class ICplWebViewInfo : public IUnknown
  42. {
  43. public:
  44. //
  45. // Returns the menu's header.
  46. //
  47. STDMETHOD(get_Header)(IUIElement **ppele) PURE;
  48. //
  49. // Returns flags governing web view's presentation
  50. // of the information.
  51. //
  52. STDMETHOD(get_Style)(DWORD *pdwStyle) PURE;
  53. //
  54. // Returns enumerator representing the menu's items.
  55. //
  56. STDMETHOD(EnumTasks)(IEnumUICommand **ppenum) PURE;
  57. };
  58. //
  59. // IEnumCplWebViewInfo represents an enumeration of webview information.
  60. // Each element consists of a header and a list of task command objects.
  61. //
  62. class IEnumCplWebViewInfo : public IUnknown
  63. {
  64. public:
  65. STDMETHOD(Next)(ULONG celt, ICplWebViewInfo **ppwvi, ULONG *pceltFetched) PURE;
  66. STDMETHOD(Skip)(ULONG celt) PURE;
  67. STDMETHOD(Reset)(void) PURE;
  68. STDMETHOD(Clone)(IEnumCplWebViewInfo **ppenum) PURE;
  69. };
  70. //
  71. // ICplView represents the view 'factory' for the Control Panel.
  72. // The Control Panel's folder view callback implementation instantiates
  73. // a CplView object and through it's methods obtains the necessary
  74. // display information to drive the Control Panel display.
  75. //
  76. // CPVIEW_EF_XXXX = Enumeration flags.
  77. //
  78. #define CPVIEW_EF_DEFAULT 0x00000000
  79. #define CPVIEW_EF_NOVIEWSWITCH 0x00000001
  80. class ICplView : public IUnknown
  81. {
  82. public:
  83. //
  84. // Get the webview information associated with the 'classic'
  85. // Control Panel view.
  86. //
  87. STDMETHOD(EnumClassicWebViewInfo)(DWORD dwFlags, IEnumCplWebViewInfo **ppenum) PURE;
  88. //
  89. // Get the webview information associated with the 'choice' page.
  90. //
  91. STDMETHOD(EnumCategoryChoiceWebViewInfo)(DWORD dwFlags, IEnumCplWebViewInfo **ppenum) PURE;
  92. //
  93. // Get the webview information associated with a particular category.
  94. //
  95. STDMETHOD(EnumCategoryWebViewInfo)(DWORD dwFlags, eCPCAT eCategory, IEnumCplWebViewInfo **ppenum) PURE;
  96. //
  97. // Creates a DUI element containing the category choice page.
  98. //
  99. STDMETHOD(CreateCategoryChoiceElement)(DirectUI::Element **ppe) PURE;
  100. //
  101. // Creates a DUI element containing the tasks and CPL applets
  102. // for a particular category.
  103. //
  104. STDMETHOD(CreateCategoryElement)(eCPCAT eCategory, DirectUI::Element **ppe) PURE;
  105. //
  106. // Launch help for a given category.
  107. //
  108. STDMETHOD(GetCategoryHelpURL)(eCPCAT eCategory, LPWSTR pszURL, UINT cchURL) PURE;
  109. //
  110. // Refresh the view object with a new set of item IDs.
  111. //
  112. STDMETHOD(RefreshIDs)(IEnumIDList *penumIDs) PURE;
  113. };
  114. HRESULT CplView_CreateInstance(IEnumIDList *penumIDs, IUnknown *punkSite, REFIID riid, void **ppvOut);
  115. HRESULT CplView_GetCategoryTitle(eCPCAT eCategory, LPWSTR pszTitle, UINT cchTitle);
  116. } // namespace CPL
  117. #endif //__CONTROLPANEL_VIEW_H