visualjava.h

来自「用bcg库编写的java IDE 源码」· C头文件 代码 · 共 171 行

H
171
字号
// VisualJava.h : main header file for the VISUALJAVA application
//

#if !defined(AFX_VISUALJAVA_H__8AD1AD11_16D0_49D7_AA28_173ABC014520__INCLUDED_)
#define AFX_VISUALJAVA_H__8AD1AD11_16D0_49D7_AA28_173ABC014520__INCLUDED_

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

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

#define REGISTRY_ROOT	_T("SOFTWARE\\BugfreeSoft\\VisualJava\\");

/////////////////////////////////////////////////////////////////////////////
// CVisualJavaApp:
// See VisualJava.cpp for the implementation of this class
//
class CVisualJavaDoc;
class CWorkSpace;
class CCodeTemplate;
class CToolRunner;
class CJavaDeclManager;
struct __DeclBound;
struct XMLelement;
class CJavaTextBuffer;
class CJavaBlockDecl;

#define EP_OPEN_LAST_DOCS 1
#define EP_CREATE_NEW_DOC_NEVER 0
#define EP_CREATE_NEW_DOC_ALWAYS 2
#define EP_CREATE_NEW_DOC_IF_ALONE 4
#define EP_MAXIMIZE_FRAME_WND 8
#define EP_MAXIMIZE_CHILD_WND 16
#define EP_SAVE_DOCS_ON_EXIT 32
#define EP_SAVE_SETS_ON_EXIT 64
#define EP_DRAG_N_DROP_EDIT 128
#define EP_AUTO_RELOAD 256
#define EP_NOTIFY_CHANGES 512
#define EP_ADVANCED_UI 1024
#define EP_OPEN_LAST_PRJ 2048
#define EP_NO_SPLASH 4096
#define EP_REMEMBER_LASTPOS 8192


const int iIdTestView	= 1;
const int iIdTest2View	= 2;

struct back_to_front_map
{
    CString m_strFile;
	UINT m_nThreadID;
};

struct __CEditContext
{
     int m_nStartChar,m_nStartLine,
     m_nEndChar,m_nEndLine;
     char* m_pszText;
	 __CEditContext();
	 __CEditContext(int startchar,int startline,int endchar,int endline,char* pchar);
     ~__CEditContext();
};

class CVisualJavaApp : public CWinApp
{
public:
	CVisualJavaDoc* GetDocument(CString szpPath,CDocTemplate* pTemplate = NULL);
	CVisualJavaApp();
	virtual ~CVisualJavaApp();
    CRecentFileList* getMRUlist(){return m_pRecentFileList;}
   static CList<CJavaDeclManager*,CJavaDeclManager*> m_lGlobalDeclarationList;

    
	CString m_strAPIPath;
    DWORD m_dwFlags;
    CString m_sLastDocs;
    CList<CString, LPCTSTR> m_lstProjects;
    static CWorkSpace *m_pCurWorkSpace;
	static CString m_strCurrentProject;
	CCodeTemplate *m_pCodeTemplates;
	CToolRunner   *m_pToolRunner;
    DWORD GetFlags ();
    void SetFlags (DWORD dwFlags);

    void LoadSettings ();
    void LoadLastDocs ();
    void SaveSettings ();
    void SaveLastDocs ();

	void LoadCustomState ();
	void SaveCustomState ();
	BOOL ShowPopupMenu (UINT uiMenuResId, const CPoint& point, CWnd* pWnd);
	BOOL OnViewDoubleClick (int iViewId);
    void CreateProject(CString szpName,CString szpPath,BOOL bCreateWorkSpc,
		UINT nProjectType,UINT nAppType =0,UINT nFrmType = 0);
	void CreateNewFile(CString szpName,CString szpPath,CString szpProject,CString szpExt);
	void CreateWorkSpc(CString szpName,CString szpPath);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CVisualJavaApp)
	public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	//}}AFX_VIRTUAL
    void ParseCommandLine(CCommandLineInfo &rCmdInfo); //  by Serge Weinstock
    CString	m_OneArg;
    CDocument *OpenDocumentFileEx (LPCTSTR lpszFileName, int nType);
	void OpenDocumentFileEx(CJavaTextBuffer*,LPCTSTR lpszFileName,int nType);

	afx_msg void OnFileNew();
	afx_msg void OnFileOpen();
	afx_msg void OnTipOfTheDay();
    afx_msg void OnAppAbout ();
	afx_msg void OnFileSaveAll();
    void OnAddToProjectView(DWORD);
	void OnRemoveFromProjectView(DWORD,DWORD);
	void OnAddHeaderItem(WPARAM,LPARAM);
	void OnMoveBlockInView(DWORD);
	void OnRemoveHeaderItem(WPARAM wParam,LPARAM lParam);
// Implementation
	//{{AFX_MSG(CVisualJavaApp)
	afx_msg void OnFileNewproject();
	afx_msg void OnUpdateFileNewproject(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	
	CBCGKeyboardManager		m_KeyboardManager;
	CBCGContextMenuManager	m_ContextMenuManager;
	CBCGMouseManager		m_MouseManager;

public:
	CDocTemplate* GetJavaDocTemplate();
	void LoadJavaApi();
	
    static void Tokenize(CStringList* plOutPut,CString strString,char nDelim);
	#define XMLELEMENT_LIST CList<XMLelement*,XMLelement*>
	static void LoadXML(CString strPath,XMLELEMENT_LIST* pOutList);
	static void DestroyXML(XMLELEMENT_LIST* pOutList);

	void AddJavaDocToTemplate(CDocument*);
	void MoveChildren(CJavaBlockDecl*);

    static void      addDeclMgr(CJavaDeclManager*);
    static void      removeDeclMgr(CJavaDeclManager*);
    static void      findAndFree(CString strSource);
    static CJavaDeclManager*      findDeclMgr(CString strSrcFile);
	void OnAddDeclMgr(DWORD);

	static CList<back_to_front_map*,back_to_front_map*> m_lParsingMap;
	static void AddBFmap(back_to_front_map*);
	static void RemoveBFmap(back_to_front_map*);
	static void SendEditMsg(CString strFile,const UINT msgID,__CEditContext* pContext);
};

BOOL BuildTypePath(CJavaDeclManager* pDeclMgr,CString,CString &strType);

extern CVisualJavaApp theApp;

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

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

#endif // !defined(AFX_VISUALJAVA_H__8AD1AD11_16D0_49D7_AA28_173ABC014520__INCLUDED_)

⌨️ 快捷键说明

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