-
Notifications
You must be signed in to change notification settings - Fork 3
/
OScopeCtrl.h
executable file
·92 lines (73 loc) · 2.18 KB
/
OScopeCtrl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// OScopeCtrl.h : header file
//
#ifndef __OScopeCtrl_H__
#define __OScopeCtrl_H__
/////////////////////////////////////////////////////////////////////////////
// COScopeCtrl window
class COScopeCtrl : public CWnd
{
// Construction
public:
COScopeCtrl();
// Attributes
public:
double AppendPoint(double dNewPoint);
void SetRange(double dLower, double dUpper, int nDecimalPlaces=1);
void SetXUnits(CString string);
void SetYUnits(CString string);
void SetGridColor(COLORREF color);
void SetPlotColor(COLORREF color);
void SetBackgroundColor(COLORREF color);
void InvalidateCtrl();
void DrawPoint();
void Reset();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(COScopeCtrl)
public:
virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID=NULL);
//}}AFX_VIRTUAL
// Implementation
public:
int m_nShiftPixels; // amount to shift with each new point
int m_nYDecimals;
CString m_strXUnitsString;
CString m_strYUnitsString;
COLORREF m_crBackColor; // background color
COLORREF m_crGridColor; // grid color
COLORREF m_crPlotColor; // data color
double m_dCurrentPosition; // current position
double m_dPreviousPosition; // previous position
virtual ~COScopeCtrl();
// Generated message map functions
protected:
//{{AFX_MSG(COScopeCtrl)
afx_msg void OnPaint();
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
int m_nHalfShiftPixels;
int m_nPlotShiftPixels;
int m_nClientHeight;
int m_nClientWidth;
int m_nPlotHeight;
int m_nPlotWidth;
double m_dLowerLimit; // lower bounds
double m_dUpperLimit; // upper bounds
double m_dRange;
double m_dVerticalFactor;
CRect m_rectClient;
CRect m_rectPlot;
CPen m_penPlot;
CBrush m_brushBack;
CDC m_dcGrid;
CDC m_dcPlot;
CBitmap *m_pbitmapOldGrid;
CBitmap *m_pbitmapOldPlot;
CBitmap m_bitmapGrid;
CBitmap m_bitmapPlot;
};
/////////////////////////////////////////////////////////////////////////////
#endif