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.

136 lines
6.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1999
  5. //
  6. // File: conuiobservers.h
  7. //
  8. // Contents: Observer interface class definitions used by all conui.
  9. //
  10. // History: 24-Nov-99 VivekJ Created
  11. //
  12. //
  13. #pragma once
  14. class CAMCView;
  15. class CAMCViewToolbars;
  16. class CAMCDoc;
  17. /*+-------------------------------------------------------------------------*
  18. * class CTreeViewObserver
  19. *
  20. *
  21. * PURPOSE: The general interface for a class that observes a scope tree
  22. * control.
  23. *
  24. *+-------------------------------------------------------------------------*/
  25. class CTreeViewObserver : public CObserverBase
  26. {
  27. public:
  28. virtual SC ScOnItemAdded (TVINSERTSTRUCT *pTVInsertStruct, HTREEITEM hti, HMTNODE hMTNode) {DEFAULT_OBSERVER_METHOD;}
  29. virtual SC ScOnItemDeleted (HNODE hNode, HTREEITEM hti) {DEFAULT_OBSERVER_METHOD;}
  30. virtual SC ScOnItemDeselected(HNODE hNode) {DEFAULT_OBSERVER_METHOD;}
  31. virtual SC ScOnSelectedItemTextChanged (LPCTSTR pszNewText) {DEFAULT_OBSERVER_METHOD;}
  32. virtual SC ScOnTreeViewActivated () {DEFAULT_OBSERVER_METHOD;}
  33. };
  34. /*+-------------------------------------------------------------------------*
  35. * class CAMCViewObserver
  36. *
  37. *
  38. * PURPOSE: Interface for observers of CAMCView
  39. *
  40. *+-------------------------------------------------------------------------*/
  41. class CAMCViewObserver : public CObserverBase
  42. {
  43. public:
  44. virtual SC ScOnViewCreated (CAMCView *pAMCView) {DEFAULT_OBSERVER_METHOD;} // called when a view is created.
  45. virtual SC ScOnViewDestroyed (CAMCView *pAMCView) {DEFAULT_OBSERVER_METHOD;} // called when a view is destroyed
  46. virtual SC ScOnViewResized (CAMCView *pAMCView, UINT nType, int cx, int cy) {DEFAULT_OBSERVER_METHOD;} // called when a view is resized
  47. virtual SC ScOnViewTitleChanged(CAMCView *pAMCView) {DEFAULT_OBSERVER_METHOD;} // called when the view title changes.
  48. virtual SC ScOnActivateView (CAMCView *pAMCView, bool bFirstActiveView) {DEFAULT_OBSERVER_METHOD;} // called when the view is activated.
  49. virtual SC ScOnDeactivateView (CAMCView *pAMCView, bool bLastActiveView) {DEFAULT_OBSERVER_METHOD;} // called when the view is de-activated.
  50. virtual SC ScOnCloseView (CAMCView *pView ) {DEFAULT_OBSERVER_METHOD;} // called before view is closed.
  51. virtual SC ScOnViewChange (CAMCView *pView, HNODE hNode ) {DEFAULT_OBSERVER_METHOD;} // called when scope node selection changes.
  52. virtual SC ScOnResultSelectionChange(CAMCView *pView ) {DEFAULT_OBSERVER_METHOD;} // called when the result selection on view changes.
  53. virtual SC ScOnListViewItemUpdated(CAMCView *pView , int nIndex) {DEFAULT_OBSERVER_METHOD;} // called when a list view item is updated.
  54. };
  55. /*+-------------------------------------------------------------------------*
  56. * class CListViewObserver
  57. *
  58. *
  59. * PURPOSE: Interface for observers of CListView
  60. *
  61. *+-------------------------------------------------------------------------*/
  62. class CListViewObserver : public CObserverBase
  63. {
  64. public:
  65. // observed events
  66. virtual SC ScOnListViewIndexesReset() { DEFAULT_OBSERVER_METHOD } // called when result contents is removed or reordered (sort) so no indexes can be considered valid after it
  67. virtual SC ScOnListViewItemInserted(int nIndex) { DEFAULT_OBSERVER_METHOD } // called when item is inserted to result data
  68. virtual SC ScOnListViewItemDeleted (int nIndex) { DEFAULT_OBSERVER_METHOD } // called when item is deleted from result data
  69. virtual SC ScOnListViewColumnInserted (int nIndex) { DEFAULT_OBSERVER_METHOD } // called when column is inserted to listview
  70. virtual SC ScOnListViewColumnDeleted (int nIndex) { DEFAULT_OBSERVER_METHOD } // called when column is deleted from listview
  71. virtual SC ScOnListViewItemUpdated (int nIndex) { DEFAULT_OBSERVER_METHOD } // called when an item is updated
  72. };
  73. //+-------------------------------------------------------------------
  74. //
  75. // Class: CAMCViewToolbarsObserver
  76. //
  77. // Synopsis: For any one to take note of active CAMCViewToolbars object
  78. // The main toolbar observes for which CAMCViewToolbar
  79. // is active so that that object can receive toolbutton
  80. // clicked & tooltip events.
  81. //
  82. //+-------------------------------------------------------------------
  83. class CAMCViewToolbarsObserver : public CObserverBase
  84. {
  85. public:
  86. virtual SC ScOnActivateAMCViewToolbars (CAMCViewToolbars *pAMCViewToolbars) {DEFAULT_OBSERVER_METHOD;} // called when the view is activated.
  87. virtual SC ScOnDeactivateAMCViewToolbars () {DEFAULT_OBSERVER_METHOD;} // called when the view is de-activated.
  88. virtual SC ScOnToolbarButtonClicked () {DEFAULT_OBSERVER_METHOD;} // called when the view is de-activated.
  89. };
  90. //+-------------------------------------------------------------------
  91. //
  92. // Class: CListViewActivationObserver
  93. //
  94. // Synopsis: For any one to observe when the CAMCListView being activated or deactivated.
  95. //
  96. //+-------------------------------------------------------------------
  97. class CListViewActivationObserver : public CObserverBase
  98. {
  99. public:
  100. virtual SC ScOnListViewActivated () {DEFAULT_OBSERVER_METHOD;} // called when the view is activated.
  101. };
  102. //+-------------------------------------------------------------------
  103. //
  104. // Class: COCXHostActivationObserver
  105. //
  106. // Synopsis: For any one to observe when the OCX or WEB host being activated or deactivated.
  107. //
  108. //+-------------------------------------------------------------------
  109. class COCXHostActivationObserver : public CObserverBase
  110. {
  111. public:
  112. virtual SC ScOnOCXHostActivated () {DEFAULT_OBSERVER_METHOD;} // called when the view is activated.
  113. };
  114. //+-------------------------------------------------------------------
  115. //
  116. // Class: CAMCDocumentObserver
  117. //
  118. // Synopsis: Observes the document object.
  119. //
  120. //+-------------------------------------------------------------------
  121. class CAMCDocumentObserver : public CObserverBase
  122. {
  123. public:
  124. virtual SC ScDocumentLoadCompleted (CAMCDoc *pDoc) {DEFAULT_OBSERVER_METHOD;} // called when the document is loaded.
  125. };