X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftexrow.h;h=35a53be2f38ca71517202341d2414d1d1b321f12;hb=646c3127406e1ff1c5aaeb71aa5ea49be0ac8b0e;hp=4b000a8f5ba2e5ddab08b10b494f63b7b5d1a718;hpb=13349032cb4dc8ef44146aa652ff6bbff6698249;p=lyx.git diff --git a/src/texrow.h b/src/texrow.h index 4b000a8f5b..35a53be2f3 100644 --- a/src/texrow.h +++ b/src/texrow.h @@ -1,35 +1,38 @@ // -*- 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 -class Paragraph; + +namespace lyx { + /// 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,8 +49,6 @@ 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; } @@ -84,19 +85,18 @@ public: }; /// typedef std::list 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; }; + +} // namespace lyx + #endif // TEXROW_H