| | |
| | |
|
| | | #include <memory>
|
| | | #include <vector>
|
| | | #include <stack>
|
| | |
|
| | | #include "MTerm1Doc.h"
|
| | | class CMTerm1View : public CScrollView
|
| | |
| | | typePN=15, //下降沿
|
| | | typeNOT=16,
|
| | | typeDF = 17,
|
| | |
|
| | | typeDF_ = 18,
|
| | | typeOUT=19,
|
| | | typeSET=20,
|
| | |
| | | return 0;
|
| | | }
|
| | | };
|
| | | std::pair<int, int> popsPoint[100];
|
| | | |
| | | int nPSHS = -1;
|
| | | bool firstCoil = true;//本段第一个单元格
|
| | |
|
| | | bool isPops = false;
|
| | | int m_nTotalRow=0;
|
| | | bool m_bMonitoring = false; //监控中
|
| | | bool m_bShowComments = true; //显示注释
|
| | |
| | | int m_TopMargin = 0;
|
| | | int m_LeftMargin = 54; //左侧边距
|
| | | int m_CellPerLine = 16; //每行单元数
|
| | | int m_CellWidth = 64; //单元宽度
|
| | | int m_CellWidth = 64; //单元宽度
|
| | | int m_CellHeight = 28; //单元高度
|
| | | int m_CommentHeight = 32; //注释高度
|
| | |
|
| | | int m_LinePosY = 20; //元件显示位置
|
| | |
|
| | | int m_FocusRow = 0; //焦点行列位置
|
| | | int m_FocusRow = 0; //焦点行列位置
|
| | | int m_FocusCol = 0;
|
| | |
|
| | | int m_oldFocusRow = 0;
|
| | | int m_oldFocusCol = 0;
|
| | | int m_nCurProgStep = 0;
|
| | |
| | |
|
| | | void DrawCell(CDC* pDC, int nRow, int nCol);
|
| | | int TransProgToLDS();
|
| | |
|
| | | /// <summary>
|
| | | /// Flag::是否需要重绘视图,默认为1=>true
|
| | | /// </summary>
|
| | | int needReDraw = 1;
|
| | |
|
| | | int DoReDraw();
|
| | |
| | | int ScrollCellIntoView(int nRow, int nCol);
|
| | | int isCellInView(int nRow, int nCol);
|
| | | int CellFocusChg(int nRow, int nCol);
|
| | |
|
| | | std::pair<int, CString> CMTerm1View::LDSCheckRule();
|
| | |
|
| | | // 重写
|
| | | public:
|
| | |
| | | afx_msg void OnInputIoComment();
|
| | | afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
|
| | | int ScanLDSCells(int nStartLine, int nEndLine, int nPosY, int nPosX, int nLevel, stProgSection & progsec, CString & sProgSec, int &nSteps);
|
| | | void SetCellToView(stCell cell1);
|
| | |
|
| | | int ScanLDSCells2(int nStartLine, int nEndLine, int nPosY, int nPosX, int nSizeX, int nLevel, stProgSection& progsec, CString& sProgSec, int& nSteps);
|
| | | int CMTerm1View::Translate2Prog(
|
| | | int nType, int nCurPosY, int nCurPosX, CString sCellName,
|
| | | stProgSection& progsec, CString& sProgSec, int& nSteps);
|
| | | void SetCellToView(stCell cell1, int flag = 0);//modify0919zxd
|
| | | |
| | | };
|
| | |
|
| | | #ifndef _DEBUG // MultiTerminal2View.cpp 中的调试版本
|