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

📄 cedtview.h

📁 Crimson编辑器的英文版,完成从韩文版变成英文版的移植,并且附带可执行文件和注册表文件,无需原先的安装包,是改写编辑器的最理想选择.
💻 H
📖 第 1 页 / 共 3 页
字号:
	void FormatScreenText();
	void FormatScreenText(INT nIndex, INT nCount);

	void FormatPrintText(CDC * pDC, RECT rectDraw);
	void FormatPrintText(CDC * pDC, RECT rectDraw, INT nIdxY, INT nCount);

	void RemoveScreenText(INT nIndex, INT nCount);
	void InsertScreenText(INT nIndex, INT nCount);

protected:
	INT   GetWordWidth(LPCTSTR lpWord, SHORT siLength, INT nPosition, UCHAR ucType, CDC * pDC = NULL);
	SHORT GetWordIndex(LPCTSTR lpWord, SHORT siLength, INT nWidth, CDC * pDC = NULL);

	POSITION FindScreenTextIndex(INT nIndex);
	POSITION FlattenScreenTextAt(POSITION pos);
	POSITION RemoveScreenTextAt(POSITION pos);


protected: // *** cedtViewMap.cpp ***
	INT GetLastIdxY();
	INT GetLastPosY();

	INT GetFirstIdxX(CAnalyzedString & rLine);
	INT GetFirstIdxX(CFormatedString & rLine);
	INT GetLastIdxX(CAnalyzedString & rLine);
	INT GetLastIdxX(CFormatedString & rLine);
	INT GetFirstNonBlankIdxX(CAnalyzedString & rLine);
	INT GetTrailingBlankIdxX(CAnalyzedString & rLine);

	INT GetNextTabPosition(INT nPosX);			
	INT GetPrevTabPosition(INT nPosX);
	INT GetFirstPosX(CFormatedString & rLine);
	INT GetLastPosX(CFormatedString & rLine);
	INT GetFirstNonBlankPosX(CFormatedString & rLine);
	INT GetTrailingBlankPosX(CFormatedString & rLine);

	CAnalyzedString & GetLineFromIdxY(INT nIdxY);
	CFormatedString & GetLineFromPosY(INT nPosY);

	ANALYZEDWORDINFO & GetWordFromIdxX(CAnalyzedString & rLine, INT nIdxX);
	FORMATEDWORDINFO & GetWordFromPosX(CFormatedString & rLine, INT nPosX);
	FORMATEDWORDINFO & GetWordFromIdxX(CFormatedString & rLine, INT nIdxX);

	INT GetIdxYFromPosY(INT nPosY);
	INT GetIdxXFromPosX(CFormatedString & rLine, INT nPosX, BOOL bAdjust = TRUE);
	INT GetIdxXFromPosX(CFormatedString & rLine, FORMATEDWORDINFO & rWord, INT nPosX, BOOL bAdjust = TRUE);

	INT GetPosYFromIdxY(INT nIdxX, INT nIdxY, BOOL bAdjust = TRUE);
	INT GetPosXFromIdxX(CFormatedString & rLine, INT nIdxX, BOOL bAdjust = TRUE);
	INT GetPosXFromIdxX(CFormatedString & rLine, FORMATEDWORDINFO & rWord, INT nIdxX, BOOL bAdjust = TRUE);


public: // *** cedtViewMapAdv.cpp ***
	BOOL IsBlankLine(CAnalyzedString & rLine);
	BOOL IsBlankLineFromIdxY(INT nIdxY);

	BOOL IsBlankLine(CFormatedString & rLine);
	BOOL IsBlankLineFromPosY(INT nPosY);

	void PositionToIndex(INT nPosX, INT nPosY, INT & nIdxX, INT & nIdxY);
	void IndexToPosition(INT nIdxX, INT nIdxY, INT & nPosX, INT & nPosY);

	TCHAR GetCharFromPosX(CFormatedString & rLine, INT nPosX);
	TCHAR GetCharFromIdxX(CFormatedString & rLine, INT nIdxX);

	INT GetNextSegmentIdxX(CFormatedString & rLine, INT nIdxX);
	INT GetPrevSegmentIdxX(CFormatedString & rLine, INT nIdxX);

	INT GetPrevWordIdxX(CFormatedString & rLine, INT nIdxX);
	INT GetNextWordIdxX(CFormatedString & rLine, INT nIdxX);
	INT GetCurrWordRange(CFormatedString & rLine, INT nIdxX, INT & nBegX, INT & nEndX);


protected: // *** cedtViewHndrEdit.cpp ***
	void OnMoveKeyDown(UINT nChar, UINT nFlags);
	void OnCharKeyDown(UINT nChar);
	void OnDBCharKeyDown(UINT nCH1, UINT nCH2);

	void OnImeCompositionStart();
	void OnImeCompositionEnd();
	void OnImeCompositionCompose(LPCTSTR lpszString);
	void OnImeCompositionResult(LPCTSTR lpszString);

	void OnDragAndDrop(HGLOBAL hMemory);
	void OnDragDelete();
	void OnDropEscape();
	void OnDropPaste(HGLOBAL hMemory);

public:
	void OnCommandExecute(INT nCommand);
	void OnMacroReplay(INT nMacro);
	void OnSearchGoTo(INT nLineNumber);


protected: // *** cedtViewHndrMisc.cpp ***
	void OnUpdateCommandExecute(INT nCommand, CCmdUI * pCmdUI);
	void OnUpdateMacroReplay(INT nMacro, CCmdUI * pCmdUI);


protected: // *** cedtViewEvnt.cpp ***
	BOOL EventMoveCaret(UINT nChar, UINT nFlags, BOOL bMacro);

	void EventInsertChar(UINT nChar, BOOL bMacro);
	void EventInsertString(LPCTSTR lpszString, BOOL bMacro);
	void EventInsertFile(LPCTSTR lpszPathName, BOOL bMacro);

	void EventCompositionStart(BOOL bMacro);
	void EventCompositionEnd(BOOL bMacro);
	void EventCompositionCompose(LPCTSTR lpszString, BOOL bMacro);
	void EventCompositionResult(LPCTSTR lpszString, BOOL bMacro);

	void EventCommandEscape(BOOL bMacro);		void EventCommandReturn(BOOL bMacro);
	void EventCommandBack(BOOL bMacro);			void EventCommandDelete(BOOL bMacro);
	void EventCommandTab(BOOL bMacro);			void EventCommandDetab(BOOL bMacro);

	void EventIncreaseIndent(BOOL bMacro);		void EventDecreaseIndent(BOOL bMacro);
	void EventMakeComment(BOOL bMacro);			void EventReleaseComment(BOOL bMacro);
	void EventJoinLines(BOOL bMacro);			void EventSplitLine(BOOL bMacro);

	void EventDeleteWord(BOOL bMacro);			void EventDeletePrevWord(BOOL bMacro);
	void EventDeleteToEndOfLine(BOOL bMacro);	void EventDeleteToBeginOfLine(BOOL bMacro);
	void EventDeleteLine(BOOL bMacro);			void EventDuplicateLine(BOOL bMacro);

	void EventCommandCut(BOOL bMacro);			void EventCommandCopy(BOOL bMacro);
	void EventCommandCopyFilePath(BOOL bMacro);
	void EventCommandCutAppend(BOOL bMacro);	void EventCommandCopyAppend(BOOL bMacro);
	void EventCommandPaste(BOOL bMacro);

	void EventDragDelete(BOOL bMacro);
	void EventDragAdjust(BOOL bMacro);
	void EventDropEscape(BOOL bMacro);
	void EventDropPaste(HGLOBAL hMemory, BOOL bMacro);

	void EventSelectAll(BOOL bMacro);			void EventSelectLine(BOOL bMacro);
	void EventSelectWord(BOOL bMacro);			void EventSelectBlock(BOOL bMacro);

	void EventUpperCase(BOOL bMacro);			void EventLowerCase(BOOL bMacro);
	void EventCapitalize(BOOL bMacro);			void EventInvertCase(BOOL bMacro);

	void EventConvertTabsToSpaces(BOOL bMacro);	void EventConvertSpacesToTabs(BOOL bMacro);
	void EventLeadingSpacesToTabs(BOOL bMacro);	void EventRemoveTrailingSpaces(BOOL bMacro);

	void EventUndoLastAction(BOOL bMacro);		void EventRedoLastUndo(BOOL bMacro);
	void EventEvaluateLine(BOOL bMacro);		void EventReplayMacro(INT nMacro, INT nTimes, BOOL bMacro);

	BOOL EventFindString(LPCTSTR lpszFindString, UINT nOptions, BOOL bMacro);
	BOOL EventReplaceString(LPCTSTR lpszFindString, LPCTSTR lpszReplaceString, UINT nOptions, BOOL bMacro);

	BOOL EventFindCurrentString(BOOL bMacro);
	BOOL EventFindSelectedString(BOOL bMacro);

	BOOL EventSearchNextOccurrence(BOOL bMacro);			
	BOOL EventSearchPrevOccurrence(BOOL bMacro);

	INT  EventReplaceThisOccurrence(BOOL bMacro);
	INT  EventReplaceAllInSelection(BOOL bMacro);
	INT  EventReplaceAllInFile(BOOL bMacro);

	BOOL EventGoToLine(INT nLineNumber, BOOL bMacro);
	BOOL EventToggleBookmark(BOOL bMacro);
	BOOL EventNextBookmark(BOOL bMacro);		BOOL EventPrevBookmark(BOOL bMacro);

	BOOL EventPrevEditingPosition(BOOL bMacro);
	BOOL EventPairsBeginPosition(BOOL bMacro);	BOOL EventPairsEndPosition(BOOL bMacro);


protected: // *** cedtViewAction.cpp ***
	void ActionWrongOperation(BOOL bBeep = TRUE);
	void ActionEvaluateLine();


protected: // *** cedtViewMove.cpp ***
	BOOL ActionMoveLeft(UINT nFlags);			BOOL ActionMoveRight(UINT nFlags);
	BOOL ActionMoveUp(UINT nFlags);				BOOL ActionMoveDown(UINT nFlags);
	BOOL ActionMoveHome(UINT nFlags);			BOOL ActionMoveEnd(UINT nFlags);
	BOOL ActionMovePrior(UINT nFlags);			BOOL ActionMoveNext(UINT nFlags);

	void MoveCaretLeft(INT nCount = 1);			void MoveCaretRight(INT nCount = 1);
	void MoveCaretWordLeft();					void MoveCaretWordRight();
	void MoveCaretLineBegin();					void MoveCaretLineEnd();
	void MoveCaretLineBeginNonBlank();
	void MoveCaretParagraphBegin();				void MoveCaretParagraphEnd();

	void MoveCaretUp();							void MoveCaretDown();
	void MoveCaretScreenTop();					void MoveCaretScreenBottom();
	void MoveCaretPageUp();						void MoveCaretPageDown();
	void MoveCaretHalfPageUp();					void MoveCaretHalfPageDown();

	void MoveCaretDocumentBegin();				void MoveCaretDocumentEnd();
	void MoveCaretScreenBegin();				void MoveCaretScreenEnd();
	void ScrollScreenUp();						void ScrollScreenDown();
	void ScrollScreenUpLimited();				void ScrollScreenDownLimited();


protected: // *** cedtViewSelect.cpp ***
	BOOL ActionSelectAll();						BOOL ActionSelectLine();
	BOOL ActionSelectWord();					BOOL ActionSelectBlock();


protected: // *** cedtViewEdit.cpp ***
	void ActionInsertChar(UINT nChar);			void ActionInsertColumnChar(UINT nChar);
	void ActionInsertSpacesInPlaceOfTab();		void ActionInsertColumnSpacesInPlaceOfTab();
	void ActionInsertString(LPCTSTR lpszString);

	void ActionCarrigeReturn();					void ActionBackspace();
	void ActionDeleteChar();					void ActionDetabCaret();

	void ActionJoinLines();						void ActionSplitLine();
	void ActionDeleteWord();					void ActionDeletePrevWord();
	void ActionDeleteToEndOfLine();				void ActionDeleteToBeginOfLine();
	void ActionDeleteLine();					void ActionDuplicateLine();

	void ActionIndentLine();					void ActionUnindentLine();
	void ActionMakeCommentLine();				void ActionReleaseCommentLine();

protected:
	void InsertChar(INT nIdxX, INT nIdxY, UINT nChar);
	void DeleteChar(INT nIdxX, INT nIdxY);

	void CopyToString(CString & rString, INT nIdxX, INT nIdxY, INT nLength);
	void InsertString(INT nIdxX, INT nIdxY, LPCTSTR lpszString);
	void DeleteString(INT nIdxX, INT nIdxY, INT nLength);

	void SplitLine(INT nIdxX, INT nIdxY);
	void JoinLines(INT nIdxX, INT nIdxY);

	INT IndentLine(INT nIdxY);					INT UnindentLine(INT nIdxY);
	INT MakeCommentLine(INT nIdxY);				INT ReleaseCommentLine(INT nIdxY);

	INT ConvertTabsToSpaces(INT nIdxY);			INT ConvertSpacesToTabs(INT nIdxY);
	INT LeadingSpacesToTabs(INT nIdxY);
	INT DeleteLeadingSpaces(INT nIdxY);			INT DeleteTrailingSpaces(INT nIdxY);


protected: // *** cedtViewEditCompose.cpp ***
	void ActionCompositionStart();
	void ActionCompositionEnd();
	void ActionCompositionCompose(LPCTSTR lpszString);
	void ActionCompositionResult(LPCTSTR lpszString);

protected:
	BOOL IsCompositionStringSaved();
	void EmptySavedCompositionString();
	void SaveCurrentCompositionString(INT nIdxY);
	void RestoreCurrentCompositionString(INT nIdxY);

	void InsertCompositionString(INT nIdxX, INT nIdxY, LPCTSTR lpszString);
	void DeleteCompositionString(INT nIdxX, INT nIdxY, INT nLength);


protected: // *** cedtViewEditAdv.cpp ***
	void ActionDeleteLineSelection();			void ActionDeleteColumnSelection();
	void ActionDeleteColumnChar();				void ActionDeleteColumnPrevChar();
	void ActionDeleteColumnToEndOfLine();		void ActionDeleteColumnToBeginOfLine();

	void ActionCopyLineSelection(CMemText & rBlock);
	void ActionCopyColumnSelection(CMemText & rBlock);
	void ActionCopyLine(CMemText & rBlock);
	void ActionCopyFilePath(CMemText & rBlock);

	void ActionPasteLineSelection(CMemText & rBlock);
	void ActionPasteColumnSelection(CMemText & rBlock);

	void ActionChangeLineSelection(CMemText & rBlock);
	void ActionChangeColumnSelection(CMemText & rBlock);

	void ActionIndentLineSelection();			void ActionUnindentLineSelection();
	void ActionMakeCommentLineSelection();		void ActionReleaseCommentLineSelection();

	void ActionConvertTabsToSpaces();			void ActionConvertSpacesToTabs();
	void ActionLeadingSpacesToTabs();			void ActionRemoveTrailingSpaces();

protected:
	void CopyToLineSelection(CMemText & rBlock, INT nBegX, INT nBegY, INT nEndX, INT nEndY);
	void InsertLineSelection(INT nBegX, INT nBegY, INT & nEndX, INT & nEndY, CMemText & rBlock);
	void DeleteLineSelection(INT nBegX, INT nBegY, INT nEndX, INT nEndY);

	void ArrangeLineSelection(INT & nBegX, INT & nBegY, INT & nEndX, INT & nEndY);
	void IndentLineSelection(INT nBegX, INT nBegY, INT nEndX, INT nEndY);
	void UnindentLineSelection(INT nBegX, INT nBegY, INT nEndX, INT nEndY);
	void MakeCommentLineSelection(INT nBegX, INT nBegY, INT nEndX, INT nEndY);
	void ReleaseCommentLineSelection(INT nBegX, INT nBegY, INT nEndX, INT nEndY);

	void CopyToColumnSelection(CMemText & rBlock, INT nBegX, INT nBegY, INT nEndX, INT nEndY);
	void InsertColumnSelection(INT nBegX, INT nBegY, INT & nEndX, INT & nEndY, CMemText & rBlock);
	void DeleteColumnSelection(INT nBegX, INT nBegY, INT nEndX, INT nEndY);

	void ConvertTabsToSpacesDocument();			void ConvertSpacesToTabsDocument();
	void LeadingSpacesToTabsDocument();			void DeleteTrailingSpacesDocument();


protected: // *** cedtViewUndo.cpp ***
	void ActionUndoLastAction();				void ActionRedoLastUndo();

protected:
	INT  GetUndoBufferCount();					INT  GetRedoBufferCount();
	void EmptyUndoBuffer();						void EmptyRedoBuffer();

	void GetLastEditingIndex(INT & nIdxX, INT & nIdxY);
	void CheckIfAllActionsCanBeUndone();
	void CheckIfAllActionsAreUndone();

	void BeginActionRecording(BOOL bRecordingUndo);
	void EndActionRecording();

⌨️ 快捷键说明

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