]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
hopefully fix tex2lyx linking.
[lyx.git] / src / paragraph.h
index 7543feec687cfacdcccef29a7eceb3ea0d32e084..5febe6ce64ec2bc9ddc7fdd759fcfd98538f4c4a 100644 (file)
@@ -178,8 +178,6 @@ public:
        ///
        bool empty() const { return text_.empty(); }
        ///
-       void setContentsFromPar(Paragraph const & par);
-       ///
        void clearContents();
 
        ///
@@ -198,6 +196,14 @@ public:
 
        /// is there a change within the given range ?
        bool isChanged(pos_type start, pos_type end) const;
+       /// is there an unchanged char at the given pos ?
+       bool isUnchanged(pos_type pos) const {
+               return lookupChange(pos).type == Change::UNCHANGED;
+       }
+       /// is there an insertion at the given pos ?
+       bool isInserted(pos_type pos) const {
+               return lookupChange(pos).type == Change::INSERTED;
+       }
        /// is there a deletion at the given pos ?
        bool isDeleted(pos_type pos) const {
                return lookupChange(pos).type == Change::DELETED;
@@ -209,11 +215,11 @@ public:
        /// set change at given pos
        void setChange(pos_type pos, Change const & change);
 
-       /// accept change
-       void acceptChange(pos_type start, pos_type end);
+       /// accept changes within the given range
+       void acceptChanges(pos_type start, pos_type end);
 
-       /// reject change
-       void rejectChange(pos_type start, pos_type end);
+       /// reject changes within the given range
+       void rejectChanges(pos_type start, pos_type end);
 
        /// Paragraphs can contain "manual labels", for example, Description
        /// environment. The text for this user-editable label is stored in
@@ -240,10 +246,10 @@ public:
        ///
        void applyLayout(LyXLayout_ptr const & new_layout);
 
-       /// erase the char at the given position
-       bool erase(pos_type pos, bool trackChanges);
-       /// erase the given range. Returns the number of chars actually erased
-       int erase(pos_type start, pos_type end, bool trackChanges);
+       /// (logically) erase the char at pos; return true if it was actually erased
+       bool eraseChar(pos_type pos, bool trackChanges);
+       /// (logically) erase the given range; return the number of chars actually erased
+       int eraseChars(pos_type start, pos_type end, bool trackChanges);
 
        /** Get uninstantiated font setting. Returns the difference
            between the characters font and the layoutfont.
@@ -280,15 +286,13 @@ public:
        value_type getChar(pos_type pos) const { return text_[pos]; }
        /// Get the char, but mirror all bracket characters if it is right-to-left
        value_type getUChar(BufferParams const &, pos_type pos) const;
-       /// The position must already exist.
-       void setChar(pos_type pos, value_type c);
        /// pos <= size() (there is a dummy font change at the end of each par)
        void setFont(pos_type pos, LyXFont const & font);
        /// Returns the height of the highest font in range
        LyXFont_size highestFontInRange(pos_type startpos,
                                        pos_type endpos, LyXFont_size def_size) const;
        ///
-       void insert(pos_type pos, std::string const & str,
+       void insert(pos_type pos, docstring const & str,
                    LyXFont const & font, Change const & change);
        ///
        void insertChar(pos_type pos, value_type c, bool trackChanges);
@@ -300,10 +304,10 @@ public:
                        LyXFont const &, Change const & change);
        ///
        void insertInset(pos_type pos, InsetBase * inset,
-                        Change const & change);
+                        Change const & change);
        ///
        void insertInset(pos_type pos, InsetBase * inset,
-                        LyXFont const &, Change const & change);
+                        LyXFont const &, Change const & change);
        ///
        bool insetAllowed(InsetBase_code code);
        ///
@@ -373,6 +377,8 @@ public:
        RowList const & rows() const { return rows_; }
        ///
        RowSignature & rowSignature() const { return rowSignature_; }
+       ///
+       bool hfillExpansion(Row const & row, pos_type pos) const;
 
        /// LyXText::redoParagraph updates this
        Dimension & dim() { return dim_; }