⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tonfaview.h

📁 正规(则)表达式转化为NFA
💻 H
字号:
// TONFAView.h : interface of the CTONFAView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TONFAVIEW_H__6EBFD430_DB07_4FBB_880D_2AF6EC63E286__INCLUDED_)
#define AFX_TONFAVIEW_H__6EBFD430_DB07_4FBB_880D_2AF6EC63E286__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TONFADoc.h"

#include "LinkList.h"
#include "StateTable.h"


struct SetPosition
{
	int num;
	int LO;
	int LOx;
	int LOy;
};

class CTONFAView : public CScrollView
{
protected: // create from serialization only
	CTONFAView();
	DECLARE_DYNCREATE(CTONFAView)
	void MyDraw(CDC *pDC);
// Attributes
public:
	CTONFADoc* GetDocument();
	SetPosition SetNFAPos,SetDFAPos,SetMINPos;
	CRgn m_NFA,m_TABLE,m_DFA,m_MINDFA,m_MINTABLE;
	bool LBtnDown;
    int flag,moveflag;
	bool IsInit;//如果是初始化 为true
	CPoint op;//旧点位置
	void InitNFAPosition(StateTable &table);
	void InitDFAPosition(StateTable &table);
	void InitMINPosition(StateTable &table);
	bool m_Move;
	bool m_Zoom;
	bool m_TBarNFA;
	bool m_TBarDFA;
	bool m_TBarTABLE;
	bool m_TBarMINDFA;
	bool m_TBarMINTABLE;
	int DFA_TABLE_LEFT,DFA_TABLE_TOP,DFA_TABLE_WIDTH,DFA_TABLE_HEIGHT;
	int DFA_MINTABLE_LEFT,DFA_MINTABLE_TOP,DFA_MINTABLE_WIDTH,DFA_MINTABLE_HEIGHT;
	// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTONFAView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	void DrawNFA(CDC* pDC);
	void DrawTABLE(CDC* pDC);
	void DrawDFA(CDC* pDC);
	void DrawMINTABLE(CDC* pDC);
	void DrawMINDFA(CDC* pDC);
	virtual ~CTONFAView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CTONFAView)
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMove();
	afx_msg void OnUpdateMove(CCmdUI* pCmdUI);
	afx_msg void OnZoom();
	afx_msg void OnUpdateZoom(CCmdUI* pCmdUI);
	afx_msg void OnNfa();
	afx_msg void OnUpdateNfa(CCmdUI* pCmdUI);
	afx_msg void OnTable();
	afx_msg void OnUpdateTable(CCmdUI* pCmdUI);
	afx_msg void OnDfa();
	afx_msg void OnUpdateDfa(CCmdUI* pCmdUI);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnMintable();
	afx_msg void OnUpdateMintable(CCmdUI* pCmdUI);
	afx_msg void OnMin();
	afx_msg void OnUpdateMin(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in TONFAView.cpp
inline CTONFADoc* CTONFAView::GetDocument()
   { return (CTONFADoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TONFAVIEW_H__6EBFD430_DB07_4FBB_880D_2AF6EC63E286__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -