]> git.lyx.org Git - lyx.git/blob - src/texrow.h
added a regex to be used when the system is missing one, use noinst instead of pkglib...
[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-1998 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 using std::list;
21
22 class LyXParagraph;
23
24 // Controls correspondance between paragraphs and the generated LaTeX file
25 class TexRow {
26 public:
27         ///
28         TexRow() {
29                 count = 0;
30                 lastpar = 0;
31                 lastpos = -1;
32         }
33
34         /// Clears structure
35         void reset();
36
37         /// Define what paragraph and position the next row will represent
38         void start(LyXParagraph * par, int pos);
39
40         /// Insert node when line is completed
41         void newline();
42
43         /// Returns paragraph id and position from a row number
44         void getIdFromRow(int row, int & id, int & pos);
45
46         /// Appends another TexRow
47         TexRow & operator+= (TexRow const &);
48
49 private:
50         /// Linked list of items
51         struct RowItem {
52                 ///
53                 RowItem() {
54                         id = -1;
55                         pos = -1;
56                         rownumber = 0;
57                 }
58
59                 ///
60                 int id;
61                 ///
62                 int pos;
63                 ///
64                 int rownumber;
65         };
66         ///
67         unsigned int count;
68         ///
69         typedef list<RowItem> RowList;
70         ///
71         RowList rowlist;
72         /// Last paragraph
73         LyXParagraph * lastpar;
74         /// Last position
75         int lastpos;
76         
77 };
78 #endif