]> git.lyx.org Git - lyx.git/blobdiff - src/texrow.h
move definition of variables to the main cmake file
[lyx.git] / src / texrow.h
index d35c7a57a95dd78aa01209caa2126673d378cfb3..ba80acb58a47135ad8aa04dabbd25536028ad5f7 100644 (file)
@@ -1,35 +1,35 @@
 // -*- C++ -*-
 /**
  * \file texrow.h
- * Copyright 1995-2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author Matthias Ettrich
+ * \author Lars Gullik Bjønnes
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
-
 #ifndef TEXROW_H
 #define TEXROW_H
 
-#ifdef __GNUG__
-#pragma interface
-#endif
-
 #include <list>
 
-class Paragraph;
 
 /// Represents the correspondence between paragraphs and the generated LaTeX file
 class TexRow {
 public:
        ///
-       TexRow() : count(0), lastpar(0), lastpos(-1) {}
+       TexRow() : count(0), lastid(-1), lastpos(-1) {}
+
+       TexRow & operator+= (TexRow const &);
 
        /// Clears structure
        void reset();
 
        /// Define what paragraph and position the next row will represent
-       void start(Paragraph * par, int pos);
+       void start(int id, int pos);
 
        /// Insert node when line is completed
        void newline();
@@ -46,15 +46,13 @@ public:
         */
        bool getIdFromRow(int row, int & id, int & pos) const;
 
-       TexRow & operator+= (TexRow const &);
-
        /// Returns the number of rows contained
        int rows() const { return count; }
 
        /// an individual id/pos <=> row mapping
        class RowItem {
        public:
-               RowItem(int id, int pos, int row) 
+               RowItem(int id, int pos, int row)
                        : id_(id), pos_(pos), rownumber_(row)
                {}
 
@@ -62,7 +60,7 @@ public:
                int id() const {
                        return id_;
                }
+
                /// set paragraph position
                void pos(int p) {
                        pos_ = p;
@@ -84,19 +82,15 @@ public:
        };
        ///
        typedef std::list<RowItem> RowList;
-       /// increment position of all other RowItems
-       /// with same par id, to avoid placing error insets
-       /// at the same position
-       void increasePos(int id, int pos);
 private:
        /// number of lines
        unsigned int count;
        /// container of id/pos <=> row mapping
        RowList rowlist;
        /// Last paragraph
-       Paragraph * lastpar;
+       int lastid;
        /// Last position
        int lastpos;
 };
+
 #endif // TEXROW_H