-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDisplayPanel.h
More file actions
executable file
·89 lines (74 loc) · 2.52 KB
/
DisplayPanel.h
File metadata and controls
executable file
·89 lines (74 loc) · 2.52 KB
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
// DisplayPanel.h: interface for the CDisplayPanel class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DISPLAYPANEL_H__3CB83ED0_7A87_4023_9237_B316113474BC__INCLUDED_)
#define AFX_DISPLAYPANEL_H__3CB83ED0_7A87_4023_9237_B316113474BC__INCLUDED_
#include "Axis.h" // Added by ClassView
#include "DisplayWaveSource.h" // Added by ClassView
#include "DisplaySpectrumSource.h"
#include "common.h"
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CDisplayPanel
{
public:
DOUBLE GetFXval(LONG in_FXpos);
DOUBLE GetXval(LONG in_Xpos);
BOOL isPowerON();
VOID TurnOff();
VOID TurnOn();
VOID DrawOffScreen();
POINT GetOriginalPoint();
INT Display();
INT AttachSource(CSignal* in_pSpectrum);
INT AttachSource(CWave* in_pWave);
INT DrawDisplayPanel();
INT DrawSelectMask(const CPoint in_ptFisrt, const CPoint in_ptSecond);
RECT GetSelectedRect(const POINT in_ptFirst, const POINT in_ptSecond);
INT DrawConsole(const POINT in_Pos);
BOOL IsOnPanel(const POINT in_Pos);
INT DrawGrid();
INT AttachAxis(CAxis in_oAxis);
CRect GetClientRect();
//--------------------------------------------
//contructor/~destructor
CDisplayPanel();
CDisplayPanel(CDC* pDC);
virtual ~CDisplayPanel();
VOID SetSignalPen(LOGPEN in_lgPen);
LOGPEN GetSignalPen();
VOID SetGridPen(LOGPEN in_lgPen);
LOGPEN GetGridPen();
VOID SetConsolePen(LOGPEN in_lgPen);
LOGPEN GetConsolePen();
VOID SetDisplayFrame(CRect in_Frame){m_rcFrame = in_Frame;}
COLORREF GetBackColor(){ return m_crBackground;}
CDC* m_pDC;
CAxis m_oHorizontalAxis; //Horizontal axis
CAxis m_oVerticalAxis; //Vertical axis
private:
BOOL m_isPowerOn;
CDisplaySource* m_pDS;
INT attachTopAxis(const CAxis in_Axis);
INT attachBottomAxis(const CAxis in_Axis);
INT attachLeftAxis(const CAxis in_Axis);
INT attachRightAxis(const CAxis in_Axis);
VOID initValue();
CRect m_rcFrame; //general frame
COLORREF m_crBackground; //display background
LOGPEN m_lgpSignal; //pen to draw signal lines
LOGPEN m_lgpGrid; //pen to draw grid
LOGPEN m_lgpConsole; //pen to draw console lines
protected:
CPoint offsetFromOrg(CSize in_szSize);
CPoint getPointFromValue(DOUBLE in_dX, DOUBLE in_dFX);
INT displaySpectrum();
INT displayWaveform();
INT m_iSourceType;
INT drawBoundary();
INT drawAxis();
VOID drawVerticalLines();
VOID drawHorizontalLines();
};
#endif // !defined(AFX_DISPLAYPANEL_H__3CB83ED0_7A87_4023_9237_B316113474BC__INCLUDED_)