MFC-Simulator/TestSimulator/TestSimulatorDlg.h

117 lines
3.6 KiB
C
Raw Normal View History

2023-02-03 03:07:52 +01:00
// TestSimulatorDlg.h : <20><><EFBFBD>Y<EFBFBD><59>
//
#pragma once
#include "BlockBasis.h"
#include "BlockIn.h"
#include "BlockOut.h"
#include "BlockAnd.h"
#include "BlockOr.h"
#include "BlockNot.h"
#include "BlockFun.h"
#include "InputDlg.h"
#include "FunDlg.h"
#include "OscDlg.h"
#include "Complex.h"
#include <vector>
#include <deque>
// CTestSimulatorDlg <20><><EFBFBD>ܤ<EFBFBD><DCA4><EFBFBD>
class CTestSimulatorDlg : public CDialogEx
{
// <20>غc
public:
CTestSimulatorDlg(CWnd* pParent = NULL); // <20>зǫغc<D8BA>
// <20><><EFBFBD>ܤ<EFBFBD><DCA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
enum { IDD = IDD_TESTSIMULATOR_DIALOG };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20>
private:
std::vector <CBlockBasis*> m_vcBlkContainer; //<2F>s<EFBFBD>񤣦PBlock<63><6B>vector
CRect m_rcWork; //<2F>u<EFBFBD>@<40><>
CRect m_rcClient; //<2F><><EFBFBD>ܲ<EFBFBD><DCB2>Ȥ<EFBFBD><C8A4><EFBFBD>
CPoint m_ptLEnd; //<2F>s<EFBFBD>u<EFBFBD><75><EFBFBD>u<EFBFBD>q<EFBFBD><71><EFBFBD>I
COscDlg* m_pOscDlg; //<2F>ܪi<DCAA><69><EFBFBD><EFBFBD><EFBFBD>ܲ<EFBFBD><DCB2><EFBFBD><EFBFBD><EFBFBD>
CDC m_dcBgPic; //<2F>s<EFBFBD><73><EFBFBD>I<EFBFBD><49><EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD>dc
CBitmap m_bitmapBgPic; //<2F>s<EFBFBD><73><EFBFBD>I<EFBFBD><49><EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD>bitmap
CBitmap* m_pOldBitmap; //<2F><><EFBFBD>V<EFBFBD><56>bitmap<61><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
CString m_strPicPath; //<2F>I<EFBFBD><49><EFBFBD>Ϥ<EFBFBD><CFA4><EFBFBD><EFBFBD>|
COLORREF m_clrBg; //<2F>I<EFBFBD><49><EFBFBD>C<EFBFBD><43>
BOOL m_bInitDlg; //<2F>P<EFBFBD>_<EFBFBD><5F><EFBFBD>ܵ<EFBFBD><DCB5><EFBFBD><EFBFBD>l<EFBFBD><6C>
BOOL m_bSelectBlk; //<2F>P<EFBFBD>_Block<63><6B><EFBFBD><EFBFBD>
BOOL m_bMoveBlk; //<2F>P<EFBFBD>_Block<63><6B><EFBFBD><EFBFBD>
BOOL m_bLineMode; //<2F>P<EFBFBD>_<EFBFBD>e<EFBFBD>u<EFBFBD>Ҧ<EFBFBD>
BOOL m_bConnect; //<2F>P<EFBFBD>_<EFBFBD>s<EFBFBD>u
BOOL m_bDelBlk; //<2F>P<EFBFBD>_Block<63>R<EFBFBD><52>
BOOL m_bBgPic; //<2F>P<EFBFBD>_<EFBFBD><5F><EFBFBD>J<EFBFBD>I<EFBFBD><49><EFBFBD>Ϥ<EFBFBD>
BOOL m_bGrid; //<2F>P<EFBFBD>_<EFBFBD><5F><EFBFBD>I<EFBFBD><49><EFBFBD><EFBFBD>
BOOL m_bLock; //<2F>P<EFBFBD>_<EFBFBD><5F><EFBFBD>w<EFBFBD><77><EFBFBD>I
int m_iWorkLeft; //<2F>u<EFBFBD>@<40>ϥ<EFBFBD><CFA5><EFBFBD><EFBFBD>y<EFBFBD><79>
int m_iWorkTop; //<2F>u<EFBFBD>@<40>ϤW<CFA4><57><EFBFBD>y<EFBFBD><79>
int m_iWorkRight; //<2F>u<EFBFBD>@<40>ϥk<CFA5><6B><EFBFBD>y<EFBFBD><79>
int m_iWorkBottom; //<2F>u<EFBFBD>@<40>ϤU<CFA4><55><EFBFBD>y<EFBFBD><79>
int m_iBlkWidth; //Block<63>e<EFBFBD><65>
int m_iBlkHeight; //Block<63><6B><EFBFBD><EFBFBD>
int m_iGridX; //X<><58><EFBFBD>V<EFBFBD><56><EFBFBD>I<EFBFBD><49><EFBFBD>j
int m_iGridY; //Y<><59><EFBFBD>V<EFBFBD><56><EFBFBD>I<EFBFBD><49><EFBFBD>j
int m_iContainerSize; //<2F>s<EFBFBD><73>Block<63><6B>vector<6F>j<EFBFBD>p
int m_iSlctBlkNum; //<2F><><EFBFBD><EFBFBD>Block<63>s<EFBFBD><73>
int m_iHeadBlkNum; //<2F>s<EFBFBD><73>Block<63>s<EFBFBD><73>
int m_iSimBlkNum; //<2F><><EFBFBD><EFBFBD>Block<63>s<EFBFBD><73>
int m_iOutSize; //<2F><><EFBFBD><EFBFBD>Block<63><6B>channel<65>ƥ<EFBFBD>
// <20>{<7B><><EFBFBD>X<EFBFBD><58><EFBFBD>@
protected:
HICON m_hIcon;
// <20><><EFBFBD>ͪ<EFBFBD><CDAA>T<EFBFBD><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual BOOL OnInitDialog ();
afx_msg void OnSysCommand (UINT nID, LPARAM lParam);
afx_msg void OnPaint ();
afx_msg HCURSOR OnQueryDragIcon ();
DECLARE_MESSAGE_MAP ()
public:
std::deque <std::deque <double> > m_deq2DOutputValue; //<2F>s<EFBFBD><73>output value<75><65>deque
BOOL m_bSimulate; //<2F>P<EFBFBD>_<EFBFBD><5F><EFBFBD><EFBFBD><EFBFBD>Ҧ<EFBFBD>
int m_iStep; //<2F><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD><69><EFBFBD>B<EFBFBD><42>
afx_msg void OnBnClickedButtonIn ();
afx_msg void OnBnClickedButtonOut ();
afx_msg void OnBnClickedButtonAnd ();
afx_msg void OnBnClickedButtonOr ();
afx_msg void OnBnClickedButtonNot ();
afx_msg void OnBnClickedButtonFunction ();
afx_msg void OnBnClickedButtonLine ();
afx_msg void OnBnClickedButtonSimulate ();
afx_msg void OnBnClickedButtonGrid ();
afx_msg void OnBnClickedButtonLock ();
afx_msg void OnBnClickedButtonBgpic ();
afx_msg void OnBnClickedButtonBgcolor ();
afx_msg void OnBnClickedButtonOpen ();
afx_msg void OnBnClickedButtonSave ();
afx_msg void OnLButtonDown (UINT nFlags, CPoint ptCursor);
afx_msg void OnMouseMove (UINT nFlags, CPoint ptCursor);
afx_msg void OnLButtonUp (UINT nFlags, CPoint ptCursor);
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point);
afx_msg void OnTimer (UINT_PTR nIDEvent);
afx_msg void OnSize (UINT nType, int cx, int cy);
virtual BOOL PreTranslateMessage (MSG* pMsg);
afx_msg void OnDestroy ();
void SplitString (CString, char, CStringArray&);
void Resize (int nID, double dMulWid, double dMulHei);
void Resize (CBlockBasis* pBlk, double dMulWid, double dMulHei);
int GetComputationLayers (int iDataSize);
double FFT (const std::deque <double> &, int, double);
};