source reorder
[public/netxms.git] / src / console / win32 / NodePerfView.h
1 #if !defined(AFX_NODEPERFVIEW_H__66B55EB4_974D_401D_B1CF_15C4D134347D__INCLUDED_)
2 #define AFX_NODEPERFVIEW_H__66B55EB4_974D_401D_B1CF_15C4D134347D__INCLUDED_
3
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // NodePerfView.h : header file
8 //
9
10 #include <nxqueue.h>
11 #include "Graph.h"
12
13
14 typedef struct
15 {
16 CGraph *pWnd;
17 DWORD dwItemId[MAX_GRAPH_ITEMS];
18 } PERF_GRAPH;
19
20 /////////////////////////////////////////////////////////////////////////////
21 // CNodePerfView window
22
23 class CNodePerfView : public CWnd
24 {
25 // Construction
26 public:
27 CNodePerfView();
28
29 // Attributes
30 public:
31
32 // Operations
33 public:
34
35 // Overrides
36 // ClassWizard generated virtual function overrides
37 //{{AFX_VIRTUAL(CNodePerfView)
38 protected:
39 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
40 //}}AFX_VIRTUAL
41
42 // Implementation
43 public:
44 void WorkerThread(void);
45 virtual ~CNodePerfView();
46
47 // Generated message map functions
48 protected:
49 DWORD FindItemByName(NXC_SYSTEM_DCI *pItemList, DWORD dwNumItems, TCHAR *pszName);
50 int m_nViewHeight;
51 int m_nOrigin;
52 int m_nTotalHeight;
53 void AdjustView(void);
54 CFont m_fontTitle;
55 int m_nTitleHeight;
56 BOOL CreateGraph(NXC_SYSTEM_DCI *pItemList, DWORD dwNumItems, TCHAR *pszParam,
57 TCHAR *pszTitle, RECT &rect, BOOL bArea);
58 DWORD m_dwTimeTo;
59 DWORD m_dwTimeFrom;
60 void UpdateAllGraphs(void);
61 UINT m_nTimer;
62 Queue m_workerQueue;
63 THREAD m_hWorkerThread;
64 DWORD m_dwNumGraphs;
65 PERF_GRAPH *m_pGraphList;
66 int m_nState;
67 NXC_OBJECT * m_pObject;
68 //{{AFX_MSG(CNodePerfView)
69 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
70 afx_msg void OnPaint();
71 afx_msg void OnDestroy();
72 afx_msg void OnTimer(UINT nIDEvent);
73 afx_msg void OnSize(UINT nType, int cx, int cy);
74 afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
75 //}}AFX_MSG
76 afx_msg void OnSetObject(WPARAM wParam, NXC_OBJECT *pObject);
77 afx_msg void OnRequestCompleted(WPARAM wParam, LPARAM lParam);
78 afx_msg void OnUpdateFinished(WPARAM wParam, LPARAM lParam);
79 afx_msg void OnGraphData(WPARAM wParam, LPARAM lParam);
80 DECLARE_MESSAGE_MAP()
81 };
82
83 /////////////////////////////////////////////////////////////////////////////
84
85 //{{AFX_INSERT_LOCATION}}
86 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
87
88 #endif // !defined(AFX_NODEPERFVIEW_H__66B55EB4_974D_401D_B1CF_15C4D134347D__INCLUDED_)