[100] | 1 | // LispEditorView.h : interface of the CLispEditorView class
|
---|
| 2 | //
|
---|
| 3 | /////////////////////////////////////////////////////////////////////////////
|
---|
| 4 |
|
---|
| 5 | #if !defined(AFX_LISPEDITORVIEW_H__C831F1E9_94CD_4C14_A9DF_55E565119862__INCLUDED_)
|
---|
| 6 | #define AFX_LISPEDITORVIEW_H__C831F1E9_94CD_4C14_A9DF_55E565119862__INCLUDED_
|
---|
| 7 |
|
---|
| 8 | #if _MSC_VER > 1000
|
---|
| 9 | #pragma once
|
---|
| 10 | #endif // _MSC_VER > 1000
|
---|
| 11 |
|
---|
| 12 | class CLispEditorCntrItem;
|
---|
| 13 |
|
---|
| 14 | class CLispEditorView : public CRichEditView
|
---|
| 15 | {
|
---|
| 16 | protected: // create from serialization only
|
---|
| 17 | CLispEditorView();
|
---|
| 18 | DECLARE_DYNCREATE(CLispEditorView)
|
---|
| 19 |
|
---|
| 20 | // Attributes
|
---|
| 21 | public:
|
---|
| 22 | CLispEditorDoc* GetDocument();
|
---|
| 23 | CHARFORMAT DefaultCF;
|
---|
| 24 | long LastOpenParenIndex, LastCloseParenIndex;
|
---|
| 25 | // Operations
|
---|
| 26 | public:
|
---|
| 27 |
|
---|
| 28 | // Overrides
|
---|
| 29 | // ClassWizard generated virtual function overrides
|
---|
| 30 | //{{AFX_VIRTUAL(CLispEditorView)
|
---|
| 31 | public:
|
---|
| 32 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
|
---|
| 33 | protected:
|
---|
| 34 | virtual void OnInitialUpdate(); // called first time after construct
|
---|
| 35 | virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
|
---|
| 36 | //}}AFX_VIRTUAL
|
---|
| 37 |
|
---|
| 38 | // Implementation
|
---|
| 39 | public:
|
---|
| 40 | void MatchParen(long Pos);
|
---|
| 41 | long FindNextCloseParen();
|
---|
| 42 | long IsPosQuoted(long Pos);
|
---|
| 43 | long IsPosCommented(long Pos);
|
---|
| 44 | void FormatWord(int Type, long Start, long End);
|
---|
| 45 | void ColorRange(long Start, long End);
|
---|
| 46 | CString GetCurrentWord(long &lFirst, long &lLast);
|
---|
| 47 | long FindPrevOpenParen();
|
---|
| 48 | virtual ~CLispEditorView();
|
---|
| 49 | #ifdef _DEBUG
|
---|
| 50 | virtual void AssertValid() const;
|
---|
| 51 | virtual void Dump(CDumpContext& dc) const;
|
---|
| 52 | #endif
|
---|
| 53 |
|
---|
| 54 | protected:
|
---|
| 55 |
|
---|
| 56 | // Generated message map functions
|
---|
| 57 | protected:
|
---|
| 58 | //{{AFX_MSG(CLispEditorView)
|
---|
| 59 | afx_msg void OnDestroy();
|
---|
| 60 | afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
|
---|
| 61 | afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
|
---|
| 62 | afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
|
---|
| 63 | //}}AFX_MSG
|
---|
| 64 | DECLARE_MESSAGE_MAP()
|
---|
| 65 | };
|
---|
| 66 |
|
---|
| 67 | #ifndef _DEBUG // debug version in LispEditorView.cpp
|
---|
| 68 | inline CLispEditorDoc* CLispEditorView::GetDocument()
|
---|
| 69 | { return (CLispEditorDoc*)m_pDocument; }
|
---|
| 70 | #endif
|
---|
| 71 |
|
---|
| 72 | /////////////////////////////////////////////////////////////////////////////
|
---|
| 73 |
|
---|
| 74 | //{{AFX_INSERT_LOCATION}}
|
---|
| 75 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
---|
| 76 |
|
---|
| 77 | #endif // !defined(AFX_LISPEDITORVIEW_H__C831F1E9_94CD_4C14_A9DF_55E565119862__INCLUDED_)
|
---|