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.

119 lines
2.9 KiB

  1. //***************************************************************************
  2. //
  3. // DETAILSVIEW.H
  4. //
  5. // Module: NLB Manager (client-side exe)
  6. //
  7. // Purpose: The (right hand side) view of details of something selected
  8. // on the left hand side.
  9. //
  10. // Copyright (c)2001 Microsoft Corporation, All Rights Reserved
  11. //
  12. // History:
  13. //
  14. // 07/25/01 JosephJ Created, from the now defunct RightTopView.
  15. //
  16. //***************************************************************************
  17. #pragma once
  18. #include "stdafx.h"
  19. #include "Document.h"
  20. class DetailsView : public CFormView
  21. {
  22. DECLARE_DYNCREATE( DetailsView )
  23. void SetFocus(void);
  24. protected:
  25. DetailsView(void); // protected constructor used by dynamic creation
  26. ~DetailsView();
  27. public:
  28. virtual void OnInitialUpdate();
  29. virtual void DoDataExchange(CDataExchange* pDX);
  30. //
  31. // Called to indicate that deinitialization will soon follow.
  32. // After return from this call, the the details view will ignore
  33. // any HandleEngineEvent or HandleLeftViewSelChange requests.
  34. //
  35. void
  36. PrepareToDeinitialize(void)
  37. {
  38. m_fPrepareToDeinitialize = TRUE;
  39. }
  40. void Deinitialize(void);
  41. //
  42. // Update the view because of change relating to a specific instance of
  43. // a specific object type.
  44. //
  45. void
  46. HandleEngineEvent(
  47. IN IUICallbacks::ObjectType objtype,
  48. IN ENGINEHANDLE ehClusterId, // could be NULL
  49. IN ENGINEHANDLE ehObjId,
  50. IN IUICallbacks::EventCode evt
  51. );
  52. //
  53. // Handle a selection change notification from the left (tree) view
  54. //
  55. void
  56. HandleLeftViewSelChange(
  57. IN IUICallbacks::ObjectType objtype,
  58. IN ENGINEHANDLE ehId
  59. );
  60. BOOL m_initialized; // is the dialog initialized?
  61. afx_msg void OnSize( UINT nType, int cx, int cy );
  62. void Resize();
  63. protected:
  64. Document* GetDocument();
  65. afx_msg void OnColumnClick( NMHDR* pNMHDR, LRESULT* pResult );
  66. afx_msg void OnNotifyKeyDown( NMHDR* pNMHDR, LRESULT* pResult );
  67. private:
  68. bool m_sort_ascending;
  69. int m_sort_column;
  70. ENGINEHANDLE m_ehObj; // currently displayed obj
  71. IUICallbacks::ObjectType m_objType; // it's type.
  72. CListCtrl m_ListCtrl;
  73. CListCtrl&
  74. GetListCtrl(void)
  75. {
  76. return m_ListCtrl;
  77. }
  78. VOID
  79. mfn_UpdateCaption(LPCWSTR szText);
  80. void
  81. mfn_InitializeRootDisplay(VOID);
  82. void
  83. mfn_InitializeClusterDisplay(ENGINEHANDLE ehCluster);
  84. void
  85. mfn_InitializeInterfaceDisplay(ENGINEHANDLE ehInterface);
  86. void
  87. mfn_UpdateInterfaceInClusterDisplay(ENGINEHANDLE ehInterface, BOOL fDelete);
  88. void
  89. mfn_Clear(void);
  90. CRITICAL_SECTION m_crit;
  91. BOOL m_fPrepareToDeinitialize;
  92. void mfn_Lock(void);
  93. void mfn_Unlock(void) {LeaveCriticalSection(&m_crit);}
  94. DECLARE_MESSAGE_MAP()
  95. };