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.

153 lines
5.6 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. // Copyright (c) 2002 Microsoft Corporation. All rights reserved.
  3. // Copyright (c) 2002 OSR Open Systems Resources, Inc.
  4. //
  5. // MainFrm.h : interface of the CMainFrame class
  6. //////////////////////////////////////////////////////////////////////////////
  7. #pragma once
  8. #include "ChildView.h"
  9. //
  10. // Our CWinThread derived class used for the
  11. // user interface thread to offload some of the
  12. // grouping and ungrouping work from the main
  13. // user interface thread
  14. //
  15. class CGroupSession : public CWinThread
  16. {
  17. public:
  18. DECLARE_DYNCREATE(CGroupSession)
  19. virtual int ExitInstance();
  20. virtual BOOL InitInstance();
  21. void OnGroupSession(WPARAM wParam, LPARAM lParam);
  22. void OnUnGroupSession(WPARAM wParam, LPARAM lParam);
  23. HWND m_hMainWnd;
  24. HANDLE m_hEventArray[MAX_LOG_SESSIONS];
  25. DECLARE_MESSAGE_MAP()
  26. };
  27. class CMainFrame : public CFrameWnd
  28. {
  29. friend CGroupSession;
  30. public:
  31. CMainFrame();
  32. protected:
  33. DECLARE_DYNAMIC(CMainFrame)
  34. // Attributes
  35. public:
  36. // Operations
  37. public:
  38. // Overrides
  39. public:
  40. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  41. // Implementation
  42. public:
  43. virtual ~CMainFrame();
  44. void AddModifyLogSession(CLogSession *pLogSession = NULL);
  45. #ifdef _DEBUG
  46. virtual void AssertValid() const;
  47. virtual void Dump(CDumpContext& dc) const;
  48. #endif
  49. protected: // control bar embedded members
  50. CStatusBar m_wndStatusBar;
  51. CToolBar m_wndToolBar;
  52. CToolBar m_wndTraceToolBar;
  53. CLogSessionDlg m_logSessionDlg;
  54. CDockDialogBar m_wndLogSessionListBar;
  55. CChildView m_wndView;
  56. CPropertyPage m_logSessionSetup;
  57. CGroupSession *m_pGroupSessionsThread;
  58. // Generated message map functions
  59. protected:
  60. void DockControlBarLeftOf(CToolBar* Bar, CToolBar* LeftOf);
  61. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  62. afx_msg void OnSetFocus(CWnd *pOldWnd);
  63. afx_msg BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  64. DECLARE_MESSAGE_MAP()
  65. public:
  66. static UINT GroupSessionsThread(LPVOID pParam);
  67. afx_msg void OnFileNewLogSession();
  68. afx_msg void OnCreateNewLogSession();
  69. afx_msg void OnProperties();
  70. afx_msg void OnUpdateProperties(CCmdUI *pCmdUI);
  71. afx_msg void OnStartTrace();
  72. afx_msg void OnUpdateStartTraceButton(CCmdUI *pCmdUI);
  73. afx_msg void OnStopTrace();
  74. afx_msg void OnUpdateStopTraceButton(CCmdUI *pCmdUI);
  75. afx_msg void OnOpenExisting();
  76. afx_msg void OnUpdateViewTraceToolBar(CCmdUI *pCmdUI);
  77. afx_msg void OnViewTraceToolBar();
  78. afx_msg void OnGroupSessions();
  79. afx_msg void OnUngroupSessions();
  80. afx_msg void OnRemoveLogSession();
  81. afx_msg void OnUpdateUIGroupSessions(CCmdUI *pCmdUI);
  82. afx_msg void OnUpdateUngroupSessions(CCmdUI *pCmdUI);
  83. afx_msg void OnUpdateUIStartTrace(CCmdUI *pCmdUI);
  84. afx_msg void OnUpdateUIStopTrace(CCmdUI *pCmdUI);
  85. afx_msg void OnUpdateUIOpenExisting(CCmdUI *pCmdUI);
  86. afx_msg void OnFlagsColumnDisplayCheck();
  87. afx_msg void OnUpdateFlagsColumnDisplay(CCmdUI *pCmdUI);
  88. afx_msg void OnFlushTimeColumnDisplayCheck();
  89. afx_msg void OnUpdateFlushTimeColumnDisplayCheck(CCmdUI *pCmdUI);
  90. afx_msg void OnMaxBuffersColumnDisplayCheck();
  91. afx_msg void OnUpdateMaxBuffersColumnDisplayCheck(CCmdUI *pCmdUI);
  92. afx_msg void OnMinBuffersColumnDisplayCheck();
  93. afx_msg void OnUpdateMinBuffersColumnDisplayCheck(CCmdUI *pCmdUI);
  94. afx_msg void OnBufferSizeColumnDisplayCheck();
  95. afx_msg void OnUpdateBufferSizeColumnDisplayCheck(CCmdUI *pCmdUI);
  96. afx_msg void OnDecayTimeColumnDisplayCheck();
  97. afx_msg void OnUpdateDecayTimeColumnDisplayCheck(CCmdUI *pCmdUI);
  98. afx_msg void OnCircularColumnDisplayCheck();
  99. afx_msg void OnUpdateCircularColumnDisplayCheck(CCmdUI *pCmdUI);
  100. afx_msg void OnSequentialColumnDisplayCheck();
  101. afx_msg void OnUpdateSequentialColumnDisplayCheck(CCmdUI *pCmdUI);
  102. afx_msg void OnNewFileColumnDisplayCheck();
  103. afx_msg void OnUpdateNewFileColumnDisplayCheck(CCmdUI *pCmdUI);
  104. afx_msg void OnGlobalSeqColumnDisplayCheck();
  105. afx_msg void OnUpdateGlobalSeqColumnDisplayCheck(CCmdUI *pCmdUI);
  106. afx_msg void OnLocalSeqColumnDisplayCheck();
  107. afx_msg void OnUpdateLocalSeqColumnDisplayCheck(CCmdUI *pCmdUI);
  108. afx_msg void OnLevelColumnDisplayCheck();
  109. afx_msg void OnUpdateLevelColumnDisplayCheck(CCmdUI *pCmdUI);
  110. afx_msg void OnUpdateRemoveTrace(CCmdUI *pCmdUI);
  111. afx_msg void OnStateColumnDisplayCheck();
  112. afx_msg void OnEventCountColumnDisplayCheck();
  113. afx_msg void OnLostEventsColumnDisplayCheck();
  114. afx_msg void OnBuffersReadColumnDisplayCheck();
  115. afx_msg void OnUpdateStateColumnDisplayCheck(CCmdUI *pCmdUI);
  116. afx_msg void OnUpdateEventCountColumnDisplayCheck(CCmdUI *pCmdUI);
  117. afx_msg void OnUpdateLostEventsColumnDisplayCheck(CCmdUI *pCmdUI);
  118. afx_msg void OnUpdateBuffersReadColumnDisplayCheck(CCmdUI *pCmdUI);
  119. afx_msg void OnLogSessionDisplayOptions();
  120. afx_msg void OnChangeTextColor();
  121. afx_msg void OnChangeBackgroundColor();
  122. afx_msg void OnUpdateChangeTextColor(CCmdUI *pCmdUI);
  123. afx_msg void OnUpdateChangeBackgroundColor(CCmdUI *pCmdUI);
  124. afx_msg void OnUpdateLogSessionList(WPARAM wParam, LPARAM lParam);
  125. afx_msg void OnCompleteGroup(WPARAM wParam, LPARAM lParam);
  126. afx_msg void OnCompleteUnGroup(WPARAM wParam, LPARAM lParam);
  127. afx_msg void OnTraceDone(WPARAM wParam, LPARAM lParam);
  128. HANDLE m_hEndTraceEvent;
  129. afx_msg void OnSetTmax();
  130. afx_msg void OnUpdateSetTmax(CCmdUI *pCmdUI);
  131. };