]> git.lyx.org Git - lyx.git/blob - src/texrow.h
remove wrong sections
[lyx.git] / src / texrow.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 The LyX Team
9  *
10  * ====================================================== */
11
12 #ifndef TEXROW_H
13 #define TEXROW_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include <list>
20
21 class LyXParagraph;
22
23 // Controls correspondance between paragraphs and the generated LaTeX file
24 class TexRow {
25 public:
26         ///
27         TexRow() {
28                 count = 0;
29                 lastpar = 0;
30                 lastpos = -1;
31         }
32
33         /// Clears structure
34         void reset();
35
36         /// Define what paragraph and position the next row will represent
37         void start(LyXParagraph * par, int pos);
38
39         /// Insert node when line is completed
40         void newline();
41
42         /// Returns paragraph id and position from a row number
43         void getIdFromRow(int row, int & id, int & pos);
44
45         /// Appends another TexRow
46         TexRow & operator+= (TexRow const &);
47
48 private:
49         /// Linked list of items
50         struct RowItem {
51                 ///
52                 RowItem() {
53                         id = -1;
54                         pos = -1;
55                         rownumber = 0;
56                 }
57
58                 ///
59                 int id;
60                 ///
61                 int pos;
62                 ///
63                 int rownumber;
64         };
65         ///
66         unsigned int count;
67         ///
68         typedef std::list<RowItem> RowList;
69         ///
70         RowList rowlist;
71         /// Last paragraph
72         LyXParagraph * lastpar;
73         /// Last position
74         int lastpos;
75         
76 };
77 #endif