#ifndef PARAGRAPH_METRICS_H
#define PARAGRAPH_METRICS_H
+#include "Dimension.h"
#include "Paragraph.h"
+#include "Row.h"
namespace lyx {
ParagraphMetrics(Paragraph const & par);
/// Copy operator.
- /// Important note: We don't copy \c row_change_status_ and
- /// \c row_signature_ because those are updated externally with
- /// \c updateRowChangeStatus() in TextMetrics::redoParagraph().
ParagraphMetrics & operator=(ParagraphMetrics const &);
+ void reset(Paragraph const & par);
+
///
Row & getRow(pos_type pos, bool boundary);
///
RowList & rows() { return rows_; }
/// The painter and others use this
RowList const & rows() const { return rows_; }
- /// The painter and others use this
- std::vector<bool> const & rowChangeStatus() const
- { return row_change_status_; }
- ///
- void updateRowChangeStatus();
///
int rightMargin(Buffer const & buffer) const;
+ ///
+ int singleWidth(pos_type pos, Font const & Font) const;
/// dump some information to lyxerr
void dump() const;
-private:
- ///
- typedef std::vector<size_type> RowSignature;
///
- size_type calculateRowSignature(Row const &);
+ bool hfillExpansion(Row const & row, pos_type pos) const;
+
+ ///
+ void computeRowSignature(Row &, BufferParams const & bparams);
+
+private:
///
mutable RowList rows_;
- ///
- RowSignature row_signature_;
- ///
- std::vector<bool> row_change_status_;
/// cached dimensions of paragraph
Dimension dim_;
///