OSDN Git Service

crystaledit: Use GetProfile*()/WriteProfile*() to read and write the registry wheneve...
[winmerge-jp/winmerge-jp.git] / Src / GhostTextBuffer.h
index 75eba6b..7751e7a 100644 (file)
@@ -59,7 +59,9 @@ private:
 
        // Operations
 private:
+#if 0
        bool InternalInsertGhostLine (CCrystalTextView * pSource, int nLine);
+#endif
        bool InternalDeleteGhostLine (CCrystalTextView * pSource, int nLine, int nCount);
 public :
        // Construction/destruction code
@@ -72,9 +74,10 @@ public :
        */
        virtual void GetTextWithoutEmptys (int nStartLine, int nStartChar,
                        int nEndLine, int nEndChar, CString &text,
-                       CRLFSTYLE nCrlfStyle =CRLF_STYLE_AUTOMATIC,
+                       CRLFSTYLE nCrlfStyle =CRLFSTYLE::AUTOMATIC,
                        bool bExcludeInvisibleLines = true) const override;
 
+       virtual bool IsIndentableLine(int nLine) const override { return (GetLineFlags(nLine) & LF_GHOST) == 0; }
 
        // Text modification functions
        virtual bool InsertText (CCrystalTextView * pSource, int nLine, int nPos,
@@ -83,11 +86,15 @@ public :
        virtual bool DeleteText2 (CCrystalTextView * pSource, int nStartLine,
                int nStartPos, int nEndLine, int nEndPos,
                int nAction = CE_ACTION_UNKNOWN, bool bHistory =true) override;
+#if 0
        bool InsertGhostLine (CCrystalTextView * pSource, int nLine);
+#endif
 
        virtual void AddUndoRecord (bool bInsert, const CPoint & ptStartPos, const CPoint & ptEndPos,
-                                   LPCTSTR pszText, size_t cchText, int nActionType = CE_ACTION_UNKNOWN, CDWordArray *paSavedRevisionNumbers = NULL) override;
+                                   LPCTSTR pszText, size_t cchText, int nActionType = CE_ACTION_UNKNOWN, CDWordArray *paSavedRevisionNumbers = nullptr) override;
        virtual UndoRecord GetUndoRecord(int nUndoPos) const override;
+       virtual bool UndoInsert(CCrystalTextView * pSource, CPoint & ptCursorPos,
+                                                       const CPoint apparent_ptStartPos, CPoint const apparent_ptEndPos, const UndoRecord & ur) override;
 
        virtual CDWordArray *CopyRevisionNumbers(int nStartLine, int nEndLine) const override;
        virtual void RestoreRevisionNumbers(int nStartLine, CDWordArray *paSavedRevisionNumbers) override;
@@ -119,8 +126,9 @@ public:
 
 private:
        void RecomputeRealityMapping();
+       void CountEolAndLastLineLength(const CPoint& ptStartPos, LPCTSTR pszText, size_t cchText, int& nLastLineLength, int& nEol);
        /** For debugging purpose */
-       void checkFlagsFromReality(bool bFlag) const;
+       void checkFlagsFromReality() const;
 
 protected:
        virtual void OnNotifyLineHasBeenEdited(int nLine);