4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Matthias Ettrich
8 * \author Lars Gullik Bjønnes
11 * Full author contact details are available in file CREDITS.
23 /// Represents the correspondence between paragraphs and the generated
29 TexRow() : count(0), lastid(-1), lastpos(-1) {}
31 TexRow & operator+= (TexRow const &);
36 /// Define what paragraph and position the next row will represent
37 void start(int id, int pos);
39 /// Insert node when line is completed
43 * getIdFromRow - find pid and position for a given row
44 * @param row row number to find
45 * @param id set to id if found
46 * @param pos set to paragraph position if found
47 * @return true if found, false otherwise
49 * If the row could not be found, pos is set to zero and
52 bool getIdFromRow(int row, int & id, int & pos) const;
54 /// Returns the number of rows contained
55 int rows() const { return count; }
57 /// an individual id/pos <=> row mapping
60 RowItem(int id, int pos, int row)
61 : id_(id), pos_(pos), rownumber_(row)
65 int id() const { return id_; }
66 /// set paragraph position
67 void pos(int p) { pos_ = p; }
68 /// paragraph position
69 int pos() const { return pos_; }
71 int rownumber() const { return rownumber_; }
79 typedef std::list<RowItem> RowList;
83 /// container of id/pos <=> row mapping