+ ///
+ void add(pos_type pos, Inset const * ins, Dimension const & dim,
+ Font const & f, Change const & ch);
+ ///
+ void add(pos_type pos, char_type const c,
+ Font const & f, Change const & ch);
+ ///
+ void addVirtual(pos_type pos, docstring const & s,
+ Font const & f, Change const & ch);
+ ///
+ void addSeparator(pos_type pos, char_type const c,
+ Font const & f, Change const & ch);
+ ///
+ void addSpace(pos_type pos, int width, Font const & f, Change const & ch);
+
+ ///
+ typedef std::vector<Element> Elements;
+ ///
+ typedef Elements::iterator iterator;
+ ///
+ typedef Elements::const_iterator const_iterator;
+ ///
+ iterator begin() { return elements_.begin(); }
+ ///
+ iterator end() { return elements_.end(); }
+ ///
+ const_iterator begin() const { return elements_.begin(); }
+ ///
+ const_iterator end() const { return elements_.end(); }
+
+ ///
+ bool empty() const { return elements_.empty(); }
+ ///
+ Element & front() { return elements_.front(); }
+ ///
+ Element const & front() const { return elements_.front(); }
+ ///
+ Element & back() { return elements_.back(); }
+ ///
+ Element const & back() const { return elements_.back(); }
+ /// remove last element
+ void pop_back();
+ /// remove all row elements
+ void clear() { elements_.clear(); }
+ /**
+ * if row width is too large, remove all elements after last
+ * separator and update endpos if necessary. If all that
+ * remains is a large word, cut it to \param width.
+ * \param body_pos minimum amount of text to keep.
+ * \param width maximum width of the row
+ */
+ void shortenIfNeeded(pos_type const body_pos, int const width);
+
+ /**
+ * If last element of the row is a string, compute its width
+ * and mark it final.
+ */
+ void finalizeLast();
+
+ /**
+ * Find sequences of right-to-left elements and reverse them.
+ * This should be called once the row is completely built.
+ */
+ void reverseRTL(bool rtl_par);
+
+ friend std::ostream & operator<<(std::ostream & os, Row const & row);