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

📄 quincy.h

📁 一个完全使用MFC框架开发的C++编译器的代码。功能十分强大可以编译大型程序。
💻 H
📖 第 1 页 / 共 2 页
字号:
	COLORREF CommentColor() const
		{ return m_commentcolor; }
	COLORREF StringColor() const
		{ return m_stringcolor; }
	bool StrictANSI() const
		{ return m_bStrict; }

	bool SelectFolder(const char* title, CString* strpath);

	// ---- help methods
	CString QuincyHtmlPath() const
		{ return m_strQuincyInstallPath + "\\html\\quincy2002\\"; }
	void HtmlHelp(char* htmfile, int name);

	// --- beautifier methods
	int BeautifierStyle() const
		{ return m_style; }
	CString BeautifierCommand() const
		{ return m_command; }
	void SetBeautifierStyle(int style)
		{ m_style = style; }
	void SetBeautifierCommand(CString& command)
		{ m_command = command; }

	bool BeautifierIsInstalled() const
		{ return m_bAStyleIsInstalled; }

#ifdef TYCPP
	// ----- tutorial methods
	void ReadTutorial();
	void WriteTutorial(const CString& strTutorial);
	bool IsTutorial(const CString& strFileName);
	void LoadTutorials();
	void CreateTutorialDialog();
	void OpenTutorial(const CString& strTut);
	void SetTutorialDisplay(bool bOnOff)
		{  m_bTutorialDisplayed = bOnOff; }

#endif

	// ----- compiler methods
	Compiler& GetCompiler()
		{ ASSERT(m_pCompiler != 0); return *m_pCompiler; }
	int CompareFileTimes(CString& strFile1, CString& strFile2);
	bool SelectFileAndLine(const CString& strFile, int nline);
	void SelectErrorLine(int nsel);
	void SelectGrepLine(int nsel);
	bool CanCompile() const
		{ return m_bCompilerIsInstalled; }
	bool IsLibraryTarget();
	bool IsGUITarget();
	bool IsDLLTarget();
	bool IsProjectFileLoaded();
	void SetBuildingCPP(bool bSet);
	bool CompileRunning() const;
	const CString& RIncludePath() const
		{ return m_strRIncludePath; }
	const CString& ToolsPath() const
		{ return m_strToolsPath; }
	const CString& LCCPath() const
		{ return m_strLCCPath; }
	bool IsAddingDebugInfo() const
		{ return m_bDebugging; }
	int OptimizeLevel() const
		{ return m_nOptimize; }
	bool IncludeRTTI() const
		{ return m_bRTTI; }
	bool IncludeExceptions() const
		{ return m_bExceptions; }
	const CString& IncludePath() const
		{ return m_strIncludePath; }
	const CString& CmdLineOptions() const
		{ return m_strCmdLineOptions; }
	const CString& LibPath() const
		{ return m_strLibPath; }
	const CString& StartupCode() const
		{ return m_strStartupCode; }
	const CString& QuincyBinPath() const
		{ return m_strQuincyBinPath; }
	const CString& QuincyInstallPath() const
		{ return m_strQuincyInstallPath; }
	CString GdbPath() const
		{ 
			return m_strDebugger;
/*
#ifdef CYGWIN_GDB
			m_strQuincyInstallPath + "\\gdb\\"; 
#else
			m_strToolsPath;
#endif
*/
		}
	void CloseErrorLog();

	// ----- executor methods
	void GetCommandLine(CString& strCmdLine);
	CString GetProjectRuntimeDirectory();
	const CString& GetRuntimeDirectory() const
		{ return m_strRuntimeDirectory; }
	const CString& GetTemporaryDirectory() const
		{ return m_strTempPath; }
	void ChangeToRuntimeDirectory(CString& strCmd);
	bool IsConsoleApplication();
	void ParseFileSpec(CString& strFileSpec, CString& strCmdLine, int nIndex);

	// ------ editor methods
	void ShowLineColumn(int nLine, int nColumn);
	int FontHeight() const 
		{ return m_fontheight; }
	int FontWidth()  const 
		{ return m_fontwidth; }
	int FontWeight() const 
		{ return m_fontweight; }
//	char* FontFace()
//		{ return m_fontface.GetBuffer(0); }
	void SetFontHeight(int ht) 
		{ m_fontheight = ht; }
	void SetFontWidth(int wd) 
		{ m_fontwidth = wd; }
	void SetFontWeight(int wt) 
		{ m_fontweight = wt; }
//	void SetFontFace(const char* f)
//		{ m_fontface = f; }

	// ------- debugger methods
	void StartProgram(CString& strCmd);
	void DebugProgram(CString strCmd, bool bStepping = false);
	bool TestProgramChanged();
	bool StepProgram();
	void StepOut();
	bool StepTo(const CString& strFile, int nLineNo);
	bool StopDebugging();
	bool ExecuteRunningProgram();
	Debugger* GetDebugger(bool bVerify = true) const;
//	const CString& WorkingPath() const;
	void StopDebugger();
	void SetStepping() { stepping = true; }

	// ------- gdb interface methods
	void CreateGdbConsole();
	GdbConsole* GetGdbConsole() { return m_pdlgGdbConsole; }
	void DisplayGdbText(char* txt);
	void AppendNextText()
		{ appendnexttext = true; }
	void ClearGdbConsole();

	// ----- breakpoint methods
	void ToggleBreakpoint(const CString& strFile, int nLineNo);
	void AddBreakpoint(const CString& strFile, int nLineNo);
	int BreakpointCount() const
		{ return breakpoints.size(); }
	void AdjustTextLine(const CString& strFile, int nLineno, int nAdjust);
	void DeletedTextLine(const CString& strFile, int nLineno)
		{ AdjustTextLine(strFile, nLineno, -1); }
	void InsertedTextLine(const CString& strFile, int nLineno)
		{ AdjustTextLine(strFile, nLineno, 1); }
	bool IsBreakpoint(const CString& strFile, int nLineno);
	std::set<Breakpoint>& GetProgrammedBreakpoints()
		{ return breakpoints; }
	void ClearBreakpoints()
		{ breakpoints.clear(); }
	Breakpoint SteptoBreakpoint();

	// ------ watch and examine methods
	void CreateWatchWindow();
	void GetVariableValue(const CString& strVarName, CWnd* wnd = 0);
	void SetVariableValue(const CString& strVarName, const CString& strVarValue);
	CWatchDialog* GetWatchDialog() { return m_pdlgWatch; }
	void PostWatchList();

	// ------ command line console methods
	CString Enquote(const CString& str) const;


	void RegisterView(CEditorView* pView)
		{ m_pEditorView = pView; }

	CEditorView* GetEditorView() const
		{ return m_pEditorView; }

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CQuincyApp)
	public:
	virtual BOOL InitInstance();
	virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName);
	virtual BOOL OnIdle(LONG lCount);
	virtual int ExitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CQuincyApp)
	afx_msg void OnAppAbout();
	afx_msg void OnStop();
	afx_msg void OnUpdateStop(CCmdUI* pCmdUI);
	afx_msg void OnOptions();
	afx_msg void OnUpdateDebugClearbreakpoints(CCmdUI* pCmdUI);
	afx_msg void OnDebugClearbreakpoints();
	afx_msg void OnDebugStepover();
	afx_msg void OnUpdateDebugExamine(CCmdUI* pCmdUI);
	afx_msg void OnDebugExamine();
	afx_msg void OnDebugWatch();
	afx_msg void OnUpdateDebugStepover(CCmdUI* pCmdUI);
	afx_msg void OnHelp();
	afx_msg void OnResourceeditor();
	afx_msg void OnGrep();
	afx_msg void OnUpdateGrep(CCmdUI* pCmdUI);
	afx_msg void OnUpdateResourceeditor(CCmdUI* pCmdUI);
	afx_msg void OnFileOpen();
	afx_msg void OnFilePrintSetup();
	afx_msg void OnViewGdbconsole();
	afx_msg void OnUpdateHelp(CCmdUI* pCmdUI);
	afx_msg void OnUpdateProperties(CCmdUI* pCmdUI);
	afx_msg void OnProperties();
	//}}AFX_MSG
#ifdef TYCPP
	afx_msg void OnTycpp();
	afx_msg void OnUpdateTycpp(CCmdUI* pCmdUI);
	afx_msg void OnWritetutorial();
#endif
	DECLARE_MESSAGE_MAP()
};

extern CQuincyApp theApp;

inline void CQuincyApp::SetBypassChangeTest()
{
	m_bBypassChangeTest = true;
}
inline Debugger* CQuincyApp::GetDebugger(bool bVerify) const
{
	if (bVerify)
		ASSERT(m_pDebugger);
	return m_pDebugger;
}
/*
inline const CString& CQuincyApp::WorkingPath() const
{
	return m_strWorkingPath;
}
*/
/////////////////////////////////////////////////////////////////////////////

#endif // QUINCY_H

⌨️ 快捷键说明

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