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.

91 lines
2.9 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. report.h
  5. Abstract:
  6. Header file for the report view.
  7. --*/
  8. #ifndef _REPORT_H_
  9. #define _REPORT_H_
  10. #include "commctrl.h"
  11. class CSysmonControl;
  12. class CReport
  13. {
  14. friend LRESULT APIENTRY ReportWndProc (HWND hWnd,
  15. UINT uiMsg,
  16. WPARAM wParam,
  17. LPARAM lParam);
  18. private:
  19. CSysmonControl *m_pCtrl;
  20. HWND m_hWnd;
  21. RECT m_rect;
  22. INT m_xValueWidth;
  23. INT m_xReportWidth;
  24. INT m_yReportHeight;
  25. INT m_yLineHeight;
  26. INT m_xMaxCounterWidth;
  27. INT m_xMaxInstancePos;
  28. INT m_xInstanceMargin;
  29. void *m_pSelect;
  30. INT m_nSelectType;
  31. BOOL m_bConfigChange;
  32. BOOL m_bFontChange;
  33. void OnPaint ( void );
  34. void SetScrollRanges ( void );
  35. void OnHScroll ( INT iScrollCode, INT iScrollNewPos );
  36. void OnVScroll ( INT iScrollCode, INT iScrollNewPos );
  37. void OnLButtonDown ( INT xPos, INT yPos );
  38. BOOL OnContextMenu ( INT xPos, INT yPos );
  39. void OnDblClick ( INT xPos, INT yPos );
  40. INT SetCounterPositions ( PCObjectNode pObject, HDC hDC );
  41. INT SetInstancePositions ( PCObjectNode pObject, HDC hDC );
  42. INT SetObjectPositions ( PCMachineNode pMachine, HDC hDC );
  43. INT SetMachinePositions ( PCCounterTree pTree, HDC hDC );
  44. void DrawReportHeaders ( HDC hDC );
  45. void DrawReportValues ( HDC hDC );
  46. void DrawReportValue ( HDC hDC, PCGraphItem pItem, INT xPos, INT yPos );
  47. void DrawSelectRect ( HDC hDC, BOOL bState );
  48. void Draw ( HDC hDC );
  49. void ApplyChanges ( HDC hDC );
  50. BOOL SelectName ( INT xPos, INT yPos, void **ppSelected, INT *nSelectType );
  51. BOOL PtInName ( POINT pt, INT x, INT y, INT xWidth )
  52. { return (pt.x > x && pt.x < (x + xWidth) && pt.y > y && pt.y < (y + m_yLineHeight)); }
  53. PCGraphItem GetItem ( void *pSelected, INT nSelectType );
  54. BOOL SelectionDeleted ( PCGraphItem pItem );
  55. BOOL LargeHexValueExists ( void );
  56. void GetReportItemValue(PCGraphItem pItem, LPWSTR szValue);
  57. public:
  58. CReport ( void );
  59. ~CReport ( void );
  60. BOOL Init ( CSysmonControl *pCtrl, HWND hWndParent ) ;
  61. void AddItem ( PCGraphItem pItem );
  62. void DeleteItem ( PCGraphItem pItem );
  63. void DeleteSelection ( VOID );
  64. void SizeComponents ( LPRECT pRect );
  65. void ChangeFont ( void );
  66. HWND Window ( void ) { return m_hWnd; }
  67. void Update ( void );
  68. void Render ( HDC hDC, HDC hAttribDC, BOOL fMetafile, BOOL fEntire, LPRECT pRect );
  69. BOOL WriteFileReport(HANDLE hFile);
  70. };
  71. typedef CReport *PREPORT;
  72. #endif