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.

150 lines
5.6 KiB

  1. /*--------------------------------------------------------------------------*
  2. *
  3. * Microsoft Windows
  4. * Copyright (C) Microsoft Corporation, 1999 - 1999
  5. *
  6. * File: toolbars.h
  7. *
  8. * Contents: Defines the (non-COM) interface classes that are used for
  9. * communication between conui and nodemgr
  10. *
  11. * History: 30-Aug-99 AnandhaG Created
  12. *
  13. *--------------------------------------------------------------------------*/
  14. #ifndef TOOLBARS_H
  15. #define TOOLBARS_H
  16. #pragma once
  17. //+-------------------------------------------------------------------
  18. //
  19. // class: CMenuButtonNotify
  20. //
  21. // Purpose: Menubutton click notification hanlder interface.
  22. // When the user clicks a menubutton, MMC calls the
  23. // method ScNotifyMenuBtnClick of this interface.
  24. // This is implemented by whoever adds a menubutton.
  25. // (ie: snapins & MMC menus).
  26. //
  27. // History: 30-Aug-1999 AnandhaG Created
  28. //
  29. //--------------------------------------------------------------------
  30. class CMenuButtonNotify
  31. {
  32. public:
  33. virtual SC ScNotifyMenuBtnClick(HNODE hNode, bool bScope, LPARAM lParam,
  34. MENUBUTTONDATA& menuButtonData) = 0;
  35. };
  36. //+-------------------------------------------------------------------
  37. //
  38. // class: CMenuButtonsMgr
  39. //
  40. // Purpose: An interface to manipulate MenuButton UI.
  41. //
  42. // History: 30-Aug-1999 AnandhaG Created
  43. //
  44. //--------------------------------------------------------------------
  45. class CMenuButtonsMgr
  46. {
  47. public:
  48. virtual SC ScAddMenuButton(CMenuButtonNotify* pMenuBtnNotifyClbk,
  49. INT idCommand, LPCOLESTR lpButtonText,
  50. LPCOLESTR lpStatusText) = 0;
  51. virtual SC ScModifyMenuButton(CMenuButtonNotify* pMenuBtnNotifyClbk,
  52. INT idCommand, LPCOLESTR lpButtonText,
  53. LPCOLESTR lpStatusText) = 0;
  54. virtual SC ScModifyMenuButtonState(CMenuButtonNotify* pMenuBtnNotifyClbk,
  55. INT idCommand, MMC_BUTTON_STATE nState,
  56. BOOL bState) = 0;
  57. virtual SC ScAttachMenuButton(CMenuButtonNotify* pMenuBtnNotifyClbk) = 0;
  58. virtual SC ScDetachMenuButton(CMenuButtonNotify* pMenuBtnNotifyClbk) = 0;
  59. virtual SC ScDisableMenuButtons() = 0;
  60. // The following members will be part of CMenuButtonsMgrImpl
  61. // after "Customize View" dialog is moved to Conui
  62. virtual SC ScToggleMenuButton(BOOL bShow) = 0;
  63. };
  64. //+-------------------------------------------------------------------
  65. //
  66. // class: CToolbarNotify
  67. //
  68. // Purpose: Toolbutton click notification hanlder interface.
  69. // When the user clicks a toolbutton, MMC calls the
  70. // method ScNotifyToolBarClick of this interface.
  71. // This is implemented by whoever adds a toolbar.
  72. // (ie: snapins & MMC stdbar).
  73. //
  74. // History: 12-Oct-1999 AnandhaG Created
  75. //
  76. //--------------------------------------------------------------------
  77. class CToolbarNotify
  78. {
  79. public:
  80. virtual SC ScNotifyToolBarClick(HNODE hNode, bool bScope, LPARAM lParam,
  81. UINT nID) = 0;
  82. virtual SC ScAMCViewToolbarsBeingDestroyed() = 0;
  83. };
  84. //+-------------------------------------------------------------------
  85. //
  86. // class: CStdVerbButtons
  87. //
  88. // Purpose: An interface used by nodemgr to manipulate std-verb buttons.
  89. //
  90. // History: 26-Oct-1999 AnandhaG Created
  91. //
  92. //--------------------------------------------------------------------
  93. class CStdVerbButtons
  94. {
  95. public:
  96. virtual SC ScUpdateStdbarVerbs(IConsoleVerb* pCV) = 0;
  97. virtual SC ScUpdateStdbarVerb (MMC_CONSOLE_VERB cVerb, IConsoleVerb* pCV = NULL) = 0;
  98. virtual SC ScUpdateStdbarVerb (MMC_CONSOLE_VERB cVerb, BYTE byState, BOOL bFlag) = 0;
  99. virtual SC ScShow(BOOL bShow) = 0;
  100. };
  101. //+-------------------------------------------------------------------
  102. //
  103. // class: CMMCToolbarIntf
  104. //
  105. // Purpose: An interface to manipulate Toolbar UI.
  106. //
  107. // History: 05-Dec-1999 AnandhaG Created
  108. //
  109. //--------------------------------------------------------------------
  110. class CMMCToolbarIntf
  111. {
  112. public:
  113. virtual SC ScAddButtons(CToolbarNotify* pNotifyCallbk, int nButtons, LPMMCBUTTON lpButtons) = 0;
  114. virtual SC ScAddBitmap (CToolbarNotify* pNotifyCallbk, INT nImages, HBITMAP hbmp, COLORREF crMask) = 0;
  115. virtual SC ScInsertButton(CToolbarNotify* pNotifyCallbk, int nIndex, LPMMCBUTTON lpButton) = 0;
  116. virtual SC ScDeleteButton(CToolbarNotify* pNotifyCallbk, int nIndex) = 0;
  117. virtual SC ScGetButtonState(CToolbarNotify* pNotifyCallbk, int idCommand, BYTE nState, BOOL* pbState) = 0;
  118. virtual SC ScSetButtonState(CToolbarNotify* pNotifyCallbk, int idCommand, BYTE nState, BOOL bState) = 0;
  119. virtual SC ScAttach(CToolbarNotify* pNotifyCallbk) = 0;
  120. virtual SC ScDetach(CToolbarNotify* pNotifyCallbk) = 0;
  121. virtual SC ScDelete(CToolbarNotify* pNotifyCallbk) = 0;
  122. virtual SC ScShow(CToolbarNotify* pNotifyCallbk, BOOL bShow) = 0;
  123. };
  124. //+-------------------------------------------------------------------
  125. //
  126. // class: CAMCViewToolbarsMgr
  127. //
  128. // Purpose: An interface to create/disable Toolbar. (Rename this
  129. // to CToolbarsMgr once old one is removed).
  130. //
  131. // History: 05-Dec-1999 AnandhaG Created
  132. //
  133. //--------------------------------------------------------------------
  134. class CAMCViewToolbarsMgr
  135. {
  136. public:
  137. virtual SC ScCreateToolBar(CMMCToolbarIntf** ppToolbarIntf) = 0;
  138. virtual SC ScDisableToolbars() = 0;
  139. };
  140. #endif /* TOOLBARS_H */