Team Fortress 2 Source Code as on 22/4/2020
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.

86 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #if !defined(AFX_GRAPHCONTROL_H__9B50B827_F24D_4C5A_BA6E_A591A64E404D__INCLUDED_)
  9. #define AFX_GRAPHCONTROL_H__9B50B827_F24D_4C5A_BA6E_A591A64E404D__INCLUDED_
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif // _MSC_VER > 1000
  13. // GraphControl.h : header file
  14. //
  15. #include "utlvector.h"
  16. class CGraphEntry
  17. {
  18. public:
  19. CGraphEntry() :
  20. m_msTime( 0 ),
  21. m_nBytesSent( 0 ),
  22. m_nBytesReceived( 0 )
  23. {
  24. }
  25. int m_msTime;
  26. int m_nBytesSent;
  27. int m_nBytesReceived;
  28. };
  29. /////////////////////////////////////////////////////////////////////////////
  30. // CGraphControl window
  31. class CGraphControl : public CWnd
  32. {
  33. // Construction
  34. public:
  35. CGraphControl();
  36. // Attributes
  37. public:
  38. // Operations
  39. public:
  40. void Clear();
  41. // This function assumes you've already run the query and the graph_entry's are selected in.
  42. void Fill( CUtlVector<CGraphEntry> &entries );
  43. // Overrides
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(CGraphControl)
  46. //}}AFX_VIRTUAL
  47. // Implementation
  48. public:
  49. virtual ~CGraphControl();
  50. protected:
  51. void Render( CDC *pDC );
  52. CUtlVector<CGraphEntry> m_Entries;
  53. // Generated message map functions
  54. protected:
  55. //{{AFX_MSG(CGraphControl)
  56. afx_msg void OnPaint();
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. };
  60. /////////////////////////////////////////////////////////////////////////////
  61. //{{AFX_INSERT_LOCATION}}
  62. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  63. #endif // !defined(AFX_GRAPHCONTROL_H__9B50B827_F24D_4C5A_BA6E_A591A64E404D__INCLUDED_)