/** Return position in pixels (from the left) of position
* \param i in the row element.
*/
- double pos2x(pos_type const i) const;
+ double pos2x(pos_type i) const;
/** Return character position that is the closest to
* pixel position \param x. The value \param x is
* adjusted to the actual pixel position.
- */
- pos_type x2pos(int &x) const;
+ * \param select if true, return the right edge when closer.
+ */
+ pos_type x2pos(int & x, bool select = false) const;
/** Break the element if possible, so that its width is less
* than \param w. Returns true on success. When \param force
* is true, the string is cut at any place, other wise it
void right_boundary(bool b) { right_boundary_ = b; }
///
bool right_boundary() const { return right_boundary_; }
+ ///
+ void flushed(bool b) { flushed_ = b; }
+ ///
+ bool flushed() const { return flushed_; }
///
Dimension const & dimension() const { return dim_; }
* This should be called once the row is completely built.
*/
void reverseRTL(bool rtl_par);
+ ///
+ bool isRTL() const { return rtl_; }
+ /// Find row element that contains \c pos, and compute x offset.
+ const_iterator const findElement(pos_type pos, bool boundary, double & x) const;
friend std::ostream & operator<<(std::ostream & os, Row const & row);
pos_type pos_;
/// one behind last pos covered by this row
pos_type end_;
- // Is there is a boundary at the end of the row (display inset...)
+ // Is there a boundary at the end of the row (display inset...)
bool right_boundary_;
+ // Shall the row be flushed when it is supposed to be justified?
+ bool flushed_;
/// Row dimension.
Dimension dim_;
+ /// true when this row lives in a right-to-left paragraph
+ bool rtl_;
};