]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.h
Delay bibfileCache first update up until it is used.
[lyx.git] / src / paragraph.h
index 7bf747527b8202cad7475e5d78a70dcde80137a9..1d63feeb038137c533f4a76343c0d9508d05c339 100644 (file)
@@ -30,7 +30,6 @@ namespace lyx {
 
 class Buffer;
 class BufferParams;
-class BufferView;
 class Counters;
 class InsetBase;
 class InsetBibitem;
@@ -60,6 +59,8 @@ public:
 
 
 /// A Paragraph holds all text, attributes and insets in a text paragraph
+/// \todo FIXME: any reference to ParagraphMetrics (including inheritance)
+/// should go in order to complete the Model/View separation of this class.
 class Paragraph  {
 public:
        ///
@@ -142,7 +143,7 @@ public:
        std::string getID(Buffer const & buf,
                          OutputParams const & runparams) const;
 
-       // Get the first word of a paragraph, return the position where it left
+       /// Get the first word of a paragraph, return the position where it left
        pos_type getFirstWord(Buffer const & buf,
                                   odocstream & os,
                                   OutputParams const & runparams) const;
@@ -241,7 +242,7 @@ public:
        docstring const getLabelWidthString() const;
        ///
        void setLabelWidthString(docstring const & s);
-       ///
+       /// Actual paragraph alignment used
        char getAlign() const;
        /// The nesting depth of a paragraph
        depth_type getDepth() const;
@@ -281,8 +282,7 @@ public:
         * The font returned by the above functions is the same in a
         * span of characters. This method will return the first and
         * the last positions in the paragraph for which that font is
-        * the same. This can be used to avoid unnecessary calls to
-   * getFont.
+        * the same. This can be used to avoid unnecessary calls to getFont.
         */
        FontSpan fontSpan(pos_type pos) const;
        ///
@@ -338,8 +338,8 @@ public:
        bool isSeparator(pos_type pos) const { return getChar(pos) == ' '; }
        ///
        bool isLineSeparator(pos_type pos) const;
-       /// True if the character/inset at this point can be part of a word
-       // Note that digits in particular are considered as letters
+       /// True if the character/inset at this point can be part of a word.
+       /// Note that digits in particular are considered as letters
        bool isLetter(pos_type pos) const;
 
        /// returns -1 if inset not found
@@ -359,49 +359,18 @@ public:
        ParagraphParameters & params();
        ///
        ParagraphParameters const & params() const;
-
-       ///
-       Row & getRow(pos_type pos, bool boundary);
-       ///
-       Row const & getRow(pos_type pos, bool boundary) const;
-       ///
-       size_t pos2row(pos_type pos) const;
-
-       /// total height of paragraph
-       unsigned int height() const { return dim_.height(); }
-       /// total width of paragraph, may differ from workwidth
-       unsigned int width() const { return dim_.width(); }
-       /// ascend of paragraph above baseline
-       unsigned int ascent() const { return dim_.ascent(); }
-       /// descend of paragraph below baseline
-       unsigned int descent() const { return dim_.descent(); }
-       /// LyXText updates the rows using this access point
-       RowList & rows() { return rows_; }
-       /// The painter and others use this
-       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_; }
-
-       /// dump some information to lyxerr
-       void dump() const;
+       /// Check if we are in a Biblio environment.
+       /// \retval true if the cursor needs to be moved right.
+       bool checkBiblio(bool track_changes);
 
 public:
        ///
        InsetList insetlist;
 
 private:
-       /// cached dimensions of paragraph
-       Dimension dim_;
-
-       ///
-       mutable RowList rows_;
-       ///
-       mutable RowSignature rowSignature_;
 
        ///
        LyXLayout_ptr layout_;
@@ -421,7 +390,6 @@ private:
        Pimpl * pimpl_;
 };
 
-
 } // namespace lyx
 
 #endif // PARAGRAPH_H