]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
The inset newline patch I sent plus the requisite fixes. I couldn't reproduce a problem.
[lyx.git] / src / paragraph.h
index 62a82b68308ee8d8f85f3e5babad470382d71436..383a4c8ea2eeb71fcb3c6c1b8c8004bf783b9efc 100644 (file)
@@ -39,12 +39,12 @@ class Paragraph  {
 public:
        ///
        enum META_KIND {
-               ///
-               META_HFILL = 1,
-               ///
-               META_NEWLINE,
-               ///
-               META_INSET
+               /// Note that this is 1 right now to avoid
+               /// crashes where getChar() is called wrongly
+               /// (returning 0) - if this was 0, then we'd
+               /// try getInset() and crash. We should fix
+               /// all these places.
+               META_INSET = 1
        };
        ///
        typedef char value_type;
@@ -183,6 +183,9 @@ public:
        /// is there a non-addition in this range ?
        bool isChangeEdited(lyx::pos_type start, lyx::pos_type end) const;
 
+       /// set change at pos
+       void setChange(lyx::pos_type pos, Change::Type type);
+
        /// accept change
        void acceptChange(lyx::pos_type start, lyx::pos_type end);
 
@@ -200,8 +203,13 @@ public:
        Paragraph * outerHook();
        ///
        Paragraph const * outerHook() const;
-       ///
-       int beginningOfMainBody() const;
+
+       /// Paragraphs can contain "manual labels", for example, Description environment.
+       /// The text for this user-editable label is stored in the paragraph alongside
+       /// the text of the rest of the paragraph (the body). This function returns
+       /// the starting position of the body of the text in the paragraph.
+       int beginningOfBody() const;
+
        ///
        string const & getLabelstring() const;
 
@@ -218,6 +226,8 @@ public:
        ///
        void applyLayout(LyXLayout_ptr const & new_layout);
 
+       /// definite erase
+       void eraseIntern(lyx::pos_type pos);
        /// erase the char at the given position
        void erase(lyx::pos_type pos);
        /// erase the given range. Returns true if actually erased.
@@ -314,10 +324,6 @@ public:
        InsetList insetlist;
        ///
        //Counters & counters();
-
-       friend void breakParagraph(BufferParams const & bparams,
-                   Paragraph * par, lyx::pos_type pos, int flag);
-
 private:
        ///
        LyXLayout_ptr layout_;