+ TexRow texrow;
+ /// Copy can be expensive and is not usually useful for TexString.
+ /// Force explicit copy, prefer move instead. This also prevents
+ /// move()s from being converted into copy silently.
+ explicit TexString(TexString const &) = default;
+ TexString(TexString && other) = default;
+ TexString & operator=(TexString const & other) = default;
+ TexString & operator=(TexString && other) = default;
+ /// Empty TexString
+ TexString() = default;
+ /// Texstring containing str and TexRow with enough lines which are empty
+ explicit TexString(docstring str);
+ /// Texstring containing str and texrow. Must be valid.
+ TexString(docstring str, TexRow texrow);
+ /// Ensure that the string and the TexRow have as many newlines.
+ void validate();
+};
+
+
+// Standard container needs a complete type
+class TexRow::RowEntryList {
+ // For each row we store a list of one special TextEntry and several
+ // RowEntries. (The order is important.) We only want one text entry
+ // because we do not want to store every position in the lyx file. On the
+ // other hand we want to record all math and table cells positions for
+ // enough precision. Usually the count of cells is easier to handle.
+ // The RowEntries are used for forward-search and the code preview pane.
+ std::vector<RowEntry> v_;
+ // The TextEntry is currently used for reverse-search and the error
+ // reporting dialog. Once the latter are adapted to rely on the more precise
+ // RowEntries above, it can be removed.
+ TextEntry text_entry_;
+
+public:
+ typedef std::vector<RowEntry>::iterator iterator;
+ iterator begin() { return v_.begin(); }
+ iterator end() { return v_.end(); }