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.

67 lines
2.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: stdbar.h
  8. //
  9. // Standard toolbar implementation.
  10. //
  11. //--------------------------------------------------------------------------
  12. #ifndef STDBAR_H__
  13. #define STDBAR_H__
  14. #include "toolbars.h"
  15. #define MMC_TOOLBTN_COLORREF RGB(255, 0, 255)
  16. //+-------------------------------------------------------------------
  17. //
  18. // class: CStandardToolbar
  19. //
  20. // Purpose: Standard toolbar implementation.
  21. //
  22. // History: 10-25-1999 AnandhaG Created
  23. //
  24. //--------------------------------------------------------------------
  25. class CStandardToolbar : public CToolbarNotify,
  26. public CStdVerbButtons
  27. {
  28. public:
  29. CStandardToolbar();
  30. ~CStandardToolbar();
  31. SC ScInitializeStdToolbar(CAMCView* pAMCView);
  32. // The following methods are used by CAMCView.
  33. SC ScEnableExportList(bool bEnable);
  34. SC ScEnableUpOneLevel(bool bEnable);
  35. SC ScEnableContextHelpBtn(bool bEnable);
  36. SC ScEnableScopePaneBtn(bool bEnable = true);
  37. SC ScCheckScopePaneBtn(bool bChecked);
  38. SC ScShowStdBar(bool bShow);
  39. SC ScEnableButton(INT nID, bool bState);
  40. SC ScEnableAndShowButton(INT nID, bool bEnableAndShow); // Instead of disabling hide it.
  41. // CStdVerbButtons implementation (used by nodemgr to update verbs).
  42. virtual SC ScUpdateStdbarVerbs(IConsoleVerb* pCV);
  43. virtual SC ScUpdateStdbarVerb (MMC_CONSOLE_VERB cVerb, IConsoleVerb* pCV = NULL);
  44. virtual SC ScUpdateStdbarVerb (MMC_CONSOLE_VERB cVerb, BYTE nState, BOOL bFlag);
  45. virtual SC ScShow(BOOL bShow);
  46. public:
  47. // CToolbarNotify implementation (used by CToolbarsMgr to notify about button click).
  48. virtual SC ScNotifyToolBarClick(HNODE hNode, bool bScope, LPARAM lParam, UINT nID);
  49. virtual SC ScAMCViewToolbarsBeingDestroyed();
  50. private:
  51. CMMCToolbarIntf* m_pToolbarUI; // Toolbar UI interface.
  52. CAMCView* m_pAMCView; // View owner.
  53. typedef std::map<INT, INT> MMCVerbCommandIDs;
  54. MMCVerbCommandIDs m_MMCVerbCommandIDs;
  55. SC ScAddToolbarButtons(int nCnt, MMCBUTTON* pButtons);
  56. };
  57. #endif STDBAR_H__